aboutsummaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
Diffstat (limited to 'R')
-rw-r--r--R/mkinfit.R2
1 files changed, 1 insertions, 1 deletions
diff --git a/R/mkinfit.R b/R/mkinfit.R
index 70ca9c0e..83ac0873 100644
--- a/R/mkinfit.R
+++ b/R/mkinfit.R
@@ -215,7 +215,7 @@ mkinfit <- function(mkinmod, observed,
while (reweight.diff > reweight.tol & n.iter < reweight.max.iter) {
n.iter <- n.iter + 1
sigma.old <- sqrt(fit$var_ms_unweighted)
- observed[err] <- sqrt(fit$var_ms_unweighted)[observed$name]
+ observed[err] <- sqrt(fit$var_ms_unweighted)[as.character(observed$name)]
fit <- modFit(cost, fit$par, method = method.modFit,
control = control.modFit, ...)
reweight.diff = sum((sqrt(fit$var_ms_unweighted) - sigma.old)^2)

Contact - Imprint