Hi there, Does anyone know how to explicitly refer to the p-value of thet test that the chosen number of factors is significant in a factor analysis. It's not in the list of values for the factanal command output yet it is printed out with the results. Thanks in advance. Wayne Dr Wayne R. Jones Statistician / Research Analyst KSS Group plc St James's Buildings 79 Oxford Street Manchester M1 6SS Tel: +44(0)161 609 4084 Mob: +44(0)7810 523 713 KSS Ltd A division of Knowledge Support Systems Group plc Seventh Floor St James's Buildings 79 Oxford Street Manchester M1 6SS England Company Registration Number 2800886 (Limited) 3449594 (plc) Tel: +44 (0) 161 228 0040 Fax: +44 (0) 161 236 6305 mailto:kssg@kssg.com http://www.kssg.com The information in this Internet email is confidential and may b... {{dropped}}
On Thu, 8 May 2003, Wayne Jones wrote:> Does anyone know how to explicitly refer to the p-value of thet test that > the chosen number of factors is significant in a factor analysis. > It's not in the list of values for the factanal command output yet it is > printed out with the results.Right, so look at the code to compute it in print.factanal and write a small function to extract the value you want from the object. Something like Pval.factanal <- function(x) { p <- nrow(x$loadings); factors <- x$factors if(!is.na(x$n.obs) && x$dof > 0) { dof <- x$dof stat <- (x$n.obs - 1 - (2 * p + 5)/6 - (2 * factors)/3) * x$criteria["objective"] pchisq(stat, dof, lower.tail = FALSE) } else NA } -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Wayne Jones <JonesW at kssg.com> writes:> Hi there, > > Does anyone know how to explicitly refer to the p-value of thet test that > the chosen number of factors is significant in a factor analysis. > It's not in the list of values for the factanal command output yet it is > printed out with the results. > > Thanks in advance.It's calculated when printed. This is somewhat in bad style (according to my tastes at least), but we have that happening in a few places. So you need to redo the computations, which can be found inside print.factanal. In 1.7.0, this function is hidden in the mva namespace but you can view it with get("print.factanal",environment(factanal)). -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907