cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
likunz0
Level I

save factor scores using script

I am wondering anyone knows how to save factor scores in a table using script. When I study “factor analysis”, I am unable to include the factor scores in the report except saving  them in a table by clicking “save rotated components.”

I'm obtaining the factors using Analysis->Consumer Research -> Factor Analysis using a factoring  method of Principal Components and Prior Commuality and a rotation method of varimax.  When the analysis is done, I was able to save the factor scores into the original table by clicking "Save Rotated Components" under the red triangle of "Factor Analysis on Correlations". Is it possible to save the factor scores using scripts?

Thanks for the help!

2 REPLIES 2
DaveLee
Level IV

Re: save factor scores using script

I used the Socioeconomic data provided in the sample data and ran the following script.

//dt=($Sample data/socioeconomic.jmp")

fa=dt<<Factor Analysis(

    Y(

        :Total Population,

        :Median School Years,

        :Total Employment,

        :Professional Services,

        :Median House Value

    ),

    Estimation Method( "Row-wise" ),

    Variance Scaling( "Correlations" ),

    Fit( "ML", "SMC", 2, "Varimax" ),

    SendToReport(

        Dispatch(

            {"Factor Analysis on Correlations with 2 Factors: Maximum Likelihood ",

            "Factor Loading Plot"},

            "Loading Plot for Rotated Factor",

            FrameBox,

            {Frame Size( 52, 36 )}

        )

    )

);

fa << (Fit[1] << Save Rotated Components);

likunz0
Level I

Re: save factor scores using script

It works! Thanks!