From f2a9e584a7a84ebe90e666632d2e070e2004a85b Mon Sep 17 00:00:00 2001 From: Bartosz Kostrzewa Date: Thu, 24 Nov 2022 00:17:13 +0100 Subject: [PATCH] support for multidimensional nlsfit (error check only, functionality incomplete) --- R/bootstrap.nlsfit.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/bootstrap.nlsfit.R b/R/bootstrap.nlsfit.R index fab81789..b01525c3 100644 --- a/R/bootstrap.nlsfit.R +++ b/R/bootstrap.nlsfit.R @@ -110,7 +110,7 @@ parametric.nlsfit <- function (fn, par.guess, boot.R, y, dy, x, dx, lower = rep(x = -Inf, times = length(par.guess)), upper = rep(x = +Inf, times = length(par.guess)), ..., bootstrap=TRUE) { - stopifnot(length(x) == length(y)) + stopifnot(length(x) %% length(y) == 0) stopifnot(missing(dx) || length(dx) == length(x)) stopifnot(missing(dy) || length(dy) == length(y)) stopifnot(length(lower) == length(par.guess)) @@ -156,7 +156,7 @@ parametric.nlsfit.cov <- function (fn, par.guess, boot.R, y, x, cov, lower = rep(x = -Inf, times = length(par.guess)), upper = rep(x = +Inf, times = length(par.guess)), ..., bootstrap=TRUE, na.rm = FALSE) { - stopifnot(length(x) == length(y)) + stopifnot(length(x) %% length(y) == 0) stopifnot(length(lower) == length(par.guess)) stopifnot(length(upper) == length(par.guess))