Factor Analysis

classic Classic list List threaded Threaded
29 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Factor Analysis

Wana
Hi, I hv some problem with factor analysis..actually, i m doing a research in tourism studies..so i need analysis with push and pull factor..for every factor hv variable..based on picture below..varible PS1,PS2,PS3,and PS4  as escape factor..and Varible PS5,PS6,and PS7 is next factor. how i want to get factor loading for PS1 until factor 7, eigenvalue for escape factor??i trying to do it, but still do not understand..so, can u help me?
Reply | Threaded
Open this post in threaded view
|

Re: Factor Analysis

Art Kendall
I do not understand your question.
The jpg is not legible.

Please describe your data and what you are looking for?
Are "push" and "pull" factor vocabulary in some discipline?  Do you have items that are designed to measure particular constructs?  Are the scales from previous research or are they just now written?

How did you gather your data? 
What constitutes a case? How many cases do you have?
How many variables do you have?

How did you decide how many factors to retain?

Art Kendall
Social Research Consultants

On 5/12/2012 10:16 AM, Wana wrote:
Hi, I hv some problem with factor analysis..actually, i m doing a research in
tourism studies..so i need analysis with push and pull factor..for every
factor hv variable..based on picture below..varible PS1,PS2,PS3,and PS4  as
escape factor..and Varible PS5,PS6,and PS7 is next factor. how i want to get
factor loading for PS1 until factor 7, eigenvalue for escape factor??i
trying to do it, but still do not understand..so, can u help me?
http://spssx-discussion.1045642.n5.nabble.com/file/n5707166/spss.jpg

--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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

===================== 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
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Automatic reply: Factor Analysis

David J. Peng

I am out of the office until 5/21/2012.

 

For urgent matters, please contact Timothy Van Blarcom at [hidden email] or 703-388-2450.

 

Regards,

 

David

Reply | Threaded
Open this post in threaded view
|

RE: Factor Analysis

Wana
In reply to this post by Art Kendall

 

Date: Sat, 12 May 2012 08:13:01 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: Factor Analysis

I do not understand your question.
The jpg is not legible.

Please describe your data and what you are looking for?
Are "push" and "pull" factor vocabulary in some discipline?  Do you have items that are designed to measure particular constructs?  Are the scales from previous research or are they just now written?

How did you gather your data? 
What constitutes a case? How many cases do you have?
How many variables do you have?

How did you decide how many factors to retain?

Art Kendall
Social Research Consultants

On 5/12/2012 10:16 AM, Wana wrote:
Hi, I hv some problem with factor analysis..actually, i m doing a research in
tourism studies..so i need analysis with push and pull factor..for every
factor hv variable..based on picture below..varible PS1,PS2,PS3,and PS4  as
escape factor..and Varible PS5,PS6,and PS7 is next factor. how i want to get
factor loading for PS1 until factor 7, eigenvalue for escape factor??i
trying to do it, but still do not understand..so, can u help me?
http://spssx-discussion.1045642.n5.nabble.com/file/n5707166/spss.jpg

--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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

===================== 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


If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166p5707262.html
To unsubscribe from Factor Analysis, click here.
NAML

spss.jpg (192K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Factor Analysis

Art Kendall
In reply to this post by Art Kendall
.I hv 4 factor with 13 variable for push factor and for pull factor, I hv 4 factor and 13 variable too..
I take this to mean that you have 13 variables that measure push variables.  You say that there are 4 factors.  How did you decide to retain 4 factors?

Like wise for pull.  How did you decide to retain 4 factors.

Especially with such a small number of cases it greatly adds to your validity to do a parallel analysis. Did you do parallel analysis?

Are you just trying to do a data reduction, or do you intend to relate the scores from the factor analysis to variables other than the 26 in the factor analysis?

What syntax did you use in the factor analyses that came up with 4 factors?
Art Kendall
Social Research Consultants

On 5/12/2012 11:16 AM, Najihah Azmi wrote:
I want to identify motivation factor for tourist motivation.this is main objective for my research.
push and pull factor is a term in tourism study to identify tourist motivation. for example, for push factor..u have some sosio-psychological factor such as relax, prestige and other..to identify that factor, i am using some variable(I mean that PS1 until PS7)..for every factor, it have own their variable but for all varible, I am using liker-scale..strong agree, agree, neutral, disagree and strongly disagree..for this matter, i want to see relationship for every variable to factor..so, how to get factor loading for each variable and eigenvalue for factor?
 
Actually, for this cases, my sampling is 223 respondent..I hv 4 factor with 13 variable for push factor and for pull factor, I hv 4 factor and 13 variable too..
 

Date: Sat, 12 May 2012 11:04:17 -0400
From: [hidden email]
To: [hidden email]
CC: [hidden email]
Subject: Re: [SPSSX-L] Factor Analysis

I do not understand your question.
The jpg is not legible.

Please describe your data and what you are looking for?
Are "push" and "pull" factor vocabulary in some discipline?  Do you have items that are designed to measure particular constructs?  Are the scales from previous research or are they just now written?

How did you gather your data? 
What constitutes a case? How many cases do you have?
How many variables do you have?

How did you decide how many factors to retain?

Art Kendall
Social Research Consultants

On 5/12/2012 10:16 AM, Wana wrote:
Hi, I hv some problem with factor analysis..actually, i m doing a research in
tourism studies..so i need analysis with push and pull factor..for every
factor hv variable..based on picture below..varible PS1,PS2,PS3,and PS4  as
escape factor..and Varible PS5,PS6,and PS7 is next factor. how i want to get
factor loading for PS1 until factor 7, eigenvalue for escape factor??i
trying to do it, but still do not understand..so, can u help me?
http://spssx-discussion.1045642.n5.nabble.com/file/n5707166/spss.jpg

--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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

===================== 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
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

RE: Factor Analysis

Wana
Sorry my mistake, actually..3 factor for push factor and 4 factor for pull factor..for syntax, I am using parallel analysis..my reference from this website,  https://people.ok.ubc.ca/brioconn/nfactors/nfactors.html. I am using rawpar for my parallel analysis..but, how to get every factor loading for every variable as shown in table.(my 2nd post) i try to get like literature review..what's ur opinion?should I do group factor analysis to get detail??..sorry..i m beginner in SPSS program..i will tag to u that parallel analysis that i hv done.


Date: Sat, 12 May 2012 08:56:30 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: Factor Analysis

.I hv 4 factor with 13 variable for push factor and for pull factor, I hv 4 factor and 13 variable too..
I take this to mean that you have 13 variables that measure push variables.  You say that there are 4 factors.  How did you decide to retain 4 factors?

Like wise for pull.  How did you decide to retain 4 factors.

Especially with such a small number of cases it greatly adds to your validity to do a parallel analysis. Did you do parallel analysis?

Are you just trying to do a data reduction, or do you intend to relate the scores from the factor analysis to variables other than the 26 in the factor analysis?

What syntax did you use in the factor analyses that came up with 4 factors?
Art Kendall
Social Research Consultants

On 5/12/2012 11:16 AM, Najihah Azmi wrote:
I want to identify motivation factor for tourist motivation.this is main objective for my research.
push and pull factor is a term in tourism study to identify tourist motivation. for example, for push factor..u have some sosio-psychological factor such as relax, prestige and other..to identify that factor, i am using some variable(I mean that PS1 until PS7)..for every factor, it have own their variable but for all varible, I am using liker-scale..strong agree, agree, neutral, disagree and strongly disagree..for this matter, i want to see relationship for every variable to factor..so, how to get factor loading for each variable and eigenvalue for factor?
 
Actually, for this cases, my sampling is 223 respondent..I hv 4 factor with 13 variable for push factor and for pull factor, I hv 4 factor and 13 variable too..
 

Date: Sat, 12 May 2012 11:04:17 -0400
From: [hidden email]
To: [hidden email]
CC: [hidden email]
Subject: Re: [SPSSX-L] Factor Analysis

I do not understand your question.
The jpg is not legible.

Please describe your data and what you are looking for?
Are "push" and "pull" factor vocabulary in some discipline?  Do you have items that are designed to measure particular constructs?  Are the scales from previous research or are they just now written?

How did you gather your data? 
What constitutes a case? How many cases do you have?
How many variables do you have?

How did you decide how many factors to retain?

Art Kendall
Social Research Consultants

On 5/12/2012 10:16 AM, Wana wrote:
Hi, I hv some problem with factor analysis..actually, i m doing a research in
tourism studies..so i need analysis with push and pull factor..for every
factor hv variable..based on picture below..varible PS1,PS2,PS3,and PS4  as
escape factor..and Varible PS5,PS6,and PS7 is next factor. how i want to get
factor loading for PS1 until factor 7, eigenvalue for escape factor??i
trying to do it, but still do not understand..so, can u help me?
http://spssx-discussion.1045642.n5.nabble.com/file/n5707166/spss.jpg

--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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

===================== 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


If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166p5707316.html
To unsubscribe from Factor Analysis, click here.
NAML

Analysis.jpg (159K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Factor Analysis

Wana
In reply to this post by Art Kendall
that picture is an example for push factor


Date: Sat, 12 May 2012 08:56:30 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: Factor Analysis

.I hv 4 factor with 13 variable for push factor and for pull factor, I hv 4 factor and 13 variable too..
I take this to mean that you have 13 variables that measure push variables.  You say that there are 4 factors.  How did you decide to retain 4 factors?

Like wise for pull.  How did you decide to retain 4 factors.

Especially with such a small number of cases it greatly adds to your validity to do a parallel analysis. Did you do parallel analysis?

Are you just trying to do a data reduction, or do you intend to relate the scores from the factor analysis to variables other than the 26 in the factor analysis?

What syntax did you use in the factor analyses that came up with 4 factors?
Art Kendall
Social Research Consultants

On 5/12/2012 11:16 AM, Najihah Azmi wrote:
I want to identify motivation factor for tourist motivation.this is main objective for my research.
push and pull factor is a term in tourism study to identify tourist motivation. for example, for push factor..u have some sosio-psychological factor such as relax, prestige and other..to identify that factor, i am using some variable(I mean that PS1 until PS7)..for every factor, it have own their variable but for all varible, I am using liker-scale..strong agree, agree, neutral, disagree and strongly disagree..for this matter, i want to see relationship for every variable to factor..so, how to get factor loading for each variable and eigenvalue for factor?
 
Actually, for this cases, my sampling is 223 respondent..I hv 4 factor with 13 variable for push factor and for pull factor, I hv 4 factor and 13 variable too..
 

Date: Sat, 12 May 2012 11:04:17 -0400
From: [hidden email]
To: [hidden email]
CC: [hidden email]
Subject: Re: [SPSSX-L] Factor Analysis

I do not understand your question.
The jpg is not legible.

Please describe your data and what you are looking for?
Are "push" and "pull" factor vocabulary in some discipline?  Do you have items that are designed to measure particular constructs?  Are the scales from previous research or are they just now written?

How did you gather your data? 
What constitutes a case? How many cases do you have?
How many variables do you have?

How did you decide how many factors to retain?

Art Kendall
Social Research Consultants

On 5/12/2012 10:16 AM, Wana wrote:
Hi, I hv some problem with factor analysis..actually, i m doing a research in
tourism studies..so i need analysis with push and pull factor..for every
factor hv variable..based on picture below..varible PS1,PS2,PS3,and PS4  as
escape factor..and Varible PS5,PS6,and PS7 is next factor. how i want to get
factor loading for PS1 until factor 7, eigenvalue for escape factor??i
trying to do it, but still do not understand..so, can u help me?
http://spssx-discussion.1045642.n5.nabble.com/file/n5707166/spss.jpg

--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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

===================== 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


If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166p5707316.html
To unsubscribe from Factor Analysis, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

Re: Factor Analysis

Art Kendall
I cannot see the contents of the picture. It seems to be very low resolution.

if I am guessing correctly you would like to see the varimax rotated factor loadings so that you can create a scoring key.
Please paste the syntax you are using so that we can see why it is not already in your listing file.

With parallel analysis my experience is that I often retain the number of factors where the obtained eigenvalue is 1.0 greater than the eigenvalue from the parallel analysis. YMMV  Nevertheless, you still need the rotated loadings so you can see which items go cleanly together with different numbers of rotated factors.

If you paste and post the syntax, the members of the list can tell you how to modify it.
Art Kendall
Social Research Consultants

On 5/13/2012 7:14 AM, Wana wrote:
that picture is an example for push factor


Date: Sat, 12 May 2012 08:56:30 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: Factor Analysis

.I hv 4 factor with 13 variable for push factor and for pull factor, I hv 4 factor and 13 variable too..
I take this to mean that you have 13 variables that measure push variables.  You say that there are 4 factors.  How did you decide to retain 4 factors?

Like wise for pull.  How did you decide to retain 4 factors.

Especially with such a small number of cases it greatly adds to your validity to do a parallel analysis. Did you do parallel analysis?

Are you just trying to do a data reduction, or do you intend to relate the scores from the factor analysis to variables other than the 26 in the factor analysis?

What syntax did you use in the factor analyses that came up with 4 factors?
Art Kendall
Social Research Consultants

On 5/12/2012 11:16 AM, Najihah Azmi wrote:
I want to identify motivation factor for tourist motivation.this is main objective for my research.
push and pull factor is a term in tourism study to identify tourist motivation. for example, for push factor..u have some sosio-psychological factor such as relax, prestige and other..to identify that factor, i am using some variable(I mean that PS1 until PS7)..for every factor, it have own their variable but for all varible, I am using liker-scale..strong agree, agree, neutral, disagree and strongly disagree..for this matter, i want to see relationship for every variable to factor..so, how to get factor loading for each variable and eigenvalue for factor?
 
Actually, for this cases, my sampling is 223 respondent..I hv 4 factor with 13 variable for push factor and for pull factor, I hv 4 factor and 13 variable too..
 

Date: Sat, 12 May 2012 11:04:17 -0400
From: [hidden email]
To: [hidden email]
CC: [hidden email]
Subject: Re: [SPSSX-L] Factor Analysis

I do not understand your question.
The jpg is not legible.

Please describe your data and what you are looking for?
Are "push" and "pull" factor vocabulary in some discipline?  Do you have items that are designed to measure particular constructs?  Are the scales from previous research or are they just now written?

How did you gather your data? 
What constitutes a case? How many cases do you have?
How many variables do you have?

How did you decide how many factors to retain?

Art Kendall
Social Research Consultants

On 5/12/2012 10:16 AM, Wana wrote:
Hi, I hv some problem with factor analysis..actually, i m doing a research in
tourism studies..so i need analysis with push and pull factor..for every
factor hv variable..based on picture below..varible PS1,PS2,PS3,and PS4  as
escape factor..and Varible PS5,PS6,and PS7 is next factor. how i want to get
factor loading for PS1 until factor 7, eigenvalue for escape factor??i
trying to do it, but still do not understand..so, can u help me?
http://spssx-discussion.1045642.n5.nabble.com/file/n5707166/spss.jpg

--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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

===================== 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


If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166p5707316.html
To unsubscribe from Factor Analysis, click here.
NAML


View this message in context: RE: Factor Analysis
Sent from the SPSSX Discussion mailing list archive at Nabble.com.
===================== 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
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: Factor Analysis

Wana
This my syntax..

Parallel Analysis Program For Raw Data and Data Permutations.

* To run this program you need to first specify the data
  for analysis and then RUN, all at once, the commands
  from the MATRIX statement to the END MATRIX statement.

* This program conducts parallel analyses on data files in which
  the rows of the data matrix are cases/individuals and the
  columns are variables;  Data are read/entered into the program
  using the GET command (see the GET command below);  The GET
  command reads an SPSS data file, which can be either the
  current, active SPSS data file or a previously saved data file;
  A valid filename/location must be specified on the GET command;
  A subset of variables for the analyses can be specified by using
  the "/ VAR =" subcommand with the GET statement;  There can be
  no missing values.

* You must also specify:
  -- the # of parallel data sets for the analyses;
  -- the desired percentile of the distribution and random
     data eigenvalues;
  -- whether principal components analyses or principal axis/common
     factor analysis are to be conducted, and
  -- whether normally distributed random data generation or
     permutations of the raw data set are to be used in the
     parallel analyses.

* Permutations of the raw data set can be time consuming;
  Each parallel data set is based on column-wise random shufflings
  of the values in the raw data matrix using Castellan's (1992,
  BRMIC, 24, 72-77) algorithm; The distributions of the original
  raw variables are exactly preserved in the shuffled versions used
  in the parallel analyses; Permutations of the raw data set are
  thus highly accurate and most relevant, especially in cases where
  the raw data are not normally distributed or when they do not meet
  the assumption of multivariate normality (see Longman & Holden,
  1992, BRMIC, 24, 493, for a Fortran version); If you would
  like to go this route, it is perhaps best to (1) first run a
  normally distributed random data generation parallel analysis to
  familiarize yourself with the program and to get a ballpark
  reference point for the number of factors/components;
  (2) then run a permutations of the raw data parallel analysis
  using a small number of datasets (e.g., 100), just to see how long
  the program takes to run; then (3) run a permutations of the raw
  data parallel analysis using the number of parallel data sets that
  you would like use for your final analyses; 1000 datasets are
  usually sufficient, although more datasets should be used if
  there are close calls.


* These next commands generate artificial raw data
  (500 cases) that can be used for a trial-run of
  the program, instead of using your own raw data;
  Just select and run this whole file; However, make sure to
  delete the artificial data commands before attempting to
  run your own data.


set mxloops=9000 printback=off width=80  seed = 1953125.
matrix.

* Enter the name/location of the data file for analyses after "FILE =";
  If you specify "FILE = *", then the program will read the current,
  active SPSS data file; Alternatively, enter the name/location
  of a previously saved SPSS data file instead of "*";
  you can use the "/ VAR =" subcommand after "/ missing=omit"
  subcommand to select variables for the analyses.
GET raw / FILE = * / missing=omit / VAR = PS1 to PS13.

* Enter the desired number of parallel data sets here.
compute ndatsets =223.

* Enter the desired percentile here.
compute percent  = 95.

* Enter either
  1 for principal components analysis, or
  2 for principal axis/common factor analysis.
compute kind = 1 .

* Enter either
  1 for normally distributed random data generation parallel analysis, or
  2 for permutations of the raw data set.
compute randtype = 1.


****************** End of user specifications. ******************

compute ncases   = nrow(raw).
compute nvars    = ncol(raw).

* principal components analysis & random normal data generation.
do if (kind = 1 and randtype = 1).
compute nm1 = 1 / (ncases-1).
compute vcv = nm1 * (sscp(raw) - ((t(csum(raw))*csum(raw))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute realeval = eval(d * vcv * d).
compute evals = make(nvars,ndatsets,-9999).
loop #nds = 1 to ndatsets.
compute x = sqrt(2 * (ln(uniform(ncases,nvars)) * -1) ) &*
            cos(6.283185 * uniform(ncases,nvars) ).
compute vcv = nm1 * (sscp(x) - ((t(csum(x))*csum(x))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute evals(:,#nds) = eval(d * vcv * d).
end loop.
end if.

* principal components analysis & raw data permutation.
do if (kind = 1 and randtype = 2).
compute nm1 = 1 / (ncases-1).
compute vcv = nm1 * (sscp(raw) - ((t(csum(raw))*csum(raw))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute realeval = eval(d * vcv * d).
compute evals = make(nvars,ndatsets,-9999).
loop #nds = 1 to ndatsets.
compute x = raw.
loop #c = 1 to nvars.
loop #r = 1 to (ncases -1).
compute k = trunc( (ncases - #r + 1) * uniform(1,1) + 1 )  + #r - 1.
compute d = x(#r,#c).
compute x(#r,#c) = x(k,#c).
compute x(k,#c) = d.
end loop.
end loop.
compute vcv = nm1 * (sscp(x) - ((t(csum(x))*csum(x))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute evals(:,#nds) = eval(d * vcv * d).
end loop.
end if.

* PAF/common factor analysis & random normal data generation.
do if (kind = 2 and randtype = 1).
compute nm1 = 1 / (ncases-1).
compute vcv = nm1 * (sscp(raw) - ((t(csum(raw))*csum(raw))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute cr = (d * vcv * d).
compute smc = 1 - (1 &/ diag(inv(cr)) ).
call setdiag(cr,smc).
compute realeval = eval(cr).
compute evals = make(nvars,ndatsets,-9999).
compute nm1 = 1 / (ncases-1).
loop #nds = 1 to ndatsets.
compute x = sqrt(2 * (ln(uniform(ncases,nvars)) * -1) ) &*
            cos(6.283185 * uniform(ncases,nvars) ).
compute vcv = nm1 * (sscp(x) - ((t(csum(x))*csum(x))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute r = d * vcv * d.
compute smc = 1 - (1 &/ diag(inv(r)) ).
call setdiag(r,smc).
compute evals(:,#nds) = eval(r).
end loop.
end if.

* PAF/common factor analysis & raw data permutation.
do if (kind = 2 and randtype = 2).
compute nm1 = 1 / (ncases-1).
compute vcv = nm1 * (sscp(raw) - ((t(csum(raw))*csum(raw))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute cr = (d * vcv * d).
compute smc = 1 - (1 &/ diag(inv(cr)) ).
call setdiag(cr,smc).
compute realeval = eval(cr).
compute evals = make(nvars,ndatsets,-9999).
compute nm1 = 1 / (ncases-1).
loop #nds = 1 to ndatsets.
compute x = raw.
loop #c = 1 to nvars.
loop #r = 1 to (ncases -1).
compute k = trunc( (ncases - #r + 1) * uniform(1,1) + 1 )  + #r - 1.
compute d = x(#r,#c).
compute x(#r,#c) = x(k,#c).
compute x(k,#c) = d.
end loop.
end loop.
compute vcv = nm1 * (sscp(x) - ((t(csum(x))*csum(x))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute r = d * vcv * d.
compute smc = 1 - (1 &/ diag(inv(r)) ).
call setdiag(r,smc).
compute evals(:,#nds) = eval(r).
end loop.
end if.

* identifying the eigenvalues corresponding to the desired percentile.
compute num = rnd((percent*ndatsets)/100).
compute results = { t(1:nvars), realeval, t(1:nvars), t(1:nvars) }.
loop #root = 1 to nvars.
compute ranks = rnkorder(evals(#root,:)).
loop #col = 1 to ndatsets.
do if (ranks(1,#col) = num).
compute results(#root,4) = evals(#root,#col).
break.
end if.
end loop.
end loop.
compute results(:,3) = rsum(evals) / ndatsets.

print /title="PARALLEL ANALYSIS:".
do if (kind = 1 and randtype = 1).
print /title="Principal Components & Random Normal Data Generation".
else if (kind = 1 and randtype = 2).
print /title="Principal Components & Raw Data Permutation".
else if (kind = 2 and randtype = 1).
print /title="PAF/Common Factor Analysis & Random Normal Data Generation".
else if (kind = 2 and randtype = 2).
print /title="PAF/Common Factor Analysis & Raw Data Permutation".
end if.
compute specifs = {ncases; nvars; ndatsets; percent}.
print specifs /title="Specifications for this Run:"
 /rlabels="Ncases" "Nvars" "Ndatsets" "Percent".
print results
 /title="Raw Data Eigenvalues, & Mean & Percentile Random Data Eigenvalues"
 /clabels="Root" "Raw Data" "Means" "Prcntyle"  /format "f12.6".

do if   (kind = 2).
print / space = 1.
print /title="Warning: Parallel analyses of adjusted correlation matrices".
print /title="eg, with SMCs on the diagonal, tend to indicate more factors".
print /title="than warranted (Buja, A., & Eyuboglu, N., 1992, Remarks on parallel".
print /title="analysis. Multivariate Behavioral Research, 27, 509-540.).".
print /title="The eigenvalues for trivial, negligible factors in the real".
print /title="data commonly surpass corresponding random data eigenvalues".
print /title="for the same roots. The eigenvalues from parallel analyses".
print /title="can be used to determine the real data eigenvalues that are".
print /title="beyond chance, but additional procedures should then be used".
print /title="to trim trivial factors.".
print / space = 2.
print /title="Principal components eigenvalues are often used to determine".
print /title="the number of common factors. This is the default in most".
print /title="statistical software packages, and it is the primary practice".
print /title="in the literature. It is also the method used by many factor".
print /title="analysis experts, including Cattell, who often examined".
print /title="principal components eigenvalues in his scree plots to determine".
print /title="the number of common factors. But others believe this common".
print /title="practice is wrong. Principal components eigenvalues are based".
print /title="on all of the variance in correlation matrices, including both".
print /title="the variance that is shared among variables and the variances".
print /title="that are unique to the variables. In contrast, principal".
print /title="axis eigenvalues are based solely on the shared variance".
print /title="among the variables. The two procedures are qualitatively".
print /title="different. Some therefore claim that the eigenvalues from one".
print /title="extraction method should not be used to determine".
print /title="the number of factors for the other extraction method.".
print /title="The issue remains neglected and unsettled.".
end if.

compute root      = results(:,1).
compute rawdata = results(:,2).
compute percntyl = results(:,4).

save results /outfile= 'screedata.sav' / var=root rawdata means percntyl .

end matrix.

* plots the eigenvalues, by root, for the real/raw data and for the random data;
  This command works in SPSS 12, but not in all earlier versions.
GET file= 'screedata.sav'.
TSPLOT VARIABLES= rawdata means percntyl /ID= root /NOLOG.
Reply | Threaded
Open this post in threaded view
|

Re: Factor Analysis

Art Kendall
that is the syntax to do the parallel analysis.

What is the syntax you used to do the actual factor analysis?
Art Kendall
Social Research Consultants

On 5/13/2012 11:29 AM, Wana wrote:
This my syntax..

Parallel Analysis Program For Raw Data and Data Permutations.

* To run this program you need to first specify the data
  for analysis and then RUN, all at once, the commands
  from the MATRIX statement to the END MATRIX statement.

* This program conducts parallel analyses on data files in which
  the rows of the data matrix are cases/individuals and the
  columns are variables;  Data are read/entered into the program
  using the GET command (see the GET command below);  The GET
  command reads an SPSS data file, which can be either the
  current, active SPSS data file or a previously saved data file;
  A valid filename/location must be specified on the GET command;
  A subset of variables for the analyses can be specified by using
  the "/ VAR =" subcommand with the GET statement;  There can be
  no missing values.

* You must also specify:
  -- the # of parallel data sets for the analyses;
  -- the desired percentile of the distribution and random
     data eigenvalues;
  -- whether principal components analyses or principal axis/common
     factor analysis are to be conducted, and
  -- whether normally distributed random data generation or
     permutations of the raw data set are to be used in the
     parallel analyses.

* Permutations of the raw data set can be time consuming;
  Each parallel data set is based on column-wise random shufflings
  of the values in the raw data matrix using Castellan's (1992,
  BRMIC, 24, 72-77) algorithm; The distributions of the original
  raw variables are exactly preserved in the shuffled versions used
  in the parallel analyses; Permutations of the raw data set are
  thus highly accurate and most relevant, especially in cases where
  the raw data are not normally distributed or when they do not meet
  the assumption of multivariate normality (see Longman & Holden,
  1992, BRMIC, 24, 493, for a Fortran version); If you would
  like to go this route, it is perhaps best to (1) first run a
  normally distributed random data generation parallel analysis to
  familiarize yourself with the program and to get a ballpark
  reference point for the number of factors/components;
  (2) then run a permutations of the raw data parallel analysis
  using a small number of datasets (e.g., 100), just to see how long
  the program takes to run; then (3) run a permutations of the raw
  data parallel analysis using the number of parallel data sets that
  you would like use for your final analyses; 1000 datasets are
  usually sufficient, although more datasets should be used if
  there are close calls.


* These next commands generate artificial raw data
  (500 cases) that can be used for a trial-run of
  the program, instead of using your own raw data;
  Just select and run this whole file; However, make sure to
  delete the artificial data commands before attempting to
  run your own data.


set mxloops=9000 printback=off width=80  seed = 1953125.
matrix.

* Enter the name/location of the data file for analyses after "FILE =";
  If you specify "FILE = *", then the program will read the current,
  active SPSS data file; Alternatively, enter the name/location
  of a previously saved SPSS data file instead of "*";
  you can use the "/ VAR =" subcommand after "/ missing=omit"
  subcommand to select variables for the analyses.
GET raw / FILE = * / missing=omit / VAR = PS1 to PS13.

* Enter the desired number of parallel data sets here.
compute ndatsets =223.

* Enter the desired percentile here.
compute percent  = 95.

* Enter either
  1 for principal components analysis, or
  2 for principal axis/common factor analysis.
compute kind = 1 .

* Enter either
  1 for normally distributed random data generation parallel analysis, or
  2 for permutations of the raw data set.
compute randtype = 1.


****************** End of user specifications. ******************

compute ncases   = nrow(raw).
compute nvars    = ncol(raw).

* principal components analysis & random normal data generation.
do if (kind = 1 and randtype = 1).
compute nm1 = 1 / (ncases-1).
compute vcv = nm1 * (sscp(raw) - ((t(csum(raw))*csum(raw))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute realeval = eval(d * vcv * d).
compute evals = make(nvars,ndatsets,-9999).
loop #nds = 1 to ndatsets.
compute x = sqrt(2 * (ln(uniform(ncases,nvars)) * -1) ) &*
            cos(6.283185 * uniform(ncases,nvars) ).
compute vcv = nm1 * (sscp(x) - ((t(csum(x))*csum(x))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute evals(:,#nds) = eval(d * vcv * d).
end loop.
end if.

* principal components analysis & raw data permutation.
do if (kind = 1 and randtype = 2).
compute nm1 = 1 / (ncases-1).
compute vcv = nm1 * (sscp(raw) - ((t(csum(raw))*csum(raw))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute realeval = eval(d * vcv * d).
compute evals = make(nvars,ndatsets,-9999).
loop #nds = 1 to ndatsets.
compute x = raw.
loop #c = 1 to nvars.
loop #r = 1 to (ncases -1).
compute k = trunc( (ncases - #r + 1) * uniform(1,1) + 1 )  + #r - 1.
compute d = x(#r,#c).
compute x(#r,#c) = x(k,#c).
compute x(k,#c) = d.
end loop.
end loop.
compute vcv = nm1 * (sscp(x) - ((t(csum(x))*csum(x))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute evals(:,#nds) = eval(d * vcv * d).
end loop.
end if.

* PAF/common factor analysis & random normal data generation.
do if (kind = 2 and randtype = 1).
compute nm1 = 1 / (ncases-1).
compute vcv = nm1 * (sscp(raw) - ((t(csum(raw))*csum(raw))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute cr = (d * vcv * d).
compute smc = 1 - (1 &/ diag(inv(cr)) ).
call setdiag(cr,smc).
compute realeval = eval(cr).
compute evals = make(nvars,ndatsets,-9999).
compute nm1 = 1 / (ncases-1).
loop #nds = 1 to ndatsets.
compute x = sqrt(2 * (ln(uniform(ncases,nvars)) * -1) ) &*
            cos(6.283185 * uniform(ncases,nvars) ).
compute vcv = nm1 * (sscp(x) - ((t(csum(x))*csum(x))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute r = d * vcv * d.
compute smc = 1 - (1 &/ diag(inv(r)) ).
call setdiag(r,smc).
compute evals(:,#nds) = eval(r).
end loop.
end if.

* PAF/common factor analysis & raw data permutation.
do if (kind = 2 and randtype = 2).
compute nm1 = 1 / (ncases-1).
compute vcv = nm1 * (sscp(raw) - ((t(csum(raw))*csum(raw))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute cr = (d * vcv * d).
compute smc = 1 - (1 &/ diag(inv(cr)) ).
call setdiag(cr,smc).
compute realeval = eval(cr).
compute evals = make(nvars,ndatsets,-9999).
compute nm1 = 1 / (ncases-1).
loop #nds = 1 to ndatsets.
compute x = raw.
loop #c = 1 to nvars.
loop #r = 1 to (ncases -1).
compute k = trunc( (ncases - #r + 1) * uniform(1,1) + 1 )  + #r - 1.
compute d = x(#r,#c).
compute x(#r,#c) = x(k,#c).
compute x(k,#c) = d.
end loop.
end loop.
compute vcv = nm1 * (sscp(x) - ((t(csum(x))*csum(x))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute r = d * vcv * d.
compute smc = 1 - (1 &/ diag(inv(r)) ).
call setdiag(r,smc).
compute evals(:,#nds) = eval(r).
end loop.
end if.

* identifying the eigenvalues corresponding to the desired percentile.
compute num = rnd((percent*ndatsets)/100).
compute results = { t(1:nvars), realeval, t(1:nvars), t(1:nvars) }.
loop #root = 1 to nvars.
compute ranks = rnkorder(evals(#root,:)).
loop #col = 1 to ndatsets.
do if (ranks(1,#col) = num).
compute results(#root,4) = evals(#root,#col).
break.
end if.
end loop.
end loop.
compute results(:,3) = rsum(evals) / ndatsets.

print /title="PARALLEL ANALYSIS:".
do if (kind = 1 and randtype = 1).
print /title="Principal Components & Random Normal Data Generation".
else if (kind = 1 and randtype = 2).
print /title="Principal Components & Raw Data Permutation".
else if (kind = 2 and randtype = 1).
print /title="PAF/Common Factor Analysis & Random Normal Data Generation".
else if (kind = 2 and randtype = 2).
print /title="PAF/Common Factor Analysis & Raw Data Permutation".
end if.
compute specifs = {ncases; nvars; ndatsets; percent}.
print specifs /title="Specifications for this Run:"
 /rlabels="Ncases" "Nvars" "Ndatsets" "Percent".
print results
 /title="Raw Data Eigenvalues, & Mean & Percentile Random Data Eigenvalues"
 /clabels="Root" "Raw Data" "Means" "Prcntyle"  /format "f12.6".

do if   (kind = 2).
print / space = 1.
print /title="Warning: Parallel analyses of adjusted correlation matrices".
print /title="eg, with SMCs on the diagonal, tend to indicate more factors".
print /title="than warranted (Buja, A., & Eyuboglu, N., 1992, Remarks on
parallel".
print /title="analysis. Multivariate Behavioral Research, 27, 509-540.).".
print /title="The eigenvalues for trivial, negligible factors in the real".
print /title="data commonly surpass corresponding random data eigenvalues".
print /title="for the same roots. The eigenvalues from parallel analyses".
print /title="can be used to determine the real data eigenvalues that are".
print /title="beyond chance, but additional procedures should then be used".
print /title="to trim trivial factors.".
print / space = 2.
print /title="Principal components eigenvalues are often used to determine".
print /title="the number of common factors. This is the default in most".
print /title="statistical software packages, and it is the primary
practice".
print /title="in the literature. It is also the method used by many factor".
print /title="analysis experts, including Cattell, who often examined".
print /title="principal components eigenvalues in his scree plots to
determine".
print /title="the number of common factors. But others believe this common".
print /title="practice is wrong. Principal components eigenvalues are
based".
print /title="on all of the variance in correlation matrices, including
both".
print /title="the variance that is shared among variables and the
variances".
print /title="that are unique to the variables. In contrast, principal".
print /title="axis eigenvalues are based solely on the shared variance".
print /title="among the variables. The two procedures are qualitatively".
print /title="different. Some therefore claim that the eigenvalues from
one".
print /title="extraction method should not be used to determine".
print /title="the number of factors for the other extraction method.".
print /title="The issue remains neglected and unsettled.".
end if.

compute root      = results(:,1).
compute rawdata = results(:,2).
compute percntyl = results(:,4).

save results /outfile= 'screedata.sav' / var=root rawdata means percntyl .

end matrix.

* plots the eigenvalues, by root, for the real/raw data and for the random
data;
  This command works in SPSS 12, but not in all earlier versions.
GET file= 'screedata.sav'.
TSPLOT VARIABLES= rawdata means percntyl /ID= root /NOLOG.


--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166p5708234.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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

===================== 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
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

RE: Factor Analysis

Wana
Err..for factor analysis, I'm not using syntax but use window or dialog box..(from analyze-dimension reduction-factor)..


Date: Sun, 13 May 2012 08:48:30 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: Factor Analysis

that is the syntax to do the parallel analysis.

What is the syntax you used to do the actual factor analysis?
Art Kendall
Social Research Consultants

On 5/13/2012 11:29 AM, Wana wrote:
This my syntax..

Parallel Analysis Program For Raw Data and Data Permutations.

* To run this program you need to first specify the data
  for analysis and then RUN, all at once, the commands
  from the MATRIX statement to the END MATRIX statement.

* This program conducts parallel analyses on data files in which
  the rows of the data matrix are cases/individuals and the
  columns are variables;  Data are read/entered into the program
  using the GET command (see the GET command below);  The GET
  command reads an SPSS data file, which can be either the
  current, active SPSS data file or a previously saved data file;
  A valid filename/location must be specified on the GET command;
  A subset of variables for the analyses can be specified by using
  the "/ VAR =" subcommand with the GET statement;  There can be
  no missing values.

* You must also specify:
  -- the # of parallel data sets for the analyses;
  -- the desired percentile of the distribution and random
     data eigenvalues;
  -- whether principal components analyses or principal axis/common
     factor analysis are to be conducted, and
  -- whether normally distributed random data generation or
     permutations of the raw data set are to be used in the
     parallel analyses.

* Permutations of the raw data set can be time consuming;
  Each parallel data set is based on column-wise random shufflings
  of the values in the raw data matrix using Castellan's (1992,
  BRMIC, 24, 72-77) algorithm; The distributions of the original
  raw variables are exactly preserved in the shuffled versions used
  in the parallel analyses; Permutations of the raw data set are
  thus highly accurate and most relevant, especially in cases where
  the raw data are not normally distributed or when they do not meet
  the assumption of multivariate normality (see Longman & Holden,
  1992, BRMIC, 24, 493, for a Fortran version); If you would
  like to go this route, it is perhaps best to (1) first run a
  normally distributed random data generation parallel analysis to
  familiarize yourself with the program and to get a ballpark
  reference point for the number of factors/components;
  (2) then run a permutations of the raw data parallel analysis
  using a small number of datasets (e.g., 100), just to see how long
  the program takes to run; then (3) run a permutations of the raw
  data parallel analysis using the number of parallel data sets that
  you would like use for your final analyses; 1000 datasets are
  usually sufficient, although more datasets should be used if
  there are close calls.


* These next commands generate artificial raw data
  (500 cases) that can be used for a trial-run of
  the program, instead of using your own raw data;
  Just select and run this whole file; However, make sure to
  delete the artificial data commands before attempting to
  run your own data.


set mxloops=9000 printback=off width=80  seed = 1953125.
matrix.

* Enter the name/location of the data file for analyses after "FILE =";
  If you specify "FILE = *", then the program will read the current,
  active SPSS data file; Alternatively, enter the name/location
  of a previously saved SPSS data file instead of "*";
  you can use the "/ VAR =" subcommand after "/ missing=omit"
  subcommand to select variables for the analyses.
GET raw / FILE = * / missing=omit / VAR = PS1 to PS13.

* Enter the desired number of parallel data sets here.
compute ndatsets =223.

* Enter the desired percentile here.
compute percent  = 95.

* Enter either
  1 for principal components analysis, or
  2 for principal axis/common factor analysis.
compute kind = 1 .

* Enter either
  1 for normally distributed random data generation parallel analysis, or
  2 for permutations of the raw data set.
compute randtype = 1.


****************** End of user specifications. ******************

compute ncases   = nrow(raw).
compute nvars    = ncol(raw).

* principal components analysis & random normal data generation.
do if (kind = 1 and randtype = 1).
compute nm1 = 1 / (ncases-1).
compute vcv = nm1 * (sscp(raw) - ((t(csum(raw))*csum(raw))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute realeval = eval(d * vcv * d).
compute evals = make(nvars,ndatsets,-9999).
loop #nds = 1 to ndatsets.
compute x = sqrt(2 * (ln(uniform(ncases,nvars)) * -1) ) &*
            cos(6.283185 * uniform(ncases,nvars) ).
compute vcv = nm1 * (sscp(x) - ((t(csum(x))*csum(x))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute evals(:,#nds) = eval(d * vcv * d).
end loop.
end if.

* principal components analysis & raw data permutation.
do if (kind = 1 and randtype = 2).
compute nm1 = 1 / (ncases-1).
compute vcv = nm1 * (sscp(raw) - ((t(csum(raw))*csum(raw))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute realeval = eval(d * vcv * d).
compute evals = make(nvars,ndatsets,-9999).
loop #nds = 1 to ndatsets.
compute x = raw.
loop #c = 1 to nvars.
loop #r = 1 to (ncases -1).
compute k = trunc( (ncases - #r + 1) * uniform(1,1) + 1 )  + #r - 1.
compute d = x(#r,#c).
compute x(#r,#c) = x(k,#c).
compute x(k,#c) = d.
end loop.
end loop.
compute vcv = nm1 * (sscp(x) - ((t(csum(x))*csum(x))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute evals(:,#nds) = eval(d * vcv * d).
end loop.
end if.

* PAF/common factor analysis & random normal data generation.
do if (kind = 2 and randtype = 1).
compute nm1 = 1 / (ncases-1).
compute vcv = nm1 * (sscp(raw) - ((t(csum(raw))*csum(raw))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute cr = (d * vcv * d).
compute smc = 1 - (1 &/ diag(inv(cr)) ).
call setdiag(cr,smc).
compute realeval = eval(cr).
compute evals = make(nvars,ndatsets,-9999).
compute nm1 = 1 / (ncases-1).
loop #nds = 1 to ndatsets.
compute x = sqrt(2 * (ln(uniform(ncases,nvars)) * -1) ) &*
            cos(6.283185 * uniform(ncases,nvars) ).
compute vcv = nm1 * (sscp(x) - ((t(csum(x))*csum(x))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute r = d * vcv * d.
compute smc = 1 - (1 &/ diag(inv(r)) ).
call setdiag(r,smc).
compute evals(:,#nds) = eval(r).
end loop.
end if.

* PAF/common factor analysis & raw data permutation.
do if (kind = 2 and randtype = 2).
compute nm1 = 1 / (ncases-1).
compute vcv = nm1 * (sscp(raw) - ((t(csum(raw))*csum(raw))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute cr = (d * vcv * d).
compute smc = 1 - (1 &/ diag(inv(cr)) ).
call setdiag(cr,smc).
compute realeval = eval(cr).
compute evals = make(nvars,ndatsets,-9999).
compute nm1 = 1 / (ncases-1).
loop #nds = 1 to ndatsets.
compute x = raw.
loop #c = 1 to nvars.
loop #r = 1 to (ncases -1).
compute k = trunc( (ncases - #r + 1) * uniform(1,1) + 1 )  + #r - 1.
compute d = x(#r,#c).
compute x(#r,#c) = x(k,#c).
compute x(k,#c) = d.
end loop.
end loop.
compute vcv = nm1 * (sscp(x) - ((t(csum(x))*csum(x))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute r = d * vcv * d.
compute smc = 1 - (1 &/ diag(inv(r)) ).
call setdiag(r,smc).
compute evals(:,#nds) = eval(r).
end loop.
end if.

* identifying the eigenvalues corresponding to the desired percentile.
compute num = rnd((percent*ndatsets)/100).
compute results = { t(1:nvars), realeval, t(1:nvars), t(1:nvars) }.
loop #root = 1 to nvars.
compute ranks = rnkorder(evals(#root,:)).
loop #col = 1 to ndatsets.
do if (ranks(1,#col) = num).
compute results(#root,4) = evals(#root,#col).
break.
end if.
end loop.
end loop.
compute results(:,3) = rsum(evals) / ndatsets.

print /title="PARALLEL ANALYSIS:".
do if (kind = 1 and randtype = 1).
print /title="Principal Components & Random Normal Data Generation".
else if (kind = 1 and randtype = 2).
print /title="Principal Components & Raw Data Permutation".
else if (kind = 2 and randtype = 1).
print /title="PAF/Common Factor Analysis & Random Normal Data Generation".
else if (kind = 2 and randtype = 2).
print /title="PAF/Common Factor Analysis & Raw Data Permutation".
end if.
compute specifs = {ncases; nvars; ndatsets; percent}.
print specifs /title="Specifications for this Run:"
 /rlabels="Ncases" "Nvars" "Ndatsets" "Percent".
print results
 /title="Raw Data Eigenvalues, & Mean & Percentile Random Data Eigenvalues"
 /clabels="Root" "Raw Data" "Means" "Prcntyle"  /format "f12.6".

do if   (kind = 2).
print / space = 1.
print /title="Warning: Parallel analyses of adjusted correlation matrices".
print /title="eg, with SMCs on the diagonal, tend to indicate more factors".
print /title="than warranted (Buja, A., & Eyuboglu, N., 1992, Remarks on
parallel".
print /title="analysis. Multivariate Behavioral Research, 27, 509-540.).".
print /title="The eigenvalues for trivial, negligible factors in the real".
print /title="data commonly surpass corresponding random data eigenvalues".
print /title="for the same roots. The eigenvalues from parallel analyses".
print /title="can be used to determine the real data eigenvalues that are".
print /title="beyond chance, but additional procedures should then be used".
print /title="to trim trivial factors.".
print / space = 2.
print /title="Principal components eigenvalues are often used to determine".
print /title="the number of common factors. This is the default in most".
print /title="statistical software packages, and it is the primary
practice".
print /title="in the literature. It is also the method used by many factor".
print /title="analysis experts, including Cattell, who often examined".
print /title="principal components eigenvalues in his scree plots to
determine".
print /title="the number of common factors. But others believe this common".
print /title="practice is wrong. Principal components eigenvalues are
based".
print /title="on all of the variance in correlation matrices, including
both".
print /title="the variance that is shared among variables and the
variances".
print /title="that are unique to the variables. In contrast, principal".
print /title="axis eigenvalues are based solely on the shared variance".
print /title="among the variables. The two procedures are qualitatively".
print /title="different. Some therefore claim that the eigenvalues from
one".
print /title="extraction method should not be used to determine".
print /title="the number of factors for the other extraction method.".
print /title="The issue remains neglected and unsettled.".
end if.

compute root      = results(:,1).
compute rawdata = results(:,2).
compute percntyl = results(:,4).

save results /outfile= 'screedata.sav' / var=root rawdata means percntyl .

end matrix.

* plots the eigenvalues, by root, for the real/raw data and for the random
data;
  This command works in SPSS 12, but not in all earlier versions.
GET file= 'screedata.sav'.
TSPLOT VARIABLES= rawdata means percntyl /ID= root /NOLOG.


--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166p5708234.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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

===================== 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


If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166p5708248.html
To unsubscribe from Factor Analysis, click here.
NAML

result.jpg (178K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Factor Analysis

Art Kendall
Even when using the menus etc, it is a good practice to exit via <paste> rather than <ok>.

The GUI is an excellent way to get a _first draft_ of your syntax.  As you become more skilled, more familiar with your data, and better understand the output, you refine your syntax.  This is much the same as writing a letter, a poem, journal article, etc.


That helps with many things.
1) doing any analysis is an iterative procedure.
2) it give you an audit trail that helps you understand what you are doing, facilitates QA review, and makes it more efficient for one to obtain help from lists, etc.

Art Kendall
Social Research Consultants

On 5/13/2012 12:10 PM, Wana wrote:
Err..for factor analysis, I'm not using syntax but use window or dialog box..(from analyze-dimension reduction-factor)..


Date: Sun, 13 May 2012 08:48:30 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: Factor Analysis

that is the syntax to do the parallel analysis.

What is the syntax you used to do the actual factor analysis?
Art Kendall
Social Research Consultants

On 5/13/2012 11:29 AM, Wana wrote:
This my syntax..

Parallel Analysis Program For Raw Data and Data Permutations.

* To run this program you need to first specify the data
  for analysis and then RUN, all at once, the commands
  from the MATRIX statement to the END MATRIX statement.

* This program conducts parallel analyses on data files in which
  the rows of the data matrix are cases/individuals and the
  columns are variables;  Data are read/entered into the program
  using the GET command (see the GET command below);  The GET
  command reads an SPSS data file, which can be either the
  current, active SPSS data file or a previously saved data file;
  A valid filename/location must be specified on the GET command;
  A subset of variables for the analyses can be specified by using
  the "/ VAR =" subcommand with the GET statement;  There can be
  no missing values.

* You must also specify:
  -- the # of parallel data sets for the analyses;
  -- the desired percentile of the distribution and random
     data eigenvalues;
  -- whether principal components analyses or principal axis/common
     factor analysis are to be conducted, and
  -- whether normally distributed random data generation or
     permutations of the raw data set are to be used in the
     parallel analyses.

* Permutations of the raw data set can be time consuming;
  Each parallel data set is based on column-wise random shufflings
  of the values in the raw data matrix using Castellan's (1992,
  BRMIC, 24, 72-77) algorithm; The distributions of the original
  raw variables are exactly preserved in the shuffled versions used
  in the parallel analyses; Permutations of the raw data set are
  thus highly accurate and most relevant, especially in cases where
  the raw data are not normally distributed or when they do not meet
  the assumption of multivariate normality (see Longman & Holden,
  1992, BRMIC, 24, 493, for a Fortran version); If you would
  like to go this route, it is perhaps best to (1) first run a
  normally distributed random data generation parallel analysis to
  familiarize yourself with the program and to get a ballpark
  reference point for the number of factors/components;
  (2) then run a permutations of the raw data parallel analysis
  using a small number of datasets (e.g., 100), just to see how long
  the program takes to run; then (3) run a permutations of the raw
  data parallel analysis using the number of parallel data sets that
  you would like use for your final analyses; 1000 datasets are
  usually sufficient, although more datasets should be used if
  there are close calls.


* These next commands generate artificial raw data
  (500 cases) that can be used for a trial-run of
  the program, instead of using your own raw data;
  Just select and run this whole file; However, make sure to
  delete the artificial data commands before attempting to
  run your own data.


set mxloops=9000 printback=off width=80  seed = 1953125.
matrix.

* Enter the name/location of the data file for analyses after "FILE =";
  If you specify "FILE = *", then the program will read the current,
  active SPSS data file; Alternatively, enter the name/location
  of a previously saved SPSS data file instead of "*";
  you can use the "/ VAR =" subcommand after "/ missing=omit"
  subcommand to select variables for the analyses.
GET raw / FILE = * / missing=omit / VAR = PS1 to PS13.

* Enter the desired number of parallel data sets here.
compute ndatsets =223.

* Enter the desired percentile here.
compute percent  = 95.

* Enter either
  1 for principal components analysis, or
  2 for principal axis/common factor analysis.
compute kind = 1 .

* Enter either
  1 for normally distributed random data generation parallel analysis, or
  2 for permutations of the raw data set.
compute randtype = 1.


****************** End of user specifications. ******************

compute ncases   = nrow(raw).
compute nvars    = ncol(raw).

* principal components analysis & random normal data generation.
do if (kind = 1 and randtype = 1).
compute nm1 = 1 / (ncases-1).
compute vcv = nm1 * (sscp(raw) - ((t(csum(raw))*csum(raw))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute realeval = eval(d * vcv * d).
compute evals = make(nvars,ndatsets,-9999).
loop #nds = 1 to ndatsets.
compute x = sqrt(2 * (ln(uniform(ncases,nvars)) * -1) ) &*
            cos(6.283185 * uniform(ncases,nvars) ).
compute vcv = nm1 * (sscp(x) - ((t(csum(x))*csum(x))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute evals(:,#nds) = eval(d * vcv * d).
end loop.
end if.

* principal components analysis & raw data permutation.
do if (kind = 1 and randtype = 2).
compute nm1 = 1 / (ncases-1).
compute vcv = nm1 * (sscp(raw) - ((t(csum(raw))*csum(raw))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute realeval = eval(d * vcv * d).
compute evals = make(nvars,ndatsets,-9999).
loop #nds = 1 to ndatsets.
compute x = raw.
loop #c = 1 to nvars.
loop #r = 1 to (ncases -1).
compute k = trunc( (ncases - #r + 1) * uniform(1,1) + 1 )  + #r - 1.
compute d = x(#r,#c).
compute x(#r,#c) = x(k,#c).
compute x(k,#c) = d.
end loop.
end loop.
compute vcv = nm1 * (sscp(x) - ((t(csum(x))*csum(x))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute evals(:,#nds) = eval(d * vcv * d).
end loop.
end if.

* PAF/common factor analysis & random normal data generation.
do if (kind = 2 and randtype = 1).
compute nm1 = 1 / (ncases-1).
compute vcv = nm1 * (sscp(raw) - ((t(csum(raw))*csum(raw))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute cr = (d * vcv * d).
compute smc = 1 - (1 &/ diag(inv(cr)) ).
call setdiag(cr,smc).
compute realeval = eval(cr).
compute evals = make(nvars,ndatsets,-9999).
compute nm1 = 1 / (ncases-1).
loop #nds = 1 to ndatsets.
compute x = sqrt(2 * (ln(uniform(ncases,nvars)) * -1) ) &*
            cos(6.283185 * uniform(ncases,nvars) ).
compute vcv = nm1 * (sscp(x) - ((t(csum(x))*csum(x))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute r = d * vcv * d.
compute smc = 1 - (1 &/ diag(inv(r)) ).
call setdiag(r,smc).
compute evals(:,#nds) = eval(r).
end loop.
end if.

* PAF/common factor analysis & raw data permutation.
do if (kind = 2 and randtype = 2).
compute nm1 = 1 / (ncases-1).
compute vcv = nm1 * (sscp(raw) - ((t(csum(raw))*csum(raw))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute cr = (d * vcv * d).
compute smc = 1 - (1 &/ diag(inv(cr)) ).
call setdiag(cr,smc).
compute realeval = eval(cr).
compute evals = make(nvars,ndatsets,-9999).
compute nm1 = 1 / (ncases-1).
loop #nds = 1 to ndatsets.
compute x = raw.
loop #c = 1 to nvars.
loop #r = 1 to (ncases -1).
compute k = trunc( (ncases - #r + 1) * uniform(1,1) + 1 )  + #r - 1.
compute d = x(#r,#c).
compute x(#r,#c) = x(k,#c).
compute x(k,#c) = d.
end loop.
end loop.
compute vcv = nm1 * (sscp(x) - ((t(csum(x))*csum(x))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute r = d * vcv * d.
compute smc = 1 - (1 &/ diag(inv(r)) ).
call setdiag(r,smc).
compute evals(:,#nds) = eval(r).
end loop.
end if.

* identifying the eigenvalues corresponding to the desired percentile.
compute num = rnd((percent*ndatsets)/100).
compute results = { t(1:nvars), realeval, t(1:nvars), t(1:nvars) }.
loop #root = 1 to nvars.
compute ranks = rnkorder(evals(#root,:)).
loop #col = 1 to ndatsets.
do if (ranks(1,#col) = num).
compute results(#root,4) = evals(#root,#col).
break.
end if.
end loop.
end loop.
compute results(:,3) = rsum(evals) / ndatsets.

print /title="PARALLEL ANALYSIS:".
do if (kind = 1 and randtype = 1).
print /title="Principal Components & Random Normal Data Generation".
else if (kind = 1 and randtype = 2).
print /title="Principal Components & Raw Data Permutation".
else if (kind = 2 and randtype = 1).
print /title="PAF/Common Factor Analysis & Random Normal Data Generation".
else if (kind = 2 and randtype = 2).
print /title="PAF/Common Factor Analysis & Raw Data Permutation".
end if.
compute specifs = {ncases; nvars; ndatsets; percent}.
print specifs /title="Specifications for this Run:"
 /rlabels="Ncases" "Nvars" "Ndatsets" "Percent".
print results
 /title="Raw Data Eigenvalues, & Mean & Percentile Random Data Eigenvalues"
 /clabels="Root" "Raw Data" "Means" "Prcntyle"  /format "f12.6".

do if   (kind = 2).
print / space = 1.
print /title="Warning: Parallel analyses of adjusted correlation matrices".
print /title="eg, with SMCs on the diagonal, tend to indicate more factors".
print /title="than warranted (Buja, A., & Eyuboglu, N., 1992, Remarks on
parallel".
print /title="analysis. Multivariate Behavioral Research, 27, 509-540.).".
print /title="The eigenvalues for trivial, negligible factors in the real".
print /title="data commonly surpass corresponding random data eigenvalues".
print /title="for the same roots. The eigenvalues from parallel analyses".
print /title="can be used to determine the real data eigenvalues that are".
print /title="beyond chance, but additional procedures should then be used".
print /title="to trim trivial factors.".
print / space = 2.
print /title="Principal components eigenvalues are often used to determine".
print /title="the number of common factors. This is the default in most".
print /title="statistical software packages, and it is the primary
practice".
print /title="in the literature. It is also the method used by many factor".
print /title="analysis experts, including Cattell, who often examined".
print /title="principal components eigenvalues in his scree plots to
determine".
print /title="the number of common factors. But others believe this common".
print /title="practice is wrong. Principal components eigenvalues are
based".
print /title="on all of the variance in correlation matrices, including
both".
print /title="the variance that is shared among variables and the
variances".
print /title="that are unique to the variables. In contrast, principal".
print /title="axis eigenvalues are based solely on the shared variance".
print /title="among the variables. The two procedures are qualitatively".
print /title="different. Some therefore claim that the eigenvalues from
one".
print /title="extraction method should not be used to determine".
print /title="the number of factors for the other extraction method.".
print /title="The issue remains neglected and unsettled.".
end if.

compute root      = results(:,1).
compute rawdata = results(:,2).
compute percntyl = results(:,4).

save results /outfile= 'screedata.sav' / var=root rawdata means percntyl .

end matrix.

* plots the eigenvalues, by root, for the real/raw data and for the random
data;
  This command works in SPSS 12, but not in all earlier versions.
GET file= 'screedata.sav'.
TSPLOT VARIABLES= rawdata means percntyl /ID= root /NOLOG.


--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166p5708234.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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

===================== 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


If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166p5708248.html
To unsubscribe from Factor Analysis, click here.
NAML

result.jpg (178K) Download Attachment


View this message in context: RE: Factor Analysis
Sent from the SPSSX Discussion mailing list archive at Nabble.com.
===================== 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
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

RE: Factor Analysis

Wana
thank you for ur advice.I try my best to get syntax for this analysis..actually, this's 1st time I am using syntax for factor analysis..so, I am not really familiar for that issues..


Date: Sun, 13 May 2012 10:07:04 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: Factor Analysis

Even when using the menus etc, it is a good practice to exit via <paste> rather than <ok>.

The GUI is an excellent way to get a _first draft_ of your syntax.  As you become more skilled, more familiar with your data, and better understand the output, you refine your syntax.  This is much the same as writing a letter, a poem, journal article, etc.


That helps with many things.
1) doing any analysis is an iterative procedure.
2) it give you an audit trail that helps you understand what you are doing, facilitates QA review, and makes it more efficient for one to obtain help from lists, etc.

Art Kendall
Social Research Consultants

On 5/13/2012 12:10 PM, Wana wrote:
Err..for factor analysis, I'm not using syntax but use window or dialog box..(from analyze-dimension reduction-factor)..


Date: Sun, 13 May 2012 08:48:30 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: Factor Analysis

that is the syntax to do the parallel analysis.

What is the syntax you used to do the actual factor analysis?
Art Kendall
Social Research Consultants

On 5/13/2012 11:29 AM, Wana wrote:
This my syntax..

Parallel Analysis Program For Raw Data and Data Permutations.

* To run this program you need to first specify the data
  for analysis and then RUN, all at once, the commands
  from the MATRIX statement to the END MATRIX statement.

* This program conducts parallel analyses on data files in which
  the rows of the data matrix are cases/individuals and the
  columns are variables;  Data are read/entered into the program
  using the GET command (see the GET command below);  The GET
  command reads an SPSS data file, which can be either the
  current, active SPSS data file or a previously saved data file;
  A valid filename/location must be specified on the GET command;
  A subset of variables for the analyses can be specified by using
  the "/ VAR =" subcommand with the GET statement;  There can be
  no missing values.

* You must also specify:
  -- the # of parallel data sets for the analyses;
  -- the desired percentile of the distribution and random
     data eigenvalues;
  -- whether principal components analyses or principal axis/common
     factor analysis are to be conducted, and
  -- whether normally distributed random data generation or
     permutations of the raw data set are to be used in the
     parallel analyses.

* Permutations of the raw data set can be time consuming;
  Each parallel data set is based on column-wise random shufflings
  of the values in the raw data matrix using Castellan's (1992,
  BRMIC, 24, 72-77) algorithm; The distributions of the original
  raw variables are exactly preserved in the shuffled versions used
  in the parallel analyses; Permutations of the raw data set are
  thus highly accurate and most relevant, especially in cases where
  the raw data are not normally distributed or when they do not meet
  the assumption of multivariate normality (see Longman & Holden,
  1992, BRMIC, 24, 493, for a Fortran version); If you would
  like to go this route, it is perhaps best to (1) first run a
  normally distributed random data generation parallel analysis to
  familiarize yourself with the program and to get a ballpark
  reference point for the number of factors/components;
  (2) then run a permutations of the raw data parallel analysis
  using a small number of datasets (e.g., 100), just to see how long
  the program takes to run; then (3) run a permutations of the raw
  data parallel analysis using the number of parallel data sets that
  you would like use for your final analyses; 1000 datasets are
  usually sufficient, although more datasets should be used if
  there are close calls.


* These next commands generate artificial raw data
  (500 cases) that can be used for a trial-run of
  the program, instead of using your own raw data;
  Just select and run this whole file; However, make sure to
  delete the artificial data commands before attempting to
  run your own data.


set mxloops=9000 printback=off width=80  seed = 1953125.
matrix.

* Enter the name/location of the data file for analyses after "FILE =";
  If you specify "FILE = *", then the program will read the current,
  active SPSS data file; Alternatively, enter the name/location
  of a previously saved SPSS data file instead of "*";
  you can use the "/ VAR =" subcommand after "/ missing=omit"
  subcommand to select variables for the analyses.
GET raw / FILE = * / missing=omit / VAR = PS1 to PS13.

* Enter the desired number of parallel data sets here.
compute ndatsets =223.

* Enter the desired percentile here.
compute percent  = 95.

* Enter either
  1 for principal components analysis, or
  2 for principal axis/common factor analysis.
compute kind = 1 .

* Enter either
  1 for normally distributed random data generation parallel analysis, or
  2 for permutations of the raw data set.
compute randtype = 1.


****************** End of user specifications. ******************

compute ncases   = nrow(raw).
compute nvars    = ncol(raw).

* principal components analysis & random normal data generation.
do if (kind = 1 and randtype = 1).
compute nm1 = 1 / (ncases-1).
compute vcv = nm1 * (sscp(raw) - ((t(csum(raw))*csum(raw))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute realeval = eval(d * vcv * d).
compute evals = make(nvars,ndatsets,-9999).
loop #nds = 1 to ndatsets.
compute x = sqrt(2 * (ln(uniform(ncases,nvars)) * -1) ) &*
            cos(6.283185 * uniform(ncases,nvars) ).
compute vcv = nm1 * (sscp(x) - ((t(csum(x))*csum(x))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute evals(:,#nds) = eval(d * vcv * d).
end loop.
end if.

* principal components analysis & raw data permutation.
do if (kind = 1 and randtype = 2).
compute nm1 = 1 / (ncases-1).
compute vcv = nm1 * (sscp(raw) - ((t(csum(raw))*csum(raw))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute realeval = eval(d * vcv * d).
compute evals = make(nvars,ndatsets,-9999).
loop #nds = 1 to ndatsets.
compute x = raw.
loop #c = 1 to nvars.
loop #r = 1 to (ncases -1).
compute k = trunc( (ncases - #r + 1) * uniform(1,1) + 1 )  + #r - 1.
compute d = x(#r,#c).
compute x(#r,#c) = x(k,#c).
compute x(k,#c) = d.
end loop.
end loop.
compute vcv = nm1 * (sscp(x) - ((t(csum(x))*csum(x))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute evals(:,#nds) = eval(d * vcv * d).
end loop.
end if.

* PAF/common factor analysis & random normal data generation.
do if (kind = 2 and randtype = 1).
compute nm1 = 1 / (ncases-1).
compute vcv = nm1 * (sscp(raw) - ((t(csum(raw))*csum(raw))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute cr = (d * vcv * d).
compute smc = 1 - (1 &/ diag(inv(cr)) ).
call setdiag(cr,smc).
compute realeval = eval(cr).
compute evals = make(nvars,ndatsets,-9999).
compute nm1 = 1 / (ncases-1).
loop #nds = 1 to ndatsets.
compute x = sqrt(2 * (ln(uniform(ncases,nvars)) * -1) ) &*
            cos(6.283185 * uniform(ncases,nvars) ).
compute vcv = nm1 * (sscp(x) - ((t(csum(x))*csum(x))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute r = d * vcv * d.
compute smc = 1 - (1 &/ diag(inv(r)) ).
call setdiag(r,smc).
compute evals(:,#nds) = eval(r).
end loop.
end if.

* PAF/common factor analysis & raw data permutation.
do if (kind = 2 and randtype = 2).
compute nm1 = 1 / (ncases-1).
compute vcv = nm1 * (sscp(raw) - ((t(csum(raw))*csum(raw))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute cr = (d * vcv * d).
compute smc = 1 - (1 &/ diag(inv(cr)) ).
call setdiag(cr,smc).
compute realeval = eval(cr).
compute evals = make(nvars,ndatsets,-9999).
compute nm1 = 1 / (ncases-1).
loop #nds = 1 to ndatsets.
compute x = raw.
loop #c = 1 to nvars.
loop #r = 1 to (ncases -1).
compute k = trunc( (ncases - #r + 1) * uniform(1,1) + 1 )  + #r - 1.
compute d = x(#r,#c).
compute x(#r,#c) = x(k,#c).
compute x(k,#c) = d.
end loop.
end loop.
compute vcv = nm1 * (sscp(x) - ((t(csum(x))*csum(x))/ncases)).
compute d = inv(mdiag(sqrt(diag(vcv)))).
compute r = d * vcv * d.
compute smc = 1 - (1 &/ diag(inv(r)) ).
call setdiag(r,smc).
compute evals(:,#nds) = eval(r).
end loop.
end if.

* identifying the eigenvalues corresponding to the desired percentile.
compute num = rnd((percent*ndatsets)/100).
compute results = { t(1:nvars), realeval, t(1:nvars), t(1:nvars) }.
loop #root = 1 to nvars.
compute ranks = rnkorder(evals(#root,:)).
loop #col = 1 to ndatsets.
do if (ranks(1,#col) = num).
compute results(#root,4) = evals(#root,#col).
break.
end if.
end loop.
end loop.
compute results(:,3) = rsum(evals) / ndatsets.

print /title="PARALLEL ANALYSIS:".
do if (kind = 1 and randtype = 1).
print /title="Principal Components & Random Normal Data Generation".
else if (kind = 1 and randtype = 2).
print /title="Principal Components & Raw Data Permutation".
else if (kind = 2 and randtype = 1).
print /title="PAF/Common Factor Analysis & Random Normal Data Generation".
else if (kind = 2 and randtype = 2).
print /title="PAF/Common Factor Analysis & Raw Data Permutation".
end if.
compute specifs = {ncases; nvars; ndatsets; percent}.
print specifs /title="Specifications for this Run:"
 /rlabels="Ncases" "Nvars" "Ndatsets" "Percent".
print results
 /title="Raw Data Eigenvalues, & Mean & Percentile Random Data Eigenvalues"
 /clabels="Root" "Raw Data" "Means" "Prcntyle"  /format "f12.6".

do if   (kind = 2).
print / space = 1.
print /title="Warning: Parallel analyses of adjusted correlation matrices".
print /title="eg, with SMCs on the diagonal, tend to indicate more factors".
print /title="than warranted (Buja, A., & Eyuboglu, N., 1992, Remarks on
parallel".
print /title="analysis. Multivariate Behavioral Research, 27, 509-540.).".
print /title="The eigenvalues for trivial, negligible factors in the real".
print /title="data commonly surpass corresponding random data eigenvalues".
print /title="for the same roots. The eigenvalues from parallel analyses".
print /title="can be used to determine the real data eigenvalues that are".
print /title="beyond chance, but additional procedures should then be used".
print /title="to trim trivial factors.".
print / space = 2.
print /title="Principal components eigenvalues are often used to determine".
print /title="the number of common factors. This is the default in most".
print /title="statistical software packages, and it is the primary
practice".
print /title="in the literature. It is also the method used by many factor".
print /title="analysis experts, including Cattell, who often examined".
print /title="principal components eigenvalues in his scree plots to
determine".
print /title="the number of common factors. But others believe this common".
print /title="practice is wrong. Principal components eigenvalues are
based".
print /title="on all of the variance in correlation matrices, including
both".
print /title="the variance that is shared among variables and the
variances".
print /title="that are unique to the variables. In contrast, principal".
print /title="axis eigenvalues are based solely on the shared variance".
print /title="among the variables. The two procedures are qualitatively".
print /title="different. Some therefore claim that the eigenvalues from
one".
print /title="extraction method should not be used to determine".
print /title="the number of factors for the other extraction method.".
print /title="The issue remains neglected and unsettled.".
end if.

compute root      = results(:,1).
compute rawdata = results(:,2).
compute percntyl = results(:,4).

save results /outfile= 'screedata.sav' / var=root rawdata means percntyl .

end matrix.

* plots the eigenvalues, by root, for the real/raw data and for the random
data;
  This command works in SPSS 12, but not in all earlier versions.
GET file= 'screedata.sav'.
TSPLOT VARIABLES= rawdata means percntyl /ID= root /NOLOG.


--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166p5708234.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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

===================== 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


If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166p5708248.html
To unsubscribe from Factor Analysis, click here.
NAML

result.jpg (178K) Download Attachment


View this message in context: RE: Factor Analysis
Sent from the SPSSX Discussion mailing list archive at Nabble.com.
===================== 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


If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166p5708290.html
To unsubscribe from Factor Analysis, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

RE: Factor Analysis

Wana
This is my 1st syntax for factor analysis...
FACTOR
  /VARIABLES PS1 PS2 PS3 PS4 PS5 PS6 PS7 PS8 PS9 PS10 PS11 PS12 PS13
  /PRINT INITIAL KMO EXTRACTION ROTATION
  /PLOT EIGEN ROTATION
  /CRITERIA MINEIGEN(1) ITERATE(25)
  /EXTRACTION PAF
  /CRITERIA ITERATE(25)
  /ROTATION OBLIMIN
  /METHOD=CORRELATION
Reply | Threaded
Open this post in threaded view
|

RE: Factor Analysis

Wana

For this analysis, I just want to get eigenvalue for every factor(relax, enhancement of human relationship, prestige and safe+secure). Sorry, a lot of qs


Date: Sun, 13 May 2012 16:20:05 -0700
From: [hidden email]
To: [hidden email]
Subject: RE: Factor Analysis

This is my 1st syntax for factor analysis...
FACTOR
  /VARIABLES PS1 PS2 PS3 PS4 PS5 PS6 PS7 PS8 PS9 PS10 PS11 PS12 PS13
  /PRINT INITIAL KMO EXTRACTION ROTATION
  /PLOT EIGEN ROTATION
  /CRITERIA MINEIGEN(1) ITERATE(25)
  /EXTRACTION PAF
  /CRITERIA ITERATE(25)
  /ROTATION OBLIMIN
  /METHOD=CORRELATION



If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166p5708511.html
To unsubscribe from Factor Analysis, click here.
NAML

Questinnaire example.docx (17K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Factor Analysis

Art Kendall
In reply to this post by Wana
Your second /criteria would override the first one.  Try using only one

usually one wants discriminant validity when creating scales.  Try /rotation = varimax.
Also after the first one look at the eigenvalue plot, i.e., do a scree test. this give one ballpark estimate of the number of factors
Then manually plot the eigenvalues from the parallel analysis and the obtained eigenvalues from FACTOR on the same plot.
When the obtained eigenvalues exceed the eigenvalues from the parallel analysis by at least 1.00 (i.e., one variables worth of the variance) that fives a second ballpark.
* first run.
FACTOR
  /VARIABLES PS1 PS2 PS3 PS4 PS5 PS6 PS7 PS8 PS9 PS10 PS11 PS12 PS13
  /PRINT INITIAL KMO EXTRACTION ROTATION
  /PLOT EIGEN ROTATION
  /CRITERIA MINEIGEN(1) ITERATE(25)
  /EXTRACTION PAF
  /ROTATION varimax
  /METHOD=CORRELATION.

*try some numbers of factors to retain based on the ballparks, these do 4,3, and 2.
*Check the loadings to find a solution that gives cleanly loading items that make substantive sense.
Don't be surprised is you drop some items either because they don't load well at all, load too much on more than one factor, or just do not make sense.
Remember that negatively loading items will need to be reflected when you create your scoring key.

FACTOR
  /VARIABLES PS1 PS2 PS3 PS4 PS5 PS6 PS7 PS8 PS9 PS10 PS11 PS12 PS13
  /PRINT  ROTATION
  /PLOT  ROTATION
  /CRITERIA NFACTORS(4) ITERATE(25)
  /EXTRACTION PAF
  /ROTATION VARIMAX
  /METHOD=CORRELATION,

FACTOR
    /VARIABLES PS1 PS2 PS3 PS4 PS5 PS6 PS7 PS8 PS9 PS10 PS11 PS12 PS13
  /PRINT ROTATION
  /PLOT  ROTATION
  /CRITERIA NFACTORS(3) ITERATE(25)
  /EXTRACTION PAF
  /ROTATION VARIMAX
  /METHOD=CORRELATION.

FACTOR
  /VARIABLES PS1 PS2 PS3 PS4 PS5 PS6 PS7 PS8 PS9 PS10 PS11 PS12 PS13
  /PRINT  ROTATION
  /PLOT  ROTATION
  /CRITERIA NFACTORS(2) ITERATE(25)
  /EXTRACTION PAF
  /ROTATION VARIMAX
  /METHOD=CORRELATION.
Art Kendall
Social Research Consultants

On 5/13/2012 7:20 PM, Wana wrote:
This is my 1st syntax for factor analysis...
FACTOR
  /VARIABLES PS1 PS2 PS3 PS4 PS5 PS6 PS7 PS8 PS9 PS10 PS11 PS12 PS13
  /PRINT INITIAL KMO EXTRACTION ROTATION
  /PLOT EIGEN ROTATION
  /CRITERIA MINEIGEN(1) ITERATE(25)
  /EXTRACTION PAF
  /CRITERIA ITERATE(25)
  /ROTATION OBLIMIN
  /METHOD=CORRELATION.


--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166p5708511.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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

===================== 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
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

RE: Factor Analysis

Wana
Thank u so much for guidance..at least, I get the analysis I want..Smile but for second factor, I try to run but system mention that "Warnings
An invalid keyword is used on the CRITERIA subcommand. Valid keywords are FACTORS, MINEIGEN, ITERATE, ECONVERGE, RCONVERGE, KAISER, NOKAISER, and DEFAULT. Text found: NFACTORS
This command is not executed.
There is a syntax error on the CRITERIA subcommand. Text found: (
There is a syntax error on the CRITERIA subcommand. Text found: 2
There is a syntax error on the CRITERIA subcommand. Text found: )"



Date: Mon, 14 May 2012 05:28:43 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: Factor Analysis

Your second /criteria would override the first one.  Try using only one

usually one wants discriminant validity when creating scales.  Try /rotation = varimax.
Also after the first one look at the eigenvalue plot, i.e., do a scree test. this give one ballpark estimate of the number of factors
Then manually plot the eigenvalues from the parallel analysis and the obtained eigenvalues from FACTOR on the same plot.
When the obtained eigenvalues exceed the eigenvalues from the parallel analysis by at least 1.00 (i.e., one variables worth of the variance) that fives a second ballpark.
* first run.
FACTOR
  /VARIABLES PS1 PS2 PS3 PS4 PS5 PS6 PS7 PS8 PS9 PS10 PS11 PS12 PS13
  /PRINT INITIAL KMO EXTRACTION ROTATION
  /PLOT EIGEN ROTATION
  /CRITERIA MINEIGEN(1) ITERATE(25)
  /EXTRACTION PAF
  /ROTATION varimax
  /METHOD=CORRELATION.

*try some numbers of factors to retain based on the ballparks, these do 4,3, and 2.
*Check the loadings to find a solution that gives cleanly loading items that make substantive sense.
Don't be surprised is you drop some items either because they don't load well at all, load too much on more than one factor, or just do not make sense.
Remember that negatively loading items will need to be reflected when you create your scoring key.

FACTOR
  /VARIABLES PS1 PS2 PS3 PS4 PS5 PS6 PS7 PS8 PS9 PS10 PS11 PS12 PS13
  /PRINT  ROTATION
  /PLOT  ROTATION
  /CRITERIA NFACTORS(4) ITERATE(25)
  /EXTRACTION PAF
  /ROTATION VARIMAX
  /METHOD=CORRELATION,

FACTOR
    /VARIABLES PS1 PS2 PS3 PS4 PS5 PS6 PS7 PS8 PS9 PS10 PS11 PS12 PS13
  /PRINT ROTATION
  /PLOT  ROTATION
  /CRITERIA NFACTORS(3) ITERATE(25)
  /EXTRACTION PAF
  /ROTATION VARIMAX
  /METHOD=CORRELATION.

FACTOR
  /VARIABLES PS1 PS2 PS3 PS4 PS5 PS6 PS7 PS8 PS9 PS10 PS11 PS12 PS13
  /PRINT  ROTATION
  /PLOT  ROTATION
  /CRITERIA NFACTORS(2) ITERATE(25)
  /EXTRACTION PAF
  /ROTATION VARIMAX
  /METHOD=CORRELATION.
Art Kendall
Social Research Consultants

On 5/13/2012 7:20 PM, Wana wrote:
This is my 1st syntax for factor analysis...
FACTOR
  /VARIABLES PS1 PS2 PS3 PS4 PS5 PS6 PS7 PS8 PS9 PS10 PS11 PS12 PS13
  /PRINT INITIAL KMO EXTRACTION ROTATION
  /PLOT EIGEN ROTATION
  /CRITERIA MINEIGEN(1) ITERATE(25)
  /EXTRACTION PAF
  /CRITERIA ITERATE(25)
  /ROTATION OBLIMIN
  /METHOD=CORRELATION.


--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166p5708511.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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

===================== 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


If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166p5708937.html
To unsubscribe from Factor Analysis, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

Re: Factor Analysis

Art Kendall
my typo.  drop the N from NFACTORS.

As you learn SPSS, it is often helpful to place your cursor over a command and key <f1>.
Art Kendall
Social Research Consultants

On 5/14/2012 2:06 PM, Wana wrote:
Thank u so much for guidance..at least, I get the analysis I want..Smile but for second factor, I try to run but system mention that "Warnings
An invalid keyword is used on the CRITERIA subcommand. Valid keywords are FACTORS, MINEIGEN, ITERATE, ECONVERGE, RCONVERGE, KAISER, NOKAISER, and DEFAULT. Text found: NFACTORS
This command is not executed.
There is a syntax error on the CRITERIA subcommand. Text found: (
There is a syntax error on the CRITERIA subcommand. Text found: 2
There is a syntax error on the CRITERIA subcommand. Text found: )"



Date: Mon, 14 May 2012 05:28:43 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: Factor Analysis

Your second /criteria would override the first one.  Try using only one

usually one wants discriminant validity when creating scales.  Try /rotation = varimax.
Also after the first one look at the eigenvalue plot, i.e., do a scree test. this give one ballpark estimate of the number of factors
Then manually plot the eigenvalues from the parallel analysis and the obtained eigenvalues from FACTOR on the same plot.
When the obtained eigenvalues exceed the eigenvalues from the parallel analysis by at least 1.00 (i.e., one variables worth of the variance) that fives a second ballpark.
* first run.
FACTOR
  /VARIABLES PS1 PS2 PS3 PS4 PS5 PS6 PS7 PS8 PS9 PS10 PS11 PS12 PS13
  /PRINT INITIAL KMO EXTRACTION ROTATION
  /PLOT EIGEN ROTATION
  /CRITERIA MINEIGEN(1) ITERATE(25)
  /EXTRACTION PAF
  /ROTATION varimax
  /METHOD=CORRELATION.

*try some numbers of factors to retain based on the ballparks, these do 4,3, and 2.
*Check the loadings to find a solution that gives cleanly loading items that make substantive sense.
Don't be surprised is you drop some items either because they don't load well at all, load too much on more than one factor, or just do not make sense.
Remember that negatively loading items will need to be reflected when you create your scoring key.

FACTOR
  /VARIABLES PS1 PS2 PS3 PS4 PS5 PS6 PS7 PS8 PS9 PS10 PS11 PS12 PS13
  /PRINT  ROTATION
  /PLOT  ROTATION
  /CRITERIA NFACTORS(4) ITERATE(25)
  /EXTRACTION PAF
  /ROTATION VARIMAX
  /METHOD=CORRELATION,

FACTOR
    /VARIABLES PS1 PS2 PS3 PS4 PS5 PS6 PS7 PS8 PS9 PS10 PS11 PS12 PS13
  /PRINT ROTATION
  /PLOT  ROTATION
  /CRITERIA NFACTORS(3) ITERATE(25)
  /EXTRACTION PAF
  /ROTATION VARIMAX
  /METHOD=CORRELATION.

FACTOR
  /VARIABLES PS1 PS2 PS3 PS4 PS5 PS6 PS7 PS8 PS9 PS10 PS11 PS12 PS13
  /PRINT  ROTATION
  /PLOT  ROTATION
  /CRITERIA NFACTORS(2) ITERATE(25)
  /EXTRACTION PAF
  /ROTATION VARIMAX
  /METHOD=CORRELATION.
Art Kendall
Social Research Consultants

On 5/13/2012 7:20 PM, Wana wrote:
This is my 1st syntax for factor analysis...
FACTOR
  /VARIABLES PS1 PS2 PS3 PS4 PS5 PS6 PS7 PS8 PS9 PS10 PS11 PS12 PS13
  /PRINT INITIAL KMO EXTRACTION ROTATION
  /PLOT EIGEN ROTATION
  /CRITERIA MINEIGEN(1) ITERATE(25)
  /EXTRACTION PAF
  /CRITERIA ITERATE(25)
  /ROTATION OBLIMIN
  /METHOD=CORRELATION.


--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166p5708511.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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

===================== 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


If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166p5708937.html
To unsubscribe from Factor Analysis, click here.
NAML


View this message in context: RE: Factor Analysis
Sent from the SPSSX Discussion mailing list archive at Nabble.com.
===================== 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
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

RE: Factor Analysis

Wana
Thank You So Much. I am Successful to do factor analysis for push factor..Smile. but for pull factor, i have done some method with push method. my syntax is same with push factor but I hv change with variable(PL1 until PL13).for this cases, only two factor that identify(from parallel analysis).but factor matrix are available for this cases. system mention that "this matrix is not positive definite" and for total variance explain, system mention that"extraction cannot be done. this extraction is skipped"

my syntax for factor analysis
FACTOR 
  /VARIABLES PL1 PL2 PL3 PL4 PL5 PL6 PL7 PL8 PL9 PL10 PL11 PL12 PL12 PL13
  /PRINT INITIAL KMO EXTRACTION ROTATION
  /PLOT EIGEN ROTATION
  /CRITERIA MINEIGEN (1) ITERATE (25)
  /EXTRACTION PAF
  /ROTATION varimax
  /METHOD=CORRELATION

Date: Mon, 14 May 2012 11:42:27 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: Factor Analysis

my typo.  drop the N from NFACTORS.

As you learn SPSS, it is often helpful to place your cursor over a command and key <f1>.
Art Kendall
Social Research Consultants

On 5/14/2012 2:06 PM, Wana wrote:
Thank u so much for guidance..at least, I get the analysis I want..Smile but for second factor, I try to run but system mention that "Warnings
An invalid keyword is used on the CRITERIA subcommand. Valid keywords are FACTORS, MINEIGEN, ITERATE, ECONVERGE, RCONVERGE, KAISER, NOKAISER, and DEFAULT. Text found: NFACTORS
This command is not executed.
There is a syntax error on the CRITERIA subcommand. Text found: (
There is a syntax error on the CRITERIA subcommand. Text found: 2
There is a syntax error on the CRITERIA subcommand. Text found: )"



Date: Mon, 14 May 2012 05:28:43 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: Factor Analysis

Your second /criteria would override the first one.  Try using only one

usually one wants discriminant validity when creating scales.  Try /rotation = varimax.
Also after the first one look at the eigenvalue plot, i.e., do a scree test. this give one ballpark estimate of the number of factors
Then manually plot the eigenvalues from the parallel analysis and the obtained eigenvalues from FACTOR on the same plot.
When the obtained eigenvalues exceed the eigenvalues from the parallel analysis by at least 1.00 (i.e., one variables worth of the variance) that fives a second ballpark.
* first run.
FACTOR
  /VARIABLES PS1 PS2 PS3 PS4 PS5 PS6 PS7 PS8 PS9 PS10 PS11 PS12 PS13
  /PRINT INITIAL KMO EXTRACTION ROTATION
  /PLOT EIGEN ROTATION
  /CRITERIA MINEIGEN(1) ITERATE(25)
  /EXTRACTION PAF
  /ROTATION varimax
  /METHOD=CORRELATION.

*try some numbers of factors to retain based on the ballparks, these do 4,3, and 2.
*Check the loadings to find a solution that gives cleanly loading items that make substantive sense.
Don't be surprised is you drop some items either because they don't load well at all, load too much on more than one factor, or just do not make sense.
Remember that negatively loading items will need to be reflected when you create your scoring key.

FACTOR
  /VARIABLES PS1 PS2 PS3 PS4 PS5 PS6 PS7 PS8 PS9 PS10 PS11 PS12 PS13
  /PRINT  ROTATION
  /PLOT  ROTATION
  /CRITERIA NFACTORS(4) ITERATE(25)
  /EXTRACTION PAF
  /ROTATION VARIMAX
  /METHOD=CORRELATION,

FACTOR
    /VARIABLES PS1 PS2 PS3 PS4 PS5 PS6 PS7 PS8 PS9 PS10 PS11 PS12 PS13
  /PRINT ROTATION
  /PLOT  ROTATION
  /CRITERIA NFACTORS(3) ITERATE(25)
  /EXTRACTION PAF
  /ROTATION VARIMAX
  /METHOD=CORRELATION.

FACTOR
  /VARIABLES PS1 PS2 PS3 PS4 PS5 PS6 PS7 PS8 PS9 PS10 PS11 PS12 PS13
  /PRINT  ROTATION
  /PLOT  ROTATION
  /CRITERIA NFACTORS(2) ITERATE(25)
  /EXTRACTION PAF
  /ROTATION VARIMAX
  /METHOD=CORRELATION.
Art Kendall
Social Research Consultants

On 5/13/2012 7:20 PM, Wana wrote:
This is my 1st syntax for factor analysis...
FACTOR
  /VARIABLES PS1 PS2 PS3 PS4 PS5 PS6 PS7 PS8 PS9 PS10 PS11 PS12 PS13
  /PRINT INITIAL KMO EXTRACTION ROTATION
  /PLOT EIGEN ROTATION
  /CRITERIA MINEIGEN(1) ITERATE(25)
  /EXTRACTION PAF
  /CRITERIA ITERATE(25)
  /ROTATION OBLIMIN
  /METHOD=CORRELATION.


--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166p5708511.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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

===================== 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


If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166p5708937.html
To unsubscribe from Factor Analysis, click here.
NAML


View this message in context: RE: Factor Analysis
Sent from the SPSSX Discussion mailing list archive at Nabble.com.
===================== 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


If you reply to this email, your message will be added to the discussion below:
http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166p5709394.html
To unsubscribe from Factor Analysis, click here.
NAML

pARALEL PULL.jpg (121K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Factor Analysis

David Marso
Administrator
http://spssx-discussion.1045642.n5.nabble.com/template/NamlServlet.jtp?macro=search_page&node=1068821&query=matrix+is+not+positive+definite
----
Wana wrote
Thank You So Much. I am Successful to do factor analysis for push factor... but for pull factor, i have done some method with push method. my syntax is same with push factor but I hv change with variable(PL1 until PL13).for this cases, only two factor that identify(from parallel analysis).but factor matrix are available for this cases. system mention that "this matrix is not positive definite" and for total variance explain, system mention that"extraction cannot be done. this extraction is skipped"
my syntax for factor analysisFACTOR   /VARIABLES PL1 PL2 PL3 PL4 PL5 PL6 PL7 PL8 PL9 PL10 PL11 PL12 PL12 PL13  /PRINT INITIAL KMO EXTRACTION ROTATION  /PLOT EIGEN ROTATION  /CRITERIA MINEIGEN (1) ITERATE (25)  /EXTRACTION PAF  /ROTATION varimax  /METHOD=CORRELATIONDate: Mon, 14 May 2012 11:42:27 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: Factor Analysis



       
 
   
 
 
    my typo.  drop the N from NFACTORS.

   

    As you learn SPSS, it is often helpful to place your cursor over a
    command and key <f1>.

    Art Kendall
Social Research Consultants
   

    On 5/14/2012 2:06 PM, Wana wrote:
   
     
        Thank u so much for guidance..at least, I get the analysis I
        want.. but for second factor, I try to run
        but system mention that "Warnings
        An invalid keyword is used on the CRITERIA subcommand.
          Valid keywords are FACTORS, MINEIGEN, ITERATE, ECONVERGE,
          RCONVERGE, KAISER, NOKAISER, and DEFAULT. Text found: NFACTORS
        This command is not executed.
        There is a syntax error on the CRITERIA subcommand. Text
          found: (
        There is a syntax error on the CRITERIA subcommand. Text
          found: 2
        There is a syntax error on the CRITERIA subcommand. Text
          found: )"
       

       
       

       
          Date: Mon, 14 May 2012 05:28:43 -0700

          From: [hidden email]

          To: [hidden email]

          Subject: Re: Factor Analysis

         

          Your second /criteria would override the first
            one.  Try using only one

           

            usually one wants discriminant validity when creating
            scales.  Try /rotation = varimax.

            Also after the first one look at the eigenvalue plot, i.e.,
            do a scree test. this give one ballpark estimate of the
            number of factors

            Then manually plot the eigenvalues from the parallel
            analysis and the obtained eigenvalues from FACTOR on the
            same plot.

            When the obtained eigenvalues exceed the eigenvalues from
            the parallel analysis by at least 1.00 (i.e., one variables
            worth of the variance) that fives a second ballpark.

            * first run.

            FACTOR

              /VARIABLES PS1 PS2 PS3 PS4 PS5 PS6 PS7 PS8 PS9 PS10 PS11
            PS12 PS13

              /PRINT INITIAL KMO EXTRACTION ROTATION

              /PLOT EIGEN ROTATION

              /CRITERIA MINEIGEN(1) ITERATE(25)

              /EXTRACTION PAF

              /ROTATION varimax

              /METHOD=CORRELATION.

           

            *try some numbers of factors to retain based on the
            ballparks, these do 4,3, and 2.

            *Check the loadings to find a solution that gives cleanly
            loading items that make substantive sense.

            Don't be surprised is you drop some items either because
            they don't load well at all, load too much on more than one
            factor, or just do not make sense.

            Remember that negatively loading items will need to be
            reflected when you create your scoring key.

           

          FACTOR

            /VARIABLES PS1 PS2 PS3 PS4 PS5 PS6 PS7 PS8 PS9 PS10 PS11
          PS12 PS13

            /PRINT  ROTATION

            /PLOT  ROTATION

            /CRITERIA NFACTORS(4) ITERATE(25)

            /EXTRACTION PAF

            /ROTATION VARIMAX

            /METHOD=CORRELATION,

         

          FACTOR

              /VARIABLES PS1 PS2 PS3 PS4 PS5 PS6 PS7 PS8 PS9 PS10 PS11
          PS12 PS13

            /PRINT ROTATION

            /PLOT  ROTATION

            /CRITERIA NFACTORS(3) ITERATE(25)

            /EXTRACTION PAF

            /ROTATION VARIMAX

            /METHOD=CORRELATION.

         

          FACTOR

            /VARIABLES PS1 PS2 PS3 PS4 PS5 PS6 PS7 PS8 PS9 PS10 PS11
          PS12 PS13

            /PRINT  ROTATION

            /PLOT  ROTATION

            /CRITERIA NFACTORS(2) ITERATE(25)

            /EXTRACTION PAF

            /ROTATION VARIMAX

            /METHOD=CORRELATION.

          Art Kendall
Social Research Consultants
         

          On 5/13/2012 7:20 PM, Wana wrote:
         
            This is my 1st syntax for factor analysis...
FACTOR
  /VARIABLES PS1 PS2 PS3 PS4 PS5 PS6 PS7 PS8 PS9 PS10 PS11 PS12 PS13
  /PRINT INITIAL KMO EXTRACTION ROTATION
  /PLOT EIGEN ROTATION
  /CRITERIA MINEIGEN(1) ITERATE(25)
  /EXTRACTION PAF
  /CRITERIA ITERATE(25)
  /ROTATION OBLIMIN
  /METHOD=CORRELATION.


--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166p5708511.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
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


         
          =====================
          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

         

         
         
            If you reply to this email,
              your message will be added to the discussion below:
            http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166p5708937.html
         
         
            To unsubscribe from Factor Analysis, click here.

            NAML
       
     
     

     
      View this message in context: RE:
        Factor Analysis

      Sent from the SPSSX
        Discussion mailing list archive at Nabble.com.

   
 


=====================
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

       
       

       

       
       
                If you reply to this email, your message will be added to the discussion below:
                http://spssx-discussion.1045642.n5.nabble.com/Factor-Analysis-tp5707166p5709394.html
       
       
               
                To unsubscribe from Factor Analysis, click here.

                NAML
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?"
12