aboutsummaryrefslogtreecommitdiff
path: root/R/inverse.predict.lm.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/inverse.predict.lm.R')
-rw-r--r--R/inverse.predict.lm.R3
1 files changed, 2 insertions, 1 deletions
diff --git a/R/inverse.predict.lm.R b/R/inverse.predict.lm.R
index b48c967..2ead9fb 100644
--- a/R/inverse.predict.lm.R
+++ b/R/inverse.predict.lm.R
@@ -55,11 +55,12 @@ inverse.predict.rlm <- function(object, newdata, ...,
yx <- split(object$model$y,object$model$x)
n <- length(yx)
+ df <- n - length(objects$coef)
x <- as.numeric(names(yx))
ybar <- sapply(yx,mean)
yhatx <- split(object$fitted.values,object$model$x)
yhat <- sapply(yhatx,mean)
- se <- sqrt(sum(w*(ybar - yhat)^2)/(n-2))
+ se <- sqrt(sum(w*(ybar - yhat)^2)/df)
if (ss == "auto") {
ss <- se
} else {

Contact - Imprint