Hi, How I get the score in a postestimation after run Principal Component with Matrix (new var by each component?, How can I do it on my database ? I can make this in stata using the command predict, but I not found something similiar un SPSS.
=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
My sintax is lihe this: GET STATA FILE='C:\libro-distribucion\cap7\bra07_cedlas.dta'. SAVE OUTFILE='C:\libro-distribucion\cap7\Brasil07_cedlas.sav'. get FILE='C:\libro-distribucion\cap7\Brasil07_cedlas.sav'. SELECT IF (jefe eq 1 and ipcf>0). EXECUTE. FREQUENCIES jefe. SELECT IF not sysmis(aedu). EXECUTE. FREQUENCIES jefe. SAVE OUTFILE='C:\libro-distribucion\cap7\Brasil07_cedlas.sav' /COMPRESSED. compute matnopreca=1-matpreca. execute. WEIGHT by pondera. *los resultados obtenidos con SPSSINC HETCOR difieren de los matriz de resultados de stata (result differ from results matrix stata - tetrachoric command) SPSSINC HETCOR matnopreca agua cloacas elect /OPTIONS ESTIMATOR=ML STDERR=TRUE MISSING=PAIRWISE N=TRUE TYPE=TRUE /SAVE PROGRAMFILE="tetra". MATRIX DATA VARIABLES=ROWTYPE_ matnopreca agua cloacas elect. BEGIN DATA N 120465 120465 120465 120465 mean .9821569 .9198863 .5890014 .9828815 Stddev 0.1323816 0.2714702 0.492017 0.1297134 CORR 1 CORR 0.6729 1 CORR 0.5762 0.7654 1 CORR 0.6397 0.8271 0.7314 1 END DATA. factor /matrix=in(cor=*) /METHOD CORRELATION /PRINT INITIAL EXTRACTION KMO REPR ROTATION FSCORE /PLOT EIGEN ROTATION /CRITERIA MINEIGEN(1) ITERATE(25) FACTORS(4) /EXTRACTION PC /CRITERIA ITERATE(25) /ROTATION DEFAULT. Javier |
Administrator
|
The Stata manual (http://www.stata.com/manuals13/mvfactorpostestimation.pdf) says this for predict:
predict - predict regression or Bartlett scores From the SPSS manual entry for the /SAVE sub-command for FACTOR: "SAVE allows you to save factor scores from any rotated or unrotated extraction as new variables in the active dataset. You can use any of the three methods for computing the factor scores." The 3 methods are: REG. Regression method. This is the default. BART. Bartlett method. AR. Anderson-Rubin method. But I suspect you will not be able to save factor scores if you are using matrix input. I think you will have to apply your results to a new dataset containing raw data. If that is so, this Technote might be helpful: http://www-01.ibm.com/support/docview.wss?uid=swg21476884 HTH.
--
Bruce Weaver bweaver@lakeheadu.ca http://sites.google.com/a/lakeheadu.ca/bweaver/ "When all else fails, RTFM." PLEASE NOTE THE FOLLOWING: 1. My Hotmail account is not monitored regularly. To send me an e-mail, please use the address shown above. 2. The SPSSX Discussion forum on Nabble is no longer linked to the SPSSX-L listserv administered by UGA (https://listserv.uga.edu/). |
Administrator
|
Method 2 might be applicable but HORRIBLY clunky as implemented. I would do those COMPUTES using MATRIX. OMS might be useful for grabbing the appropriate parts.
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
If there are only 4 variables, as it seemed from the example, Method 2 as
=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
implemented in the example is apt to be easier to do and to understand, compared to using Matrix and OMS. I mention this as someone who has used the Matrix method. There seems (to me) little point in trying to legitimize the factors as /anything/ if you don't use the means and SDs of the original data. Of course, that can be severely problematic when the original correlation matrix is using "all available pairs", since the Ns and means and SDs will have multiple estimates for every variable. (I have never used the "all available" option since it seems inherently to lack robustness. If "complete data" results in a sample that is too reduced, I would (a) drop whatever variable is mostly responsible, or (b) fill in some of the Missing with estimated replacement values.) For the actual scoring: You need the z-scored versions of the variables; and you have to decide what to do for the instances of Missing, if those still exist. If you have the 4 z-scored variables, each with a coefficient, it makes some sense either way: to use the /sum/ of whatever is there (with Missing omitted, or as zero), or the /average/ of whatever is non-Missing. -- Rich Ulrich > Date: Fri, 22 Apr 2016 13:34:23 -0700 > From: [hidden email] > Subject: Re: Factor Analisys Matrix > To: [hidden email] > > Method 2 might be applicable but HORRIBLY clunky as implemented. I would do > those COMPUTES using MATRIX. OMS might be useful for grabbing the > appropriate parts. > > > Bruce Weaver wrote > > The Stata manual > > (http://www.stata.com/manuals13/mvfactorpostestimation.pdf) says this for > > predict: > > > > predict - predict regression or Bartlett scores > > > > From the SPSS manual entry for the /SAVE sub-command for FACTOR: > > > > "SAVE allows you to save factor scores from any rotated or unrotated > > extraction as new variables in the > > active dataset. You can use any of the three methods for computing the > > factor scores." > > > > The 3 methods are: > > > > REG. Regression method. This is the default. > > BART. Bartlett method. > > AR. Anderson-Rubin method. > > > > But I > / > > suspect > / > > you will not be able to save factor scores if you are using matrix input. > > I > / > > think > / > > you will have to apply your results to a new dataset containing raw data. > > If that is so, this Technote might be helpful: > > > > http://www-01.ibm.com/support/docview.wss?uid=swg21476884 > > > > HTH. > > > > Javier Meneses wrote > >> Hi, How I get the score in a postestimation after run Principal Component > >> with Matrix (new var by each component?, How can I do it on my database ? > >> I > >> can make this in stata using the command predict, but I not found > >> something similiar un SPSS. > >> > >> My sintax is lihe this: > >> > >> GET > >> STATA FILE='C:\libro-distribucion\cap7\bra07_cedlas.dta'. > >> SAVE OUTFILE='C:\libro-distribucion\cap7\Brasil07_cedlas.sav'. > >> get FILE='C:\libro-distribucion\cap7\Brasil07_cedlas.sav'. > >> SELECT IF (jefe eq 1 and ipcf>0). > >> EXECUTE. > >> FREQUENCIES jefe. > >> SELECT IF not sysmis(aedu). > >> EXECUTE. > >> FREQUENCIES jefe. > >> SAVE OUTFILE='C:\libro-distribucion\cap7\Brasil07_cedlas.sav' > >> /COMPRESSED. > >> > >> compute matnopreca=1-matpreca. > >> execute. > >> > >> WEIGHT by pondera. > >> > >> > >> *los resultados obtenidos con SPSSINC HETCOR difieren de los matriz de > >> resultados de stata (result differ from results matrix stata - > >> tetrachoric > >> command) > >> > >> SPSSINC HETCOR matnopreca agua cloacas elect > >> /OPTIONS ESTIMATOR=ML STDERR=TRUE > >> MISSING=PAIRWISE N=TRUE TYPE=TRUE > >> /SAVE PROGRAMFILE="tetra". > >> > >> MATRIX DATA VARIABLES=ROWTYPE_ matnopreca agua cloacas elect. > >> BEGIN DATA > >> N 120465 120465 120465 120465 > >> mean .9821569 .9198863 .5890014 .9828815 > >> Stddev 0.1323816 0.2714702 0.492017 0.1297134 > >> CORR 1 > >> CORR 0.6729 1 > >> CORR 0.5762 0.7654 1 > >> CORR 0.6397 0.8271 0.7314 1 > >> END DATA. > >> > >> > >> factor /matrix=in(cor=*) > >> /METHOD CORRELATION > >> /PRINT INITIAL EXTRACTION KMO REPR ROTATION FSCORE > >> /PLOT EIGEN ROTATION > >> /CRITERIA MINEIGEN(1) ITERATE(25) FACTORS(4) > >> /EXTRACTION PC > >> /CRITERIA ITERATE(25) > >> /ROTATION DEFAULT. > >> > >> > >> Javier |
Free forum by Nabble | Edit this page |