Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Commands to send factor analysis to another application
From
"MacQuarrie, Kerry" <[email protected]>
To
"Statalist ([email protected])" <[email protected]>
Subject
st: Commands to send factor analysis to another application
Date
Mon, 3 Dec 2012 16:07:12 +0000
Hello Statalisters,
I am wondering if there are available commands (either native or user-written) to select from the results of factor analysis procedures and produce tables in another application (namely Excel). I have used tabout, estout, and outreg commands for doing so with descriptive and regression results, but I'm stymied here. I've also been reading an (somewhat older) Stata Journal article* on using the file command, but it's not clear that is exactly what I'm looking for either.
My basic code for the factor analysis takes the form of:
factor var1 var2 var3 ... vark, pcf
rotate, promax
predict f1 f2 f3
alpha var1 var2...vark, generate(factor1)
alpha var3 var4...vark, generate(factor2)
alpha var5 var6...vark, generate(factor3)
I want to save a table that has the rotated factor loadings that comes from the second line of syntax--this is the core of the table--, but I want to append an output table with other pieces of information too. These would include the eigenvalues and cumulative variance (but only for the retained factors, e.g. those with eigenvalues>1) from the first line and the Cronbach's alpha for each of the factors in lines 4-6.
Another complication is that the above factor analysis code will likely be modified into looped code, as I am running the factor analyses on multiple country datasets, each of which (so far) appear to have the same structure regarding these factors.
Any tips on where to start would be much, much appreciated.
Regards,
Kerry
*Slaymaker, E. (2005) "Using the file command to produce formatted output for other applications." The Stata Journal 5(2): 239-247.
Kerry MacQuarrie
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/