Regression with observed variables using SAS proc calis
/**************************** SATcalisReg.sas ****************************/ title 'Open SAT Data: Fit a regression model with proc calis'; title2 'Jerry Brunner: Student Number 999999999'; data PennState; infile '/folders/myfolders/431s17/openSAT.data.txt' firstobs=2; input id verbal math gpa; /* Skipping the header */ ods graphics off; /* Suppress regression plots */ proc reg; title3 'Proc reg for comparison'; model gpa = verbal math; proc calis vardef=n nostand; /* Use n in the denominator for pure MLEs Suppress standardized output */ title3 'Surface regression with proc calis'; var verbal math gpa; /* Declare observed variables */ lineqs /* Give model equation(s) */ gpa = beta0*Intercept + beta1*verbal + beta2*math + epsilon; variance /* Declare variance parameters */ verbal = phi11, math = phi22, epsilon = sigmasq; cov /* Declare non-zero covariance parameters */ verbal math = phi12; mean /* Declare non-zero mean parameters */ verbal = mu1, math = mu2; run; /* The final run statement is not strictly necessary in SAS Studio. */
Vocabulary used by proc calis: