*note: In the input statement-- s=number of factors tchisq_b=SAS chi-square for testing that s factors are sufficient (goodness of fit for the target model tdf=df for target model nchisq_b=SAS chi-square for testing that no common factors are sufficient (goodness of fit for the null model ndf=df for null model sasrmr=root mean square residual from SAS N=sample size q=number of observed variables.; data; input s tchisq tdf nchisq ndf N q ; disc=tchisq/(N-1); pdischat=disc-(tdf/(N-1)); if pdischat < 0 then pdischat=0; rmsea=sqrt(pdischat/tdf); pexact=1-probchi(tchisq,tdf); pclose=1-probchi(tchisq,tdf,.0025*(N-1)*tdf); ecvi=(tchisq+(q*(q+1))-2*tdf)/(n-1); ecvis=q*(q+1)/(n-2-q); chisqdif=lag(tchisq)-tchisq; dfdif=lag(tdf)-tdf; pdif=1-probchi(chisqdif,dfdif); lt=tchisq-tdf; ln=nchisq-ndf; lttil=max(lt,0); lntil=max(lt,ln,0); cfi=1-lttil/lntil; srmr=sqrt((q-1)/(q+1))*sasrmr; tli=(nchisq/ndf-tchisq/tdf)/(nchisq/ndf-1); nfactor=s; nvar=q; format srmr ecvi ecvis cfi pclose pexact pdif dfdif rmsea tli 9.3; cards; 1 801.898 135 22268.507 153 522 18 2 620.400 118 22268.507 153 522 18 3 427.631 102 22268.507 153 522 18 proc print ; var nfactor nvar tchisq tdf pexact tli cfi; run;