The data is provided as a covariance matrix directly in the code using a DATA step and the 'datalines' statement. The 'cognitive1' table is therefore entirely generated by the script.
1 Code Block
DATA STEP Data
Explanation : This block creates a SAS dataset named 'cognitive1' of type COV (covariance matrix). Data is entered manually via the 'datalines' statement. The matrix represents the covariances between nine variables measuring cognitive abilities (reading, mathematics, writing).
Explanation : This block performs a confirmatory factor analysis on 'cognitive1' data for 64 observations (nobs=64). It defines a three-factor orthogonal model: 'Read_Factor', 'Math_Factor', and 'Write_Factor'. Orthogonality is ensured by the 'cov' statement which fixes covariances between factors to zero. The 'modification' option requests modification indices to improve model fit.
Explanation : This second block performs a similar analysis, but by commenting out the 'cov' statement. In the absence of this constraint, PROC CALIS freely estimates the covariances between the three factors. This allows testing an alternative model where reading, mathematics, and writing factors are allowed to be correlated with each other.
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.