------------------------------------------------------------------------------- name: log: Q:\C-modelling\runmlwin\website\logfiles\2020-03-27\16\3.3.smcl log type: smcl opened on: 27 Mar 2020, 18:21:16 . **************************************************************************** . * Module 3: Multiple Regression Stata Practicals . * . * P3.3: Regression with More than One Explanatory Variable (Multiple . * Regression) . * . * George Leckie . * Centre for Multilevel Modelling, 2010 . **************************************************************************** . * Stata do-file to replicate all analyses using runmlwin . * . * George Leckie . * Centre for Multilevel Modelling, 2013 . * http://www.bristol.ac.uk/cmm/software/runmlwin/ . **************************************************************************** . . use "http://www.bristol.ac.uk/cmm/media/runmlwin/3.3.dta", clear . . runmlwin score cons cohort90 female sclass1 sclass2 sclass4, /// > level1(caseid: cons) /// > mlwinsettings(optimat) nopause MLwiN 3.05 multilevel model Number of obs = 33988 Normal response model (hierarchical) Estimation algorithm: IGLS Run time (seconds) = 0.70 Number of iterations = 2 Log likelihood = -139244.65 Deviance = 278489.29 ------------------------------------------------------------------------------ score | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- cons | 23.70118 .1723892 137.49 0.000 23.36331 24.03906 cohort90 | 1.211361 .014866 81.49 0.000 1.182224 1.240498 female | 2.031688 .1582625 12.84 0.000 1.721499 2.341876 sclass1 | 13.18046 .2047002 64.39 0.000 12.77926 13.58167 sclass2 | 6.979329 .2088942 33.41 0.000 6.569903 7.388754 sclass4 | -4.065042 .2935063 -13.85 0.000 -4.640304 -3.489781 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval] -----------------------------+------------------------------------------------ Level 1: caseid | var(cons) | 211.8496 1.625099 208.6644 215.0347 ------------------------------------------------------------------------------ . . tabulate cohort90 sclass, row +----------------+ | Key | |----------------| | frequency | | row percentage | +----------------+ | Social class Cohort | 1 2 3 4 | Total -----------+--------------------------------------------+---------- -6 | 1,601 1,902 2,268 707 | 6,478 | 24.71 29.36 35.01 10.91 | 100.00 -----------+--------------------------------------------+---------- -4 | 1,816 1,950 1,966 593 | 6,325 | 28.71 30.83 31.08 9.38 | 100.00 -----------+--------------------------------------------+---------- -2 | 1,755 1,624 1,431 435 | 5,245 | 33.46 30.96 27.28 8.29 | 100.00 -----------+--------------------------------------------+---------- 0 | 1,558 1,287 1,210 316 | 4,371 | 35.64 29.44 27.68 7.23 | 100.00 -----------+--------------------------------------------+---------- 6 | 1,585 1,184 991 484 | 4,244 | 37.35 27.90 23.35 11.40 | 100.00 -----------+--------------------------------------------+---------- 8 | 2,858 2,047 1,620 800 | 7,325 | 39.02 27.95 22.12 10.92 | 100.00 -----------+--------------------------------------------+---------- Total | 11,173 9,994 9,486 3,335 | 33,988 | 32.87 29.40 27.91 9.81 | 100.00 . end of do-file