Gabor Grothendieck <[EMAIL PROTECTED]> wrote:
> Sasha Pustota <[EMAIL PROTECTED]> wrote:
> > ir <- rbind(iris3[,,1], iris3[,,2], iris3[,,3])
> > lir <- data.frame(log(ir))
> > names(lir) <- c("a","b","c","d")
> >
> > I'm trying to understand the meaning of expressions like "~ a+b+c+d",
> > used with princomp, e.g.
> > princomp(~ a+b+c+d, data=lir, cor=T)
> > By inspection, it looks like the result is the same as in
> > princomp(lir, cor = T).
>
> Yes, princomp.formula just takes the model matrix of the formula
> and passes it to princomp.default.

Thanks. A further question. If I set some values to NA, a call

princomp(~., data=mir, cor=T, na.action=na.omit)$scores

indicates there have been predicted values imputed in place of NA.
The documentation says 'napredict' is used but I can't find details.
My guess is that these are predicted from linear multiple regression
of other columns on NAs. However, what method is used exactly, in
the case of princomp?  (and how do I find out these things?)

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to