**Conduct bootstrap resampling from the data set; proc surveyselect data = engdata method = URS samprate = 1 outhits out = outboot_eng (compress=binary) seed = 1 rep = 2000; run; **Run model on bootstrap estimates; ods output Eigenvalues=boot_eigen (compress=binary) ObliqueRotFactPat=boot_loadings (compress=binary) FinalCommun=boot_commun (compress=binary); proc factor data = outboot_eng nfactors = 2 method = prinit priors = SMC rotate = OBLIMIN; by replicate; var EngProb: INTERESTeng: ; run; ods output close; **Estimate CI for Eigenvalues and corresponding variance; proc sort data=boot_eigen nodupkey; by Number replicate; run; proc univariate data=boot_eigen; by Number; var Eigenvalue Proportion; Histogram; output out=ci_eigen pctlpts=2.5, 97.5 mean=Eigenvalue_mean proportion_mean std=Eigenvalue_std Proportion_std pctlpre=Eigenvalue_ci Proportion_ci; run;
UNIVARIATE
procedure).
Mean Eigen
|
95% CI
|
Mean % Variance
|
95% CI
|
|
---|---|---|---|---|
Factor 1
|
7.41
|
(6.67, 8.20)
|
68.90%
|
(63,83%, 74.10%)
|
Factor 2
|
3.27
|
(2.75, 3.80)
|
30.46%
|
(25.30%, 35.43%)
|
Factor 3
|
0.24
|
(0.16, 0.33)
|
2.20%
|
(1.44%, 3.09%)
|
Note: Iterated PAF extraction with oblimin rotation was used. |
**Estimate CI for Communalities and Pattern Loading Matrix; *transpose communality so can use BY processing in proc univariate; proc transpose data=boot_commun out=boot_commun_t prefix=communality name=Variable; by replicate; run; proc sort data=boot_commun_t; by Variable Replicate; run; proc univariate data=boot_commun_t; by Variable; var Communality1; output out=ci_commun pctlpts=2.5, 97.5 mean=mean std=std pctlpre=ci; run; **Re-Order results on factors using the alignFactors macro we built; *Include alignFactors macro syntax for use below; filename align 'C:alignFactors_macro.sas'; %include align; *Run Macro and estimate CI; %alignFactors(orig_loadings,boot_loadings,aligned_loadings,summary); proc sort data=aligned_loadings; by VariableN; run; proc univariate data=aligned_loadings; by VariableN; var Factor1; output out=ci1_loadings pctlpts=2.5, 97.5 mean=mean std=std pctlpre=ci; run; proc univariate data=aligned_loadings; by VariableN; var Factor2; output out=ci2_loadings pctlpts=2.5, 97.5 mean=mean std=std pctlpre=ci; run;
Var:
|
Communalities
|
Factor 1 Pattern Loadings
|
Factor 2 Pattern Loadings
|
|||
---|---|---|---|---|---|---|
Coeff.
|
95% CI
|
Coeff.
|
95% CI
|
Coeff.
|
95% CI
|
|
EngProb1
|
0.73
|
(.66, .79)
|
0.86
|
(.81,.90)
|
-0.02
|
(-.06,.04)
|
EngProb2
|
0.67
|
(.58, .75)
|
0.84
|
(.77,.90)
|
-0.07
|
(-.13,-.01)
|
EngProb3
|
0.77
|
(.70, .83)
|
0.88
|
(.84,.91)
|
-0.01
|
(-.05,.04)
|
EngProb4
|
0.81
|
(.75, .86)
|
0.91
|
(.87,.94)
|
-0.03
|
(-.06,.02)
|
EngProb5
|
0.80
|
(.74, .85)
|
0.89
|
(.84,.92)
|
0.02
|
(-.02,.07)
|
EngProb6
|
0.77
|
(.70, .83)
|
0.87
|
(.82,.90)
|
0.02
|
(-.03,.07)
|
EngProb7
|
0.78
|
(.71, .83)
|
0.87
|
(.82,.91)
|
0.03
|
(-.02,.09)
|
EngProb8
|
0.67
|
(.59, .74)
|
0.79
|
(.72,.84)
|
0.07
|
(.01,.14)
|
INTeng1
|
0.67
|
(.56, .77)
|
0.04
|
(-.02,.11)
|
0.80
|
(.71,.87)
|
INTeng2
|
0.83
|
(.76, .89)
|
-0.02
|
(-.07,.02)
|
0.92
|
(.87,.96)
|
INTeng3
|
0.84
|
(.79, .89)
|
-0.01
|
(-.05,.02)
|
0.92
|
(.89,.95)
|
INTeng4
|
0.82
|
(.68, .91)
|
0.00
|
(-.04,.04)
|
0.90
|
(.82,.96)
|
INTeng5
|
0.80
|
(.72, .86)
|
-0.01
|
(-.05,.04)
|
0.90
|
(.85,.93)
|
INTeng6
|
0.75
|
(.66, .83)
|
0.01
|
(-.03,.06)
|
0.86
|
(.81,.91)
|
Note: Iterated PAF extraction with oblimin rotation was used. 95% CIs in parentheses. Factor loadings highlighted are those expected to load on the factor. |
**Select subsample from SDQ data; proc surveyselect data=sdqdata method=srs n=300 out=sdqdata_ss1 seed=39302; run; **Look at factor structure in subsample; proc factor data=sdqdata_ss1 nfactors=3 method=ml rotate=OBLIMIN; var Math: Par: Eng:; run;
**Conduct bootstrap resampling from the data set; proc surveyselect data=sdqdata_ss1 method=URS samprate=1 outhits out=outboot_sdq (compress=binary) seed=1 rep=2000; run; **Notice occurrence of Heywood cases; ods output Eigenvalues=boot_eigen ObliqueRotFactPat=boot_loadings; proc factor data=outboot_sdq nfactors=3 method=ml rotate=OBLIMIN ; by replicate; var Math: Par: Eng:; run; ods output close; run;
PROC
FACTOR
to replicate our analyses, the following error
message appeared in our log in three different places.
HEYW
OOD
or ULTRAHEYWOOD
option
on the FACTOR
statement to permit communality
estimates that are equal to or greater than 1. This option should
be used with care because it does not fix any problems—it just
allows us to estimate results for potentially problematic data.
**Solution to Heywood Cases #1: Change the method; *Look at original sample and subsample solution with revised method; proc factor data=sdqdata nfactors=3 method=uls rotate=OBLIMIN; var Math: Par: Eng:; run; proc factor data=sdqdata_ss1 nfactors=3 method=uls rotate=OBLIMIN ; var Math: Par: Eng:; run; *Bootstrap results; ods output Eigenvalues=boot_eigen ObliqueRotFactPat=boot_loadings; proc factor data=outboot_sdq nfactors=3 method=uls rotate=OBLIMIN; by replicate; var Math: Par: Eng:; run; ods output close;run; *Estimate CI for Eigenvalues and Corresponding Variance; proc sort data=boot_eigen nodupkey; by Number Replicate; run; proc univariate data=boot_eigen; by Number; var Eigenvalue Proportion; Histogram; output out=ci_eigen pctlpts=2.5, 97.5 mean=Eigenvalue_mean Proportion_mean std=Eigenvalue_std Proportion_std pctlpre=Eigenvalue_ci Proportion_ci; run; *Estimate CI for Pattern Loading Matrix; %alignFactors(orig_loadings,boot_loadings,aligned_loadings,summary); proc sort data=aligned_loadings; by VariableN; run; proc univariate data=aligned_loadings; by VariableN; var Factor1; output out=ci1_loadings pctlpts=2.5, 97.5 mean=mean std=std pctlpre=ci; run; proc univariate data=aligned_loadings; by VariableN; var Factor2; output out=ci2_loadings pctlpts=2.5, 97.5 mean=mean std=std pctlpre=ci; run; proc univariate data=aligned_loadings; by VariableN; var Factor3; output out=ci3_loadings pctlpts=2.5, 97.5 mean=mean std=std pctlpre=ci; run; **Solution to Heywood Cases #2: Use ULTRAHEYWOOD option to allow SAS to solve; ods output Eigenvalues=boot_eigen ObliqueRotFactPat=boot_loadings; proc factor data=outboot_sdq nfactors=3 method=ml ULTRAHEYWOOD rotate=OBLIMIN ; by replicate; var Math: Par: Eng:; run; ods output close;run; *Estimate CI for Eigenvalues and Corresponding Variance; proc sort data=boot_eigen nodupkey; by Number Replicate; run; proc univariate data=boot_eigen; by Number; var Eigenvalue Proportion; Histogram; output out=ci_eigen pctlpts=2.5, 97.5 mean=Eigenvalue_mean Proportion_mean std=Eigenvalue_std Proportion_std pctlpre=Eigenvalue_ci Proportion_ci; run;
ULTRAHEYWOOD
option.
Please note, the estimates that are produced by ML extraction are
larger because a weighting process is used in ML. Thus, the relative
difference in eigenvalue magnitude should be ignored when comparing
these tables.
Factor
|
Original Sample eigenvalue
|
Reduced Sample eigenvalue
|
95% CI
|
Original Sample variance
|
Reduced Sample variance
|
95% CI
|
---|---|---|---|---|---|---|
1
|
3.62
|
3.68
|
(3.31,4.21)
|
52.1%
|
50.0%
|
(43.9%,54.6%)
|
2
|
2.16
|
2.47
|
(2.11,2.86)
|
31.0%
|
33.6%
|
(27.9%,37.2%)
|
3
|
1.73
|
1.53
|
(1.23,1.88)
|
24.9%
|
20.8%
|
(16.1%,24.3%)
|
4
|
0.36
|
0.43
|
(0.26,0.72)
|
5.2%
|
5.9%
|
(3.4%,9.5%)
|
Factor
|
Original Sample eigenvalue
|
Reduced Sample eigenvalue
|
95% CI
|
Original Sample variance
|
Reduced Sample variance
|
95% CI
|
---|---|---|---|---|---|---|
1
|
3.62
|
3.68
|
(3.31,4.21)
|
52.1%
|
50.0%
|
(43.9%,54.6%)
|
2
|
2.16
|
2.47
|
(2.11,2.86)
|
31.0%
|
33.6%
|
(27.9%,37.2%)
|
3
|
1.73
|
1.53
|
(1.23,1.88)
|
24.9%
|
20.8%
|
(16.1%,24.3%)
|
4
|
0.36
|
0.43
|
(0.26,0.72)
|
5.2%
|
5.9%
|
(3.4%,9.5%)
|
Var:
|
Original Sample
Factor Loadings
|
Reduced Sample
Factor Loadings
|
||||
---|---|---|---|---|---|---|
1
|
2
|
3
|
1
|
2
|
3
|
|
Math1
|
.90
|
-.05
|
-.03
|
.91 (.86,.95)
|
.01 (-.06,.08)
|
-.09 (-.16,-.02)
|
Math2
|
.86
|
.00
|
.01
|
.85 (.79,.90)
|
.01 (-.05,.09)
|
.06 (-.01,.14)
|
Math3
|
.89
|
-.01
|
.02
|
.88 (.81,.93)
|
-.01 (-.07,.05)
|
.00 (-.08,.07)
|
Math4
|
-.59
|
-.06
|
.01
|
-.66 (-.75,-.56)
|
.01 (-.08,.09)
|
-.02 (-.11,.07)
|
Par1
|
.00
|
.71
|
.02
|
-.03 (-.10,.05)
|
.68 (.55,.78)
|
.04 (-.06,.16)
|
Par2
|
.05
|
-.69
|
.04
|
-.03 (-.11,.04)
|
-.72 (-.82,-.60)
|
.05 (-.06,.12)
|
Par3
|
.03
|
.82
|
-.01
|
-.02 (-.08,.05)
|
.96 (.89,1.00)
|
-.08 (-.14,.01)
|
Par4
|
-.04
|
-.60
|
-.11
|
-.05 (-.16,.05)
|
-.57 (-.69,-.43)
|
-.12 (-.26,.01)
|
Par5
|
.02
|
.74
|
-.04
|
-.02 (-.09,.05)
|
.78 (.70,.84)
|
.00 (-.08,.08)
|
Eng1
|
.00
|
.02
|
.78
|
.03 (-.05,.11)
|
.01 (-.06,.11)
|
.75 (.65,.85)
|
Eng2
|
-.01
|
-.10
|
.84
|
-.04 (-.11,.03)
|
-.07 (-.14,.02)
|
.78 (.67,.86)
|
Eng3
|
.06
|
-.03
|
.85
|
-.02 (-.09,.06)
|
.00 (-.07,.08)
|
.81 (.71,.89)
|
Eng4
|
.04
|
-.12
|
-.61
|
-.03 (-.11,.05)
|
-.09 (-.22,.01)
|
-.63 (-.74,-.48)
|
Note: Factor loadings highlighted are those expected to load on the factor. |