Subscribe Bookmark RSS Feed

save factor scores using script

likunz0

Community Trekker

Joined:

Jan 15, 2016

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
DaveLee

Community Trekker

Joined:

Jun 11, 2014

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

Community Trekker

Joined:

Jan 15, 2016

It works! Thanks!