The script starts by creating a 'growth' dataset via a DATA step with embedded data (datalines), representing repeated measures (y1 to y5). Then, it executes two distinct analyses with PROC CALIS. The first analysis fits a latent growth curve model with an equality constraint on error variances. The second analysis fits a similar model but without this constraint, allowing for the estimation of different error variances for each measurement time. The objective is to model growth using a latent intercept (f_alpha) and slope (f_beta).
Data Analysis
Type : CREATION_INTERNE
Data is generated and contained within the script itself using a DATA step and the 'datalines' statement, creating the 'growth' table.
1 Code Block
DATA STEP Data
Explanation : This DATA STEP block creates the 'growth' table by reading 5 variables (y1 to y5) from data embedded directly in the code via the 'datalines' statement.
Explanation : This block uses PROC CALIS to fit a latent growth curve model by maximum likelihood (method=ml). It defines linear equations (LINEQS) for observed variables as a function of a latent intercept (f_alpha) and slope (f_beta). A constraint is imposed so that the variances of the five error terms (e1-e5) are equal (5 * evar).
Explanation : This second PROC CALIS block fits a model similar to the previous one, but removes the constraint on error variances. The 'variance e1-e5;' statement allows for the estimation of a distinct variance for each error term, offering greater model flexibility.
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.