Hello
I am plotting a loess curve with confidence limits as below. How do I create the prediction limits? Is multiplying the standard errors by sqrt(n) appropriate?
data <- mndata lo <- loess(data[[variableName]] ~ Age, data, span=1.0, control = loess.control(surface = "direct")) xPoints <- data.frame(age = seq(1,240,1)) lo1 <- predict(lo, xPoints, se = TRUE) age <- xPoints$age lines(age,lo1$fit, col=4) # now do +/- 2 std errors lo1p <- lo1$fit + 2*lo1$se.fit lo1m <- lo1$fit - 2*lo1$se.fit lines(age,lo1p, col=4) lines(age,lo1m, col=4)
Thanks, David
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html