[R] na.action in stats::factanal() must be using formula interface and dataframe input to specify na.action?

Timothy Bates timothy.c.bates at gmail.com
Mon Feb 6 18:42:05 CET 2012


hi,
Does factanal() force the user to use the formula interface if they wish to specify an na.action?

v1 <- c(1,1,1,1,1,1,1,1,NA,1,3,3,3,3,3,4,5,6)
v2 <- c(1,2,1,1,1,1,2,1,2,1,3,NA,3,3,3,4,6,5)
v3 <- c(3,3,3,3,3,1,1,1,1,1,1,1,1,1,1,5,4,6)
v4 <- c(3,3,4,NA,3,1,1,2,1,1,1,1,2,NA,1,5,6,4)
v5 <- c(1,1,1,1,1,3,3,3,3,3,1,1,1,1,1,6,4,5)
v6 <- c(1,1,1,2,1,3,3,3,4,3,1,1,1,2,1,6,5,4)
m1 <- data.frame(cbind(v1,v2,v3,v4,v5,v6))
factOut = factanal(m1, factors = 1,scores = "Bartlett", na.action="na.exclude")
factOut = factanal(~v1+v2+v3+v4+v5+v6, data=m1, factors = 1,scores = "Bartlett", na.action="na.exclude")



More information about the R-help mailing list