Notice that this chapter is done in HLM 6.04. The data set used here is pupcross.sas7bdat. Below are the screen shots for the steps in creating the MDM file for the analysis. Notice that we use the same data file for all levels of specification. Also, notice that in this data set, the variable pdenom is a primary school level variable and by reasoning, sdenom should be a secondary school level variable. But for some reason, it is not. So we have treated it as a level-1 variable.
Step 1: Choose the analysis type:
Step 2: Select the SAS data file — individual data file and specify id variables and level-1 variables. In the setting of cross-classified, it requires two identification variables, the row identification variable and the column identification variable.
Step 3: Specify row-factor file, in this case, we still use the same data file since it contains variables at all levels
Step 4: Specify column-factor file, in this case, we still use the same data file since it contains variables at all levels
Step 5: Save mdmt file and MDM file
Step 6: Almost done! Click on "Make MDM" and then click on "Check Stats", you will see the following. Then you can click on "Done"!
LEVEL-1 DESCRIPTIVE STATISTICS VARIABLE NAME N MEAN SD MINIMUM MAXIMUM ACHIEV 1000 6.34 0.87 3.90 9.90 PUPSEX 1000 0.47 0.50 0.00 1.00 PUPSES 1000 4.10 1.40 1.00 6.00 PDENOM 1000 0.58 0.49 0.00 1.00 SDENOM 1000 0.67 0.47 0.00 1.00 ROW LEVEL DESCRIPTIVE STATISTICS VARIABLE NAME N MEAN SD MINIMUM MAXIMUM PDENOM 50 0.60 0.49 0.00 1.00 COLUMN LEVEL DESCRIPTIVE STATISTICS VARIABLE NAME N MEAN SD MINIMUM MAXIMUM SDENOM 30 0.70 0.47 0.00 1.00
Finally, we are ready to run models for this chapter. We assume that you will start with the setting below.
Table 7.1 on page 127.
Part 1: Intercept only
Final estimation of fixed effects: ------------------------------------------------------------------------------ Standard Approx. Fixed Effect Coefficient Error T-ratio d.f. P-value ------------------------------------------------------------------------------ For INTRCPT1, P0 INTERCEPT,theta0 6.348654 0.078306 81.075 999 0.000 ------------------------------------------------------------------------------ Final estimation of row and level-1 variance components: ----------------------------------------------------------------------------- Random Effect Standard Variance df Chi-square P-value Deviation Component ----------------------------------------------------------------------------- INTRCPT1, b00 0.41152 0.16935 49 382.20431 0.000 level-1, e 0.71636 0.51317 ----------------------------------------------------------------------------- Final estimation of column level variance components: ----------------------------------------------------------------------------- Random Effect Standard Variance df Chi-square P-value Deviation Component ----------------------------------------------------------------------------- INTRCPT1, c00 0.25572 0.06539 29 153.79260 0.000 ----------------------------------------------------------------------------- Statistics for current covariance components model -------------------------------------------------- Deviance = 2317.848527 Number of estimated parameters = 4
Part 2: intercept plus pupil level variables.
Final estimation of fixed effects: ------------------------------------------------------------------------------ Standard Approx. Fixed Effect Coefficient Error T-ratio d.f. P-value ------------------------------------------------------------------------------ For INTRCPT1, P0 INTERCEPT,theta0 5.755482 0.105266 54.676 997 0.000 For PUPSEX, P1 INTERCEPT,theta1 0.261313 0.045637 5.726 997 0.000 For PUPSES, P2 INTERCEPT,theta2 0.114086 0.016100 7.086 997 0.000 ------------------------------------------------------------------------------ Final estimation of row and level-1 variance components: ----------------------------------------------------------------------------- Random Effect Standard Variance df Chi-square P-value Deviation Component ----------------------------------------------------------------------------- INTRCPT1, b00 0.41109 0.16900 49 413.16883 0.000 level-1, e 0.68866 0.47426 ----------------------------------------------------------------------------- Final estimation of column level variance components: ----------------------------------------------------------------------------- Random Effect Standard Variance df Chi-square P-value Deviation Component ----------------------------------------------------------------------------- INTRCPT1, c00 0.25219 0.06360 29 158.99295 0.000 ----------------------------------------------------------------------------- Statistics for current covariance components model -------------------------------------------------- Deviance = 2243.482712 Number of estimated parameters = 6
Part 3: primary by secondary school crossed with pupil and school variables.
Final estimation of fixed effects: ------------------------------------------------------------------------------ Standard Approx. Fixed Effect Coefficient Error T-ratio d.f. P-value ------------------------------------------------------------------------------ For INTRCPT1, P0 INTERCEPT,theta0 5.518501 0.140764 39.204 995 0.000 PDENOM, G01 0.204122 0.124102 1.645 995 0.100 For PUPSEX, P1 INTERCEPT,theta1 0.263078 0.045610 5.768 995 0.000 For PUPSES, P2 INTERCEPT,theta2 0.113565 0.016094 7.056 995 0.000 For SDENOM, P3 INTERCEPT,theta3 0.176157 0.094644 1.861 995 0.063 ------------------------------------------------------------------------------ Final estimation of row and level-1 variance components: ----------------------------------------------------------------------------- Random Effect Standard Variance df Chi-square P-value Deviation Component ----------------------------------------------------------------------------- INTRCPT1, b00 0.39926 0.15941 48 393.08705 0.000 level-1, e 0.68855 0.47411 ----------------------------------------------------------------------------- Final estimation of column level variance components: ----------------------------------------------------------------------------- Random Effect Standard Variance df Chi-square P-value Deviation Component ----------------------------------------------------------------------------- INTRCPT1, c00 0.23540 0.05541 28 140.43304 0.000 ----------------------------------------------------------------------------- Statistics for current covariance components model -------------------------------------------------- Deviance = 2237.475186 Number of estimated parameters = 8
Part 4: primary by secondary school crossed with pupil and school variables with variable pupses being modeled as a random effect.
Final estimation of fixed effects: ------------------------------------------------------------------------------ Standard Approx. Fixed Effect Coefficient Error T-ratio d.f. P-value ------------------------------------------------------------------------------ For INTRCPT1, P0 INTERCEPT,theta0 5.532392 0.137416 40.260 995 0.000 PDENOM, G01 0.199912 0.117628 1.700 995 0.089 For PUPSEX, P1 INTERCEPT,theta1 0.253173 0.045302 5.589 995 0.000 For PUPSES, P2 INTERCEPT,theta2 0.114227 0.020454 5.585 995 0.000 For SDENOM, P3 INTERCEPT,theta3 0.164575 0.093439 1.761 995 0.078 ------------------------------------------------------------------------------ Final estimation of row and level-1 variance components: ----------------------------------------------------------------------------- Random Effect Standard Variance df Chi-square P-value Deviation Component ----------------------------------------------------------------------------- INTRCPT1, b00 0.38478 0.14805 48 384.31761 0.000 PUPSES slope, b20 0.08940 0.00799 49 306.75748 0.000 level-1, e 0.67704 0.45838 ----------------------------------------------------------------------------- Final estimation of column level variance components: ----------------------------------------------------------------------------- Random Effect Standard Variance df Chi-square P-value Deviation Component ----------------------------------------------------------------------------- INTRCPT1, c00 0.23180 0.05373 28 138.97561 0.000 ----------------------------------------------------------------------------- Statistics for current covariance components model -------------------------------------------------- Deviance = 2224.475392 Number of estimated parameters = 10