[R] na.action in stats::factanal()
Terry Therneau
therneau at mayo.edu
Tue Feb 7 15:40:36 CET 2012
> Does factanal() force the user to use the formula interface if they
> wish to specify an na.action?
Short answer: yes.
Long answer: The handling of na.action is a built in part of the formula
processing functions, so it's automatic when dealing with a formula.
There are also downstream effects on predict() and resid() that are
worked out for the formula case, but aren't clear otherwise. So-
a. it would require extra programming and thought to work it out for
matrix vector input, and the "right" answer isn't clear (it's harder
than you might think).
b. the usual assumption when a matrix/vector is given directly is
"the user knows what he's doing, or wouldn't have called it this way."
For many routines, the matrix input is a speedup for simulations.
c. factanal is unusual -- most routines split the two inputs.
glm=formula interface & glm.fit=matrix interface, lm & lm.fit, coxph &
coxph.fit, ....
Terry Therneau
More information about the R-help
mailing list