\begin{Schunk}
\begin{Sinput}
 head(scalescores)
\end{Sinput}
\begin{Soutput}
  wjcalc wjspl wratspl wratcalc waiscalc waisspl
1     29    51      47       49       12      45
2     31    54      57       49       21      47
3     23    45      38       40        9      36
4     31    34      38       48       14      38
5     31    31      30       52       15      38
6     27    42      40       42       12      41
\end{Soutput}
\begin{Sinput}
 output1 <- factanal(scalescores, 1, rotation = "varimax") 
 output1
\end{Sinput}
\begin{Soutput}
Call:
factanal(x = scalescores, factors = 1, rotation = "varimax")

Uniquenesses:
  wjcalc    wjspl  wratspl wratcalc waiscalc  waisspl 
   0.728    0.093    0.108    0.695    0.749    0.116 

Loadings:
         Factor1
wjcalc   0.522  
wjspl    0.953  
wratspl  0.945  
wratcalc 0.552  
waiscalc 0.501  
waisspl  0.940  

               Factor1
SS loadings      3.511
Proportion Var   0.585

Test of the hypothesis that 1 factor is sufficient.
The chi square statistic is 461.38 on 9 degrees of freedom.
The p-value is 1.06e-93 
\end{Soutput}
\begin{Sinput}
 output2 <- factanal(scalescores, 2, rotation = "varimax") 
 output2
\end{Sinput}
\begin{Soutput}
Call:
factanal(x = scalescores, factors = 2, rotation = "varimax")

Uniquenesses:
  wjcalc    wjspl  wratspl wratcalc waiscalc  waisspl 
   0.184    0.089    0.107    0.096    0.477    0.112 

Loadings:
         Factor1 Factor2
wjcalc   0.230   0.873  
wjspl    0.907   0.298  
wratspl  0.894   0.306  
wratcalc 0.248   0.918  
waiscalc 0.281   0.667  
waisspl  0.896   0.293  

               Factor1 Factor2
SS loadings      2.617   2.318
Proportion Var   0.436   0.386
Cumulative Var   0.436   0.823

Test of the hypothesis that 2 factors are sufficient.
The chi square statistic is 3.8 on 4 degrees of freedom.
The p-value is 0.434 
\end{Soutput}
\end{Schunk}
