STA313 F 2004 Handout 6
Simple Regression as a Structural Equation model
/* simplereg.sas */ options linesize=79 noovp formdlim='_'; title 'Simple regression as a structural equation model with proc calis'; data simple; infile 'simplereg.dat'; input x y; proc reg simple; title2 'For comparison, simple regression with proc reg'; model y = x /noint; proc calis cov; /* Analyze the covariance matrix (Default is corr) */ title2 'Full (unrestricted) Model'; var x y; /* Manafest vars are in the data set */ lineqs /* Simultaneous equations, separated by commas */ y = b x + e; std /* Variances (not standard deviations) */ x = sigxx , /* Optional starting values in parentheses */ e = sigee ; cov /* Covariances */ x e = 0; bounds 0.0 < sigxx, 0.0 < sigee; proc calis cov; title2 'Reduced (restricted) Model'; var x y; lineqs y = e; /* Setting b = 0 */ std x = sigxx , e = sigee ; cov x e = 0; bounds 0.0 < sigxx, 0.0 < sigee; /* Moral: You never have to fit a saturated full model */
Here is simplereg.lst
______________________________________________________________________________ Simple regression as a structural equation model with proc calis 1 For comparison, simple regression with proc reg 14:08 Friday, October 15, 2004 Descriptive Statistics Variables Sum Mean Uncorrected SS INTERCEP 250 1 250 X -56.27871787 -0.225114871 1014.0011343 Y 90.83210452 0.3633284181 2313.4725451 Variables Variance Std Deviation INTERCEP 0 0 X 4.0214134856 2.0053462259 Y 9.1585167079 3.0263041334 _______________________________________________________________________________ Simple regression as a structural equation model with proc calis 2 For comparison, simple regression with proc reg 14:08 Friday, October 15, 2004 Model: MODEL1 NOTE: No intercept in model. R-square is redefined. Dependent Variable: Y Analysis of Variance Sum of Mean Source DF Squares Square F Value Prob>F Model 1 2.25923 2.25923 0.243 0.6222 Error 249 2311.21332 9.28198 U Total 250 2313.47255 Root MSE 3.04663 R-square 0.0010 Dep Mean 0.36333 Adj R-sq -0.0030 C.V. 838.53457 Parameter Estimates Parameter Standard T for H0: Variable DF Estimate Error Parameter=0 Prob > |T| X 1 -0.047202 0.09567558 -0.493 0.6222 _______________________________________________________________________________ Simple regression as a structural equation model with proc calis 3 Full (unrestricted) Model 14:08 Friday, October 15, 2004 Covariance Structure Analysis: Pattern and Initial Values LINEQS Model Statement ------------------------------- Matrix Rows & Cols Matrix Type TERM 1----------------------------------------------------------- 1 _SEL_ 2 3 SELECTION 2 _BETA_ 3 3 EQSBETA IMINUSINV 3 _GAMMA_ 3 2 EQSGAMMA 4 _PHI_ 2 2 SYMMETRIC Number of endogenous variables = 1 Manifest: Y Number of exogenous variables = 2 Manifest: X Error: E _______________________________________________________________________________ Simple regression as a structural equation model with proc calis 4 Full (unrestricted) Model 14:08 Friday, October 15, 2004 Covariance Structure Analysis: Pattern and Initial Values Manifest Variable Equations Initial Estimates Y = . *X + 1.0000 E B Variances of Exogenous Variables ------------------------------------- Variable Parameter Estimate ------------------------------------- X SIGXX . E SIGEE . _______________________________________________________________________________ Simple regression as a structural equation model with proc calis 5 Full (unrestricted) Model 14:08 Friday, October 15, 2004 Covariance Structure Analysis: Maximum Likelihood Estimation 250 Observations Model Terms 1 2 Variables Model Matrices 4 3 Informations Parameters 3 VARIABLE Mean Std Dev X -.2251148715 2.005346226 Y 0.3633284181 3.026304133 Set covariances of exogenous manifest variables: X Some initial estimates computed by two-stage LS method. Vector of Initial Estimates B 1 -0.02738 Matrix Entry: _GAMMA_[1:1] SIGXX 2 4.02141 Matrix Entry: _PHI_[1:1] SIGEE 3 9.15550 Matrix Entry: _PHI_[2:2] _______________________________________________________________________________ Simple regression as a structural equation model with proc calis 6 Full (unrestricted) Model 14:08 Friday, October 15, 2004 Covariance Structure Analysis: Maximum Likelihood Estimation Levenberg-Marquardt Optimization Scaling Update of More (1978) Number of Parameter Estimates 3 Number of Functions (Observations) 3 Number of Lower Bounds 2 Number of Upper Bounds 0 Optimization Start: Active Constraints= 0 Criterion= 0.000 Maximum Gradient Element= 0.000 Radius= 1.000 Iter rest nfun act optcrit difcrit maxgrad lambda rho Optimization Results: Iterations= 0 Function Calls= 2 Jacobian Calls= 1 Active Constraints= 0 Criterion= 0 Maximum Gradient Element= 3.20357E-17 Lambda= 0 Rho= 0 Radius= 1 NOTE: ABSGCONV convergence criterion satisfied. _______________________________________________________________________________ Simple regression as a structural equation model with proc calis 7 Full (unrestricted) Model 14:08 Friday, October 15, 2004 Covariance Structure Analysis: Maximum Likelihood Estimation Fit criterion . . . . . . . . . . . . . . . . . . 0.0000 Goodness of Fit Index (GFI) . . . . . . . . . . . 1.0000 GFI Adjusted for Degrees of Freedom (AGFI). . . . . Root Mean Square Residual (RMR) . . . . . . . . . 0.0000 Parsimonious GFI (Mulaik, 1989) . . . . . . . . . 0.0000 Chi-square = 0.0000 df = 0 Prob>chi**2 = 0.0001 Null Model Chi-square: df = 1 0.0820 RMSEA Estimate . . . . . . . . . . . 0.0000 90%C.I.[., .] Probability of Close Fit . . . . . . . . . . . . . ECVI Estimate . . . . . . . . . . . . 0.0244 90%C.I.[., .] Bentler's Comparative Fit Index . . . . . . . . . . Normal Theory Reweighted LS Chi-square . . . . . 0.0000 Akaike's Information Criterion. . . . . . . . . . 0.0000 Bozdogan's (1987) CAIC. . . . . . . . . . . . . . 0.0000 Schwarz's Bayesian Criterion. . . . . . . . . . . 0.0000 McDonald's (1989) Centrality. . . . . . . . . . . 1.0000 Bentler & Bonett's (1980) Non-normed Index. . . . . Bentler & Bonett's (1980) NFI . . . . . . . . . . 1.0000 James, Mulaik, & Brett (1982) Parsimonious NFI. . 0.0000 Z-Test of Wilson & Hilferty (1931). . . . . . . . . Bollen (1986) Normed Index Rho1 . . . . . . . . . . Bollen (1988) Non-normed Index Delta2 . . . . . . 1.0000 Hoelter's (1983) Critical N . . . . . . . . . . . . _______________________________________________________________________________ Simple regression as a structural equation model with proc calis 8 Full (unrestricted) Model 14:08 Friday, October 15, 2004 Covariance Structure Analysis: Maximum Likelihood Estimation Manifest Variable Equations Y = - 0.0274*X + 1.0000 E Std Err 0.0956 B t Value -0.2863 Variances of Exogenous Variables --------------------------------------------------------------------- Standard Variable Parameter Estimate Error t Value --------------------------------------------------------------------- X SIGXX 4.021413 0.360408 11.158 E SIGEE 9.155502 0.820536 11.158 _______________________________________________________________________________ Simple regression as a structural equation model with proc calis 9 Full (unrestricted) Model 14:08 Friday, October 15, 2004 Covariance Structure Analysis: Maximum Likelihood Estimation Equations with Standardized Coefficients Y = - 0.0181*X + 0.9998 E B Squared Multiple Correlations ---------------------------------------------------------- Error Total Variable Variance Variance R-squared ---------------------------------------------------------- 1 Y 9.155502 9.158517 0.000329 _______________________________________________________________________________ Simple regression as a structural equation model with proc calis 10 Reduced (restricted) Model 14:08 Friday, October 15, 2004 Covariance Structure Analysis: Pattern and Initial Values LINEQS Model Statement ------------------------------- Matrix Rows & Cols Matrix Type TERM 1----------------------------------------------------------- 1 _SEL_ 2 3 SELECTION 2 _BETA_ 3 3 EQSBETA IMINUSINV 3 _GAMMA_ 3 2 EQSGAMMA 4 _PHI_ 2 2 SYMMETRIC Number of endogenous variables = 1 Manifest: Y Number of exogenous variables = 2 Manifest: X Error: E _______________________________________________________________________________ Simple regression as a structural equation model with proc calis 11 Reduced (restricted) Model 14:08 Friday, October 15, 2004 Covariance Structure Analysis: Pattern and Initial Values Manifest Variable Equations Initial Estimates Y = 1.0000 E Variances of Exogenous Variables ------------------------------------- Variable Parameter Estimate ------------------------------------- X SIGXX . E SIGEE . _______________________________________________________________________________ Simple regression as a structural equation model with proc calis 12 Reduced (restricted) Model 14:08 Friday, October 15, 2004 Covariance Structure Analysis: Maximum Likelihood Estimation 250 Observations Model Terms 1 2 Variables Model Matrices 4 3 Informations Parameters 2 VARIABLE Mean Std Dev X -.2251148715 2.005346226 Y 0.3633284181 3.026304133 Set covariances of exogenous manifest variables: X Vector of Initial Estimates SIGXX 1 4.02141 Matrix Entry: _PHI_[1:1] SIGEE 2 9.15852 Matrix Entry: _PHI_[2:2] Predetermined Elements of the Predicted Moment Matrix X Y X . 0 Y 0 . WARNING: The predicted moment matrix has 1 constant elements whose values differ from those of the observed moment matrix. The sum of squared differences is 0.012122346 . NOTE: Only 1 elements of the moment matrix are used in the model specification. _______________________________________________________________________________ Simple regression as a structural equation model with proc calis 13 Reduced (restricted) Model 14:08 Friday, October 15, 2004 Covariance Structure Analysis: Maximum Likelihood Estimation Levenberg-Marquardt Optimization Scaling Update of More (1978) Number of Parameter Estimates 2 Number of Functions (Observations) 3 Number of Lower Bounds 2 Number of Upper Bounds 0 Optimization Start: Active Constraints= 0 Criterion= 0.000 Maximum Gradient Element= 0.000 Radius= 1.000 Iter rest nfun act optcrit difcrit maxgrad lambda rho Optimization Results: Iterations= 0 Function Calls= 2 Jacobian Calls= 1 Active Constraints= 0 Criterion= 0.0003291958 Maximum Gradient Element= 2.76078E-17 Lambda= 0 Rho= 0 Radius= 1 NOTE: ABSGCONV convergence criterion satisfied. _______________________________________________________________________________ Simple regression as a structural equation model with proc calis 14 Reduced (restricted) Model 14:08 Friday, October 15, 2004 Covariance Structure Analysis: Maximum Likelihood Estimation Fit criterion . . . . . . . . . . . . . . . . . . 0.0003 Goodness of Fit Index (GFI) . . . . . . . . . . . 0.9997 GFI Adjusted for Degrees of Freedom (AGFI). . . . 0.9990 Root Mean Square Residual (RMR) . . . . . . . . . 0.0636 Parsimonious GFI (Mulaik, 1989) . . . . . . . . . 0.9997 Chi-square = 0.0820 df = 1 Prob>chi**2 = 0.7746 Null Model Chi-square: df = 1 0.0820 RMSEA Estimate . . . . . . . . . 0.0000 90%C.I.[., 0.1115] Probability of Close Fit . . . . . . . . . . . . 0.8335 ECVI Estimate . . . . . . . . . . 0.0166 90%C.I.[., 0.0329] Bentler's Comparative Fit Index . . . . . . . . . . Normal Theory Reweighted LS Chi-square . . . . . 0.0820 Akaike's Information Criterion. . . . . . . . . . -1.9180 Bozdogan's (1987) CAIC. . . . . . . . . . . . . . -6.4395 Schwarz's Bayesian Criterion. . . . . . . . . . . -5.4395 McDonald's (1989) Centrality. . . . . . . . . . . 1.0018 Bentler & Bonett's (1980) Non-normed Index. . . . -0.0000 Bentler & Bonett's (1980) NFI . . . . . . . . . . 0.0000 James, Mulaik, & Brett (1982) Parsimonious NFI. . 0.0000 Z-Test of Wilson & Hilferty (1931). . . . . . . . -0.7284 Bollen (1986) Normed Index Rho1 . . . . . . . . . 0.0000 Bollen (1988) Non-normed Index Delta2 . . . . . . -0.0000 Hoelter's (1983) Critical N . . . . . . . . . . . 11671 _______________________________________________________________________________ Simple regression as a structural equation model with proc calis 15 Reduced (restricted) Model 14:08 Friday, October 15, 2004 Covariance Structure Analysis: Maximum Likelihood Estimation Manifest Variable Equations Y = 1.0000 E Variances of Exogenous Variables --------------------------------------------------------------------- Standard Variable Parameter Estimate Error t Value --------------------------------------------------------------------- X SIGXX 4.021413 0.360408 11.158 E SIGEE 9.158517 0.820806 11.158 _______________________________________________________________________________ Simple regression as a structural equation model with proc calis 16 Reduced (restricted) Model 14:08 Friday, October 15, 2004 Covariance Structure Analysis: Maximum Likelihood Estimation Equations with Standardized Coefficients Y = 1.0000 E Squared Multiple Correlations ---------------------------------------------------------- Error Total Variable Variance Variance R-squared ---------------------------------------------------------- 1 Y 9.158517 9.158517 0