Hi
I have a question regarding the use of the prefix ‘by’ when running post-estimation statistics for a PCA.
My data consists of 25 items, three different respondents (parent, teacher, child) and two different age groups (cohort 1 and cohort 2). I would like to run a PCA and post-estimation for each of these sub-groups. The code for the PCA (below) ran successfully providing me with 6 different outputs.
by Respondent cohort, sort: pca Item1- Item25, mineigen(1)
However, when I run the post estimation tests (rotate and estat KMO) I only receive output for the last respondent x cohort group generated from the above PCA. Below is my code for the PCA and post estimation tests.
by Respondent cohort, sort: pca Item1- Item25, mineigen(1)
quietly rotate
estat rotatecompare
estat kmo, novar
Alternatively I could use the ‘if’ command after the PCA and generate 6 blocks of code (see below) however I would prefer to run the all data together rather than running each individually.
pca Item1- Item25, mineigen(1), if Respondent==1 & cohort==1
quietly rotate
estat rotatecompare
estat kmo, novar
pca Item1- Item25, mineigen(1), if Respondent==1 & cohort==2
quietly rotate
estat rotatecompare
estat kmo, novar
.
.
etc
I am currently using version 15.1
Thanks in advance for your time.
Related Posts with Prefix ‘by’ when running post-estimation statistics for a PCA
Potential bug in IVREGRESS: instruments dropped due to collinearity when they should not be droppedIn a private conversation, haiyan lin notified me of a potential bug in ivreg2. The same problem occ…
System GMM across subsamplesHello everyone, I am using the -xtabond2- command. I am using 70 countries over a period of 14 years…
Number format: only display digits if non-intengerI let STATA display summary statistics for me using esttab, as follows: Code: sysuse auto, clear …
Test difference between estimated coefficientsHello, I am running a regression on two subsamples (s2=0 and s2=1). I would like to test whether th…
Adding Log-rank test p-value to the Kaplan Meier graphHello everyone, I am trying to add Log-rank test p-value to my Kaplan Meier graph, but I cannot fin…
Subscribe to:
Post Comments (Atom)
0 Response to Prefix ‘by’ when running post-estimation statistics for a PCA
Post a Comment