R version 4.4.1 (2024-06-14 ucrt) -- "Race for Your Life" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > ############################################################################ > # MLwiN MCMC Manual > # > # 16 Multiple Membership Models . . . . . . . . . . . . . . . . . . . . 231 > # > # Browne, W.J. (2009) MCMC Estimation in MLwiN, v2.13. Centre for > # Multilevel Modelling, University of Bristol. > ############################################################################ > # R script to replicate all analyses using R2MLwiN > # > # Zhang, Z., Charlton, C., Parker, R, Leckie, G., and Browne, W.J. > # Centre for Multilevel Modelling, 2012 > # http://www.bristol.ac.uk/cmm/software/R2MLwiN/ > ############################################################################ > > # 16.1 Notation and weightings . . . . . . . . . . . . . . . . . . . . . 232 > > # 16.2 Office workers salary dataset . . . . . . . . . . . . . . . . . . 232 > > library(R2MLwiN) R2MLwiN: A package to run models implemented in MLwiN from R Copyright 2013-2024 Zhengzheng Zhang, Christopher M. J. Charlton, Richard M. A. Parker, William J. Browne and George Leckie Support provided by the Economic and Social Research Council (ESRC) (Grants RES-149-25-1084, RES-576-25-0032 and ES/K007246/1) To cite R2MLwiN in publications use: Zhengzheng Zhang, Richard M. A. Parker, Christopher M. J. Charlton, George Leckie, William J. Browne (2016). R2MLwiN: A Package to Run MLwiN from within R. Journal of Statistical Software, 72(10), 1-43. doi:10.18637/jss.v072.i10 A BibTeX entry for LaTeX users is @Article{, title = {{R2MLwiN}: A Package to Run {MLwiN} from within {R}}, author = {Zhengzheng Zhang and Richard M. A. Parker and Christopher M. J. Charlton and George Leckie and William J. Browne}, journal = {Journal of Statistical Software}, year = {2016}, volume = {72}, number = {10}, pages = {1--43}, doi = {10.18637/jss.v072.i10}, } The MLwiN_path option is currently set to C:/Program Files/MLwiN v3.11/ To change this use: options(MLwiN_path="") > # MLwiN folder > mlwin <- getOption("MLwiN_path") > while (!file.access(mlwin, mode = 1) == 0) { + cat("Please specify the root MLwiN folder or the full path to the MLwiN executable:\n") + mlwin <- scan(what = character(0), sep = "\n") + mlwin <- gsub("\\", "/", mlwin, fixed = TRUE) + } > options(MLwiN_path = mlwin) > > ## Read wage1 data > data(wage1, package = "R2MLwiN") > > summary(wage1) id company company2 company3 Min. : 1.0 Min. : 1.00 Min. : 0.000 Min. : 0.000 1st Qu.: 756.2 1st Qu.: 20.00 1st Qu.: 0.000 1st Qu.: 0.000 Median :1511.5 Median : 41.00 Median : 0.000 Median : 0.000 Mean :1511.5 Mean : 48.87 Mean : 9.813 Mean : 1.151 3rd Qu.:2266.8 3rd Qu.: 67.00 3rd Qu.: 0.000 3rd Qu.: 0.000 Max. :3022.0 Max. :141.00 Max. :141.000 Max. :140.000 company4 age parttime sex cons Min. : 0.00000 Min. :16.00 Fulltime:2753 male :1763 Min. :1 1st Qu.: 0.00000 1st Qu.:32.00 Parttime: 269 female:1259 1st Qu.:1 Median : 0.00000 Median :39.00 Median :1 Mean : 0.06618 Mean :38.77 Mean :1 3rd Qu.: 0.00000 3rd Qu.:46.00 3rd Qu.:1 Max. :131.00000 Max. :65.00 Max. :1 earnings logearn numjobs weight1 Min. : 2.40 Min. :0.8755 Min. :1.000 Min. :0.01923 1st Qu.: 12.30 1st Qu.:2.5096 1st Qu.:1.000 1st Qu.:1.00000 Median : 18.40 Median :2.9124 Median :1.000 Median :1.00000 Mean : 21.83 Mean :2.9102 Mean :1.193 Mean :0.91003 3rd Qu.: 27.10 3rd Qu.:3.2995 3rd Qu.:1.000 3rd Qu.:1.00000 Max. :135.60 Max. :4.9097 Max. :4.000 Max. :1.00000 weight2 weight3 weight4 ew1 Min. :0.00000 Min. :0.000000 Min. :0.0000000 Min. :0.2500 1st Qu.:0.00000 1st Qu.:0.000000 1st Qu.:0.0000000 1st Qu.:1.0000 Median :0.00000 Median :0.000000 Median :0.0000000 Median :1.0000 Mean :0.08384 Mean :0.005908 Mean :0.0002151 Mean :0.9099 3rd Qu.:0.00000 3rd Qu.:0.000000 3rd Qu.:0.0000000 3rd Qu.:1.0000 Max. :0.98077 Max. :0.800000 Max. :0.4000000 Max. :1.0000 ew2 ew3 ew4 age_40 Min. :0.00000 Min. :0.000000 Min. :0.0000000 Min. :-24.000 1st Qu.:0.00000 1st Qu.:0.000000 1st Qu.:0.0000000 1st Qu.: -8.000 Median :0.00000 Median :0.000000 Median :0.0000000 Median : -1.000 Mean :0.08399 Mean :0.005913 Mean :0.0001655 Mean : -1.229 3rd Qu.:0.00000 3rd Qu.:0.000000 3rd Qu.:0.0000000 3rd Qu.: 6.000 Max. :0.50000 Max. :0.334000 Max. :0.2500000 Max. : 25.000 > hist(wage1$earnings) > hist(wage1$logearn, breaks = 20) > > (mymodel <- runMLwiN(logearn ~ 1 + age_40 + numjobs + (1 | id), estoptions = list(EstM = 1), data = wage1)) MLwiN is running, please wait...... /nogui option ignored ECHO 0 Echoing is ON BATC 1 Batch mode is ON MAXI 2 STAR iteration 0 iteration 1 Convergence achieved TOLE 2 MAXI 20 BATC 1 Batch mode is ON NEXT iteration 2 Convergence achieved ECHO 0 Echoing is ON MCMC 0 500 1 5.8 50 10 1 1 1 1 1 1 BURNING IN... Burning in for 50 iterations out of 500 -2 * Loglike = 5202.519724 Burning in for 100 iterations out of 500 -2 * Loglike = 5198.692637 Burning in for 150 iterations out of 500 -2 * Loglike = 5198.705318 Burning in for 200 iterations out of 500 -2 * Loglike = 5197.893197 Burning in for 250 iterations out of 500 -2 * Loglike = 5199.591031 Burning in for 300 iterations out of 500 -2 * Loglike = 5198.792537 Burning in for 350 iterations out of 500 -2 * Loglike = 5198.883830 Burning in for 400 iterations out of 500 -2 * Loglike = 5204.390924 Burning in for 450 iterations out of 500 -2 * Loglike = 5200.155533 Burning in for 500 iterations out of 500 -2 * Loglike = 5196.115660 ERAS c1090 c1091 MCMC 1 5000 1 c1090 c1091 c1003 c1004 1 1 Actual update 50 of 5000, Stored update 50 of 5000 -2 * Loglike = 5202.161339 Actual update 100 of 5000, Stored update 100 of 5000 -2 * Loglike = 5197.939162 Actual update 150 of 5000, Stored update 150 of 5000 -2 * Loglike = 5203.320640 Actual update 200 of 5000, Stored update 200 of 5000 -2 * Loglike = 5201.695382 Actual update 250 of 5000, Stored update 250 of 5000 -2 * Loglike = 5197.181295 Actual update 300 of 5000, Stored update 300 of 5000 -2 * Loglike = 5202.438042 Actual update 350 of 5000, Stored update 350 of 5000 -2 * Loglike = 5198.003083 Actual update 400 of 5000, Stored update 400 of 5000 -2 * Loglike = 5196.547367 Actual update 450 of 5000, Stored update 450 of 5000 -2 * Loglike = 5198.641763 Actual update 500 of 5000, Stored update 500 of 5000 -2 * Loglike = 5198.110377 Actual update 550 of 5000, Stored update 550 of 5000 -2 * Loglike = 5196.999458 Actual update 600 of 5000, Stored update 600 of 5000 -2 * Loglike = 5204.701469 Actual update 650 of 5000, Stored update 650 of 5000 -2 * Loglike = 5199.548341 Actual update 700 of 5000, Stored update 700 of 5000 -2 * Loglike = 5203.759397 Actual update 750 of 5000, Stored update 750 of 5000 -2 * Loglike = 5198.331273 Actual update 800 of 5000, Stored update 800 of 5000 -2 * Loglike = 5196.980107 Actual update 850 of 5000, Stored update 850 of 5000 -2 * Loglike = 5211.750829 Actual update 900 of 5000, Stored update 900 of 5000 -2 * Loglike = 5200.777008 Actual update 950 of 5000, Stored update 950 of 5000 -2 * Loglike = 5196.994270 Actual update 1000 of 5000, Stored update 1000 of 5000 -2 * Loglike = 5200.557587 Actual update 1050 of 5000, Stored update 1050 of 5000 -2 * Loglike = 5199.092277 Actual update 1100 of 5000, Stored update 1100 of 5000 -2 * Loglike = 5199.073678 Actual update 1150 of 5000, Stored update 1150 of 5000 -2 * Loglike = 5199.911432 Actual update 1200 of 5000, Stored update 1200 of 5000 -2 * Loglike = 5199.847094 Actual update 1250 of 5000, Stored update 1250 of 5000 -2 * Loglike = 5198.594038 Actual update 1300 of 5000, Stored update 1300 of 5000 -2 * Loglike = 5201.516854 Actual update 1350 of 5000, Stored update 1350 of 5000 -2 * Loglike = 5209.098985 Actual update 1400 of 5000, Stored update 1400 of 5000 -2 * Loglike = 5198.533622 Actual update 1450 of 5000, Stored update 1450 of 5000 -2 * Loglike = 5203.310106 Actual update 1500 of 5000, Stored update 1500 of 5000 -2 * Loglike = 5197.675918 Actual update 1550 of 5000, Stored update 1550 of 5000 -2 * Loglike = 5196.168443 Actual update 1600 of 5000, Stored update 1600 of 5000 -2 * Loglike = 5198.465735 Actual update 1650 of 5000, Stored update 1650 of 5000 -2 * Loglike = 5201.831375 Actual update 1700 of 5000, Stored update 1700 of 5000 -2 * Loglike = 5200.310266 Actual update 1750 of 5000, Stored update 1750 of 5000 -2 * Loglike = 5201.481649 Actual update 1800 of 5000, Stored update 1800 of 5000 -2 * Loglike = 5199.040532 Actual update 1850 of 5000, Stored update 1850 of 5000 -2 * Loglike = 5200.183560 Actual update 1900 of 5000, Stored update 1900 of 5000 -2 * Loglike = 5196.470545 Actual update 1950 of 5000, Stored update 1950 of 5000 -2 * Loglike = 5202.640522 Actual update 2000 of 5000, Stored update 2000 of 5000 -2 * Loglike = 5203.807107 Actual update 2050 of 5000, Stored update 2050 of 5000 -2 * Loglike = 5202.699663 Actual update 2100 of 5000, Stored update 2100 of 5000 -2 * Loglike = 5201.167013 Actual update 2150 of 5000, Stored update 2150 of 5000 -2 * Loglike = 5197.623862 Actual update 2200 of 5000, Stored update 2200 of 5000 -2 * Loglike = 5201.122482 Actual update 2250 of 5000, Stored update 2250 of 5000 -2 * Loglike = 5196.709664 Actual update 2300 of 5000, Stored update 2300 of 5000 -2 * Loglike = 5197.706112 Actual update 2350 of 5000, Stored update 2350 of 5000 -2 * Loglike = 5198.339096 Actual update 2400 of 5000, Stored update 2400 of 5000 -2 * Loglike = 5200.609491 Actual update 2450 of 5000, Stored update 2450 of 5000 -2 * Loglike = 5196.761975 Actual update 2500 of 5000, Stored update 2500 of 5000 -2 * Loglike = 5200.390282 Actual update 2550 of 5000, Stored update 2550 of 5000 -2 * Loglike = 5199.752224 Actual update 2600 of 5000, Stored update 2600 of 5000 -2 * Loglike = 5197.620055 Actual update 2650 of 5000, Stored update 2650 of 5000 -2 * Loglike = 5199.268878 Actual update 2700 of 5000, Stored update 2700 of 5000 -2 * Loglike = 5203.309142 Actual update 2750 of 5000, Stored update 2750 of 5000 -2 * Loglike = 5197.535010 Actual update 2800 of 5000, Stored update 2800 of 5000 -2 * Loglike = 5205.088734 Actual update 2850 of 5000, Stored update 2850 of 5000 -2 * Loglike = 5199.145924 Actual update 2900 of 5000, Stored update 2900 of 5000 -2 * Loglike = 5199.030065 Actual update 2950 of 5000, Stored update 2950 of 5000 -2 * Loglike = 5198.727941 Actual update 3000 of 5000, Stored update 3000 of 5000 -2 * Loglike = 5197.559617 Actual update 3050 of 5000, Stored update 3050 of 5000 -2 * Loglike = 5198.111632 Actual update 3100 of 5000, Stored update 3100 of 5000 -2 * Loglike = 5200.546461 Actual update 3150 of 5000, Stored update 3150 of 5000 -2 * Loglike = 5197.118938 Actual update 3200 of 5000, Stored update 3200 of 5000 -2 * Loglike = 5206.492970 Actual update 3250 of 5000, Stored update 3250 of 5000 -2 * Loglike = 5198.347272 Actual update 3300 of 5000, Stored update 3300 of 5000 -2 * Loglike = 5200.247357 Actual update 3350 of 5000, Stored update 3350 of 5000 -2 * Loglike = 5199.133262 Actual update 3400 of 5000, Stored update 3400 of 5000 -2 * Loglike = 5197.967071 Actual update 3450 of 5000, Stored update 3450 of 5000 -2 * Loglike = 5196.788505 Actual update 3500 of 5000, Stored update 3500 of 5000 -2 * Loglike = 5204.830364 Actual update 3550 of 5000, Stored update 3550 of 5000 -2 * Loglike = 5201.013924 Actual update 3600 of 5000, Stored update 3600 of 5000 -2 * Loglike = 5200.220701 Actual update 3650 of 5000, Stored update 3650 of 5000 -2 * Loglike = 5200.778722 Actual update 3700 of 5000, Stored update 3700 of 5000 -2 * Loglike = 5196.445974 Actual update 3750 of 5000, Stored update 3750 of 5000 -2 * Loglike = 5197.943457 Actual update 3800 of 5000, Stored update 3800 of 5000 -2 * Loglike = 5200.662784 Actual update 3850 of 5000, Stored update 3850 of 5000 -2 * Loglike = 5202.850211 Actual update 3900 of 5000, Stored update 3900 of 5000 -2 * Loglike = 5199.868263 Actual update 3950 of 5000, Stored update 3950 of 5000 -2 * Loglike = 5201.323033 Actual update 4000 of 5000, Stored update 4000 of 5000 -2 * Loglike = 5199.448283 Actual update 4050 of 5000, Stored update 4050 of 5000 -2 * Loglike = 5196.369354 Actual update 4100 of 5000, Stored update 4100 of 5000 -2 * Loglike = 5207.123503 Actual update 4150 of 5000, Stored update 4150 of 5000 -2 * Loglike = 5199.477739 Actual update 4200 of 5000, Stored update 4200 of 5000 -2 * Loglike = 5197.010704 Actual update 4250 of 5000, Stored update 4250 of 5000 -2 * Loglike = 5197.338612 Actual update 4300 of 5000, Stored update 4300 of 5000 -2 * Loglike = 5201.125875 Actual update 4350 of 5000, Stored update 4350 of 5000 -2 * Loglike = 5201.809324 Actual update 4400 of 5000, Stored update 4400 of 5000 -2 * Loglike = 5200.321382 Actual update 4450 of 5000, Stored update 4450 of 5000 -2 * Loglike = 5197.285711 Actual update 4500 of 5000, Stored update 4500 of 5000 -2 * Loglike = 5201.286269 Actual update 4550 of 5000, Stored update 4550 of 5000 -2 * Loglike = 5198.172861 Actual update 4600 of 5000, Stored update 4600 of 5000 -2 * Loglike = 5205.127070 Actual update 4650 of 5000, Stored update 4650 of 5000 -2 * Loglike = 5197.107263 Actual update 4700 of 5000, Stored update 4700 of 5000 -2 * Loglike = 5198.408466 Actual update 4750 of 5000, Stored update 4750 of 5000 -2 * Loglike = 5195.957469 Actual update 4800 of 5000, Stored update 4800 of 5000 -2 * Loglike = 5201.788873 Actual update 4850 of 5000, Stored update 4850 of 5000 -2 * Loglike = 5198.058916 Actual update 4900 of 5000, Stored update 4900 of 5000 -2 * Loglike = 5204.382510 Actual update 4950 of 5000, Stored update 4950 of 5000 -2 * Loglike = 5196.789597 Actual update 5000 of 5000, Stored update 5000 of 5000 -2 * Loglike = 5198.177788 PUPN c1003 c1004 AVER c1091 b99 b100 Count = 5000 Average = 5199.6 S.D. = 2.7926 S.E.M. = 0.039494 ECHO 0 Execution completed -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- MLwiN (version: 3.11) multilevel model (Normal) Estimation algorithm: MCMC Elapsed time : 0.51s Number of obs: 3022 (from total 3022) Number of iter.: 5000 Chains: 1 Burn-in: 500 Bayesian Deviance Information Criterion (DIC) Dbar D(thetabar) pD DIC 5199.632 5195.623 4.009 5203.641 --------------------------------------------------------------------------------------------------- The model formula: logearn ~ 1 + age_40 + numjobs + (1 | id) Level 1: id --------------------------------------------------------------------------------------------------- The fixed part estimates: Coef. Std. Err. z Pr(>|z|) [95% Cred. Interval] ESS Intercept 3.07936 0.03020 101.95 0 *** 3.02056 3.13845 5000 age_40 0.01215 0.00105 11.58 4.961e-31 *** 0.01015 0.01423 5000 numjobs -0.12926 0.02371 -5.45 4.969e-08 *** -0.17593 -0.08364 5000 Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 --------------------------------------------------------------------------------------------------- The random part estimates at the id level: Coef. Std. Err. [95% Cred. Interval] ESS var_Intercept 0.32725 0.00844 0.31144 0.34442 4700 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- > > (mymodel <- runMLwiN(logearn ~ 1 + age_40 + numjobs + sex + parttime + (1 | id), estoptions = list(EstM = 1), data = wage1)) MLwiN is running, please wait...... /nogui option ignored ECHO 0 Echoing is ON BATC 1 Batch mode is ON MAXI 2 STAR iteration 0 iteration 1 Convergence achieved TOLE 2 MAXI 20 BATC 1 Batch mode is ON NEXT iteration 2 Convergence achieved ECHO 0 Echoing is ON MCMC 0 500 1 5.8 50 10 1 1 1 1 1 1 BURNING IN... Burning in for 50 iterations out of 500 -2 * Loglike = 4990.969427 Burning in for 100 iterations out of 500 -2 * Loglike = 4995.244670 Burning in for 150 iterations out of 500 -2 * Loglike = 4997.361011 Burning in for 200 iterations out of 500 -2 * Loglike = 4992.029482 Burning in for 250 iterations out of 500 -2 * Loglike = 4985.955274 Burning in for 300 iterations out of 500 -2 * Loglike = 4986.876315 Burning in for 350 iterations out of 500 -2 * Loglike = 4985.458334 Burning in for 400 iterations out of 500 -2 * Loglike = 4989.630449 Burning in for 450 iterations out of 500 -2 * Loglike = 4988.916202 Burning in for 500 iterations out of 500 -2 * Loglike = 4994.356913 ERAS c1090 c1091 MCMC 1 5000 1 c1090 c1091 c1003 c1004 1 1 Actual update 50 of 5000, Stored update 50 of 5000 -2 * Loglike = 4990.010790 Actual update 100 of 5000, Stored update 100 of 5000 -2 * Loglike = 4988.203610 Actual update 150 of 5000, Stored update 150 of 5000 -2 * Loglike = 4994.031465 Actual update 200 of 5000, Stored update 200 of 5000 -2 * Loglike = 4988.003420 Actual update 250 of 5000, Stored update 250 of 5000 -2 * Loglike = 4985.761157 Actual update 300 of 5000, Stored update 300 of 5000 -2 * Loglike = 4988.181342 Actual update 350 of 5000, Stored update 350 of 5000 -2 * Loglike = 4986.977633 Actual update 400 of 5000, Stored update 400 of 5000 -2 * Loglike = 4985.345060 Actual update 450 of 5000, Stored update 450 of 5000 -2 * Loglike = 4996.144489 Actual update 500 of 5000, Stored update 500 of 5000 -2 * Loglike = 4987.959532 Actual update 550 of 5000, Stored update 550 of 5000 -2 * Loglike = 4991.917691 Actual update 600 of 5000, Stored update 600 of 5000 -2 * Loglike = 4997.413415 Actual update 650 of 5000, Stored update 650 of 5000 -2 * Loglike = 4987.562835 Actual update 700 of 5000, Stored update 700 of 5000 -2 * Loglike = 4989.268077 Actual update 750 of 5000, Stored update 750 of 5000 -2 * Loglike = 4988.929178 Actual update 800 of 5000, Stored update 800 of 5000 -2 * Loglike = 4998.214632 Actual update 850 of 5000, Stored update 850 of 5000 -2 * Loglike = 4987.494087 Actual update 900 of 5000, Stored update 900 of 5000 -2 * Loglike = 4988.709586 Actual update 950 of 5000, Stored update 950 of 5000 -2 * Loglike = 4992.828994 Actual update 1000 of 5000, Stored update 1000 of 5000 -2 * Loglike = 4996.992783 Actual update 1050 of 5000, Stored update 1050 of 5000 -2 * Loglike = 4988.403774 Actual update 1100 of 5000, Stored update 1100 of 5000 -2 * Loglike = 4992.158569 Actual update 1150 of 5000, Stored update 1150 of 5000 -2 * Loglike = 4990.129800 Actual update 1200 of 5000, Stored update 1200 of 5000 -2 * Loglike = 4989.091012 Actual update 1250 of 5000, Stored update 1250 of 5000 -2 * Loglike = 4994.356468 Actual update 1300 of 5000, Stored update 1300 of 5000 -2 * Loglike = 4992.748898 Actual update 1350 of 5000, Stored update 1350 of 5000 -2 * Loglike = 4989.585128 Actual update 1400 of 5000, Stored update 1400 of 5000 -2 * Loglike = 4988.992908 Actual update 1450 of 5000, Stored update 1450 of 5000 -2 * Loglike = 4988.283540 Actual update 1500 of 5000, Stored update 1500 of 5000 -2 * Loglike = 4986.602790 Actual update 1550 of 5000, Stored update 1550 of 5000 -2 * Loglike = 4986.133154 Actual update 1600 of 5000, Stored update 1600 of 5000 -2 * Loglike = 4988.441946 Actual update 1650 of 5000, Stored update 1650 of 5000 -2 * Loglike = 4988.757086 Actual update 1700 of 5000, Stored update 1700 of 5000 -2 * Loglike = 4987.499578 Actual update 1750 of 5000, Stored update 1750 of 5000 -2 * Loglike = 4992.434701 Actual update 1800 of 5000, Stored update 1800 of 5000 -2 * Loglike = 4988.599579 Actual update 1850 of 5000, Stored update 1850 of 5000 -2 * Loglike = 4995.542195 Actual update 1900 of 5000, Stored update 1900 of 5000 -2 * Loglike = 4993.338152 Actual update 1950 of 5000, Stored update 1950 of 5000 -2 * Loglike = 4988.653510 Actual update 2000 of 5000, Stored update 2000 of 5000 -2 * Loglike = 4990.588346 Actual update 2050 of 5000, Stored update 2050 of 5000 -2 * Loglike = 4993.284327 Actual update 2100 of 5000, Stored update 2100 of 5000 -2 * Loglike = 4987.220983 Actual update 2150 of 5000, Stored update 2150 of 5000 -2 * Loglike = 4995.308222 Actual update 2200 of 5000, Stored update 2200 of 5000 -2 * Loglike = 4994.615208 Actual update 2250 of 5000, Stored update 2250 of 5000 -2 * Loglike = 4992.077864 Actual update 2300 of 5000, Stored update 2300 of 5000 -2 * Loglike = 4985.859057 Actual update 2350 of 5000, Stored update 2350 of 5000 -2 * Loglike = 4988.547114 Actual update 2400 of 5000, Stored update 2400 of 5000 -2 * Loglike = 4990.018480 Actual update 2450 of 5000, Stored update 2450 of 5000 -2 * Loglike = 4992.143278 Actual update 2500 of 5000, Stored update 2500 of 5000 -2 * Loglike = 4990.499789 Actual update 2550 of 5000, Stored update 2550 of 5000 -2 * Loglike = 4992.066775 Actual update 2600 of 5000, Stored update 2600 of 5000 -2 * Loglike = 4990.964006 Actual update 2650 of 5000, Stored update 2650 of 5000 -2 * Loglike = 4988.825709 Actual update 2700 of 5000, Stored update 2700 of 5000 -2 * Loglike = 4989.206195 Actual update 2750 of 5000, Stored update 2750 of 5000 -2 * Loglike = 4989.934466 Actual update 2800 of 5000, Stored update 2800 of 5000 -2 * Loglike = 4989.919572 Actual update 2850 of 5000, Stored update 2850 of 5000 -2 * Loglike = 4988.665067 Actual update 2900 of 5000, Stored update 2900 of 5000 -2 * Loglike = 4988.180549 Actual update 2950 of 5000, Stored update 2950 of 5000 -2 * Loglike = 4997.160096 Actual update 3000 of 5000, Stored update 3000 of 5000 -2 * Loglike = 4987.966455 Actual update 3050 of 5000, Stored update 3050 of 5000 -2 * Loglike = 4985.936018 Actual update 3100 of 5000, Stored update 3100 of 5000 -2 * Loglike = 4989.208771 Actual update 3150 of 5000, Stored update 3150 of 5000 -2 * Loglike = 4989.659050 Actual update 3200 of 5000, Stored update 3200 of 5000 -2 * Loglike = 4990.249428 Actual update 3250 of 5000, Stored update 3250 of 5000 -2 * Loglike = 4987.792472 Actual update 3300 of 5000, Stored update 3300 of 5000 -2 * Loglike = 4985.790886 Actual update 3350 of 5000, Stored update 3350 of 5000 -2 * Loglike = 4993.036922 Actual update 3400 of 5000, Stored update 3400 of 5000 -2 * Loglike = 4985.515710 Actual update 3450 of 5000, Stored update 3450 of 5000 -2 * Loglike = 4988.426699 Actual update 3500 of 5000, Stored update 3500 of 5000 -2 * Loglike = 4994.977146 Actual update 3550 of 5000, Stored update 3550 of 5000 -2 * Loglike = 4990.972739 Actual update 3600 of 5000, Stored update 3600 of 5000 -2 * Loglike = 4989.421550 Actual update 3650 of 5000, Stored update 3650 of 5000 -2 * Loglike = 4990.649677 Actual update 3700 of 5000, Stored update 3700 of 5000 -2 * Loglike = 4987.968759 Actual update 3750 of 5000, Stored update 3750 of 5000 -2 * Loglike = 4987.799184 Actual update 3800 of 5000, Stored update 3800 of 5000 -2 * Loglike = 4988.800972 Actual update 3850 of 5000, Stored update 3850 of 5000 -2 * Loglike = 4993.870744 Actual update 3900 of 5000, Stored update 3900 of 5000 -2 * Loglike = 4990.623579 Actual update 3950 of 5000, Stored update 3950 of 5000 -2 * Loglike = 4990.236550 Actual update 4000 of 5000, Stored update 4000 of 5000 -2 * Loglike = 4991.551567 Actual update 4050 of 5000, Stored update 4050 of 5000 -2 * Loglike = 4986.910736 Actual update 4100 of 5000, Stored update 4100 of 5000 -2 * Loglike = 4986.508395 Actual update 4150 of 5000, Stored update 4150 of 5000 -2 * Loglike = 4986.474959 Actual update 4200 of 5000, Stored update 4200 of 5000 -2 * Loglike = 4997.533684 Actual update 4250 of 5000, Stored update 4250 of 5000 -2 * Loglike = 4990.485230 Actual update 4300 of 5000, Stored update 4300 of 5000 -2 * Loglike = 4986.561998 Actual update 4350 of 5000, Stored update 4350 of 5000 -2 * Loglike = 4986.308846 Actual update 4400 of 5000, Stored update 4400 of 5000 -2 * Loglike = 4990.728819 Actual update 4450 of 5000, Stored update 4450 of 5000 -2 * Loglike = 4996.296690 Actual update 4500 of 5000, Stored update 4500 of 5000 -2 * Loglike = 4990.578675 Actual update 4550 of 5000, Stored update 4550 of 5000 -2 * Loglike = 4996.943042 Actual update 4600 of 5000, Stored update 4600 of 5000 -2 * Loglike = 5002.231257 Actual update 4650 of 5000, Stored update 4650 of 5000 -2 * Loglike = 4991.266078 Actual update 4700 of 5000, Stored update 4700 of 5000 -2 * Loglike = 4986.578972 Actual update 4750 of 5000, Stored update 4750 of 5000 -2 * Loglike = 4990.208534 Actual update 4800 of 5000, Stored update 4800 of 5000 -2 * Loglike = 4989.025925 Actual update 4850 of 5000, Stored update 4850 of 5000 -2 * Loglike = 4998.551271 Actual update 4900 of 5000, Stored update 4900 of 5000 -2 * Loglike = 4989.138482 Actual update 4950 of 5000, Stored update 4950 of 5000 -2 * Loglike = 4990.211246 Actual update 5000 of 5000, Stored update 5000 of 5000 -2 * Loglike = 4986.072044 PUPN c1003 c1004 AVER c1091 b99 b100 Count = 5000 Average = 4990.0 S.D. = 3.4869 S.E.M. = 0.049312 ECHO 0 Execution completed -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- MLwiN (version: 3.11) multilevel model (Normal) Estimation algorithm: MCMC Elapsed time : 0.67s Number of obs: 3022 (from total 3022) Number of iter.: 5000 Chains: 1 Burn-in: 500 Bayesian Deviance Information Criterion (DIC) Dbar D(thetabar) pD DIC 4989.950 4983.970 5.980 4995.930 --------------------------------------------------------------------------------------------------- The model formula: logearn ~ 1 + age_40 + numjobs + sex + parttime + (1 | id) Level 1: id --------------------------------------------------------------------------------------------------- The fixed part estimates: Coef. Std. Err. z Pr(>|z|) [95% Cred. Interval] ESS Intercept 3.08451 0.02997 102.92 0 *** 3.02515 3.14215 5000 age_40 0.01080 0.00102 10.63 2.108e-26 *** 0.00881 0.01277 5000 numjobs -0.03197 0.02394 -1.34 0.1817 -0.07819 0.01486 5000 sexfemale -0.21205 0.02097 -10.11 4.787e-24 *** -0.25338 -0.17166 5271 parttimeParttime -0.38843 0.03633 -10.69 1.1e-26 *** -0.45891 -0.31756 5000 Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 --------------------------------------------------------------------------------------------------- The random part estimates at the id level: Coef. Std. Err. [95% Cred. Interval] ESS var_Intercept 0.30518 0.00782 0.29043 0.32100 5000 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- > > vars <- cbind(as.numeric(wage1$parttime) - 1, as.numeric(wage1$sex) - 1, wage1$numjobs) > colnames(vars) <- c("parttime", "sex", "numjobs") > round(cor(vars), 4) parttime sex numjobs parttime 1.0000 0.0399 0.2908 sex 0.0399 1.0000 0.1014 numjobs 0.2908 0.1014 1.0000 > > # 16.4 Fitting multiple membership models to the dataset . . . . . . . . 237 > > tabulate(wage1$numjobs) [1] 2496 472 52 2 > > (mymodel <- runMLwiN(logearn ~ 1 + age_40 + sex + parttime + (1 | company) + (1 | id), estoptions = list(EstM = 1), + data = wage1)) MLwiN is running, please wait...... /nogui option ignored ECHO 0 Echoing is ON BATC 1 Batch mode is ON MAXI 2 STAR iteration 0 iteration 1 Convergence not achieved TOLE 2 MAXI 20 BATC 1 Batch mode is ON NEXT iteration 2 Convergence achieved ECHO 0 Echoing is ON MCMC 0 500 1 5.8 50 10 G30[1] G30[2] 1 1 1 1 1 1 BURNING IN... Burning in for 50 iterations out of 500 -2 * Loglike = 4411.792396 Burning in for 100 iterations out of 500 -2 * Loglike = 4425.996996 Burning in for 150 iterations out of 500 -2 * Loglike = 4422.165382 Burning in for 200 iterations out of 500 -2 * Loglike = 4438.120221 Burning in for 250 iterations out of 500 -2 * Loglike = 4438.716638 Burning in for 300 iterations out of 500 -2 * Loglike = 4418.837024 Burning in for 350 iterations out of 500 -2 * Loglike = 4453.830193 Burning in for 400 iterations out of 500 -2 * Loglike = 4436.121528 Burning in for 450 iterations out of 500 -2 * Loglike = 4434.635726 Burning in for 500 iterations out of 500 -2 * Loglike = 4416.075488 ERAS G30 LINK 0 G30 ERAS c1090 c1091 MCMC 1 5000 1 c1090 c1091 c1003 c1004 1 1 Actual update 50 of 5000, Stored update 50 of 5000 -2 * Loglike = 4411.642041 Actual update 100 of 5000, Stored update 100 of 5000 -2 * Loglike = 4408.302512 Actual update 150 of 5000, Stored update 150 of 5000 -2 * Loglike = 4390.079419 Actual update 200 of 5000, Stored update 200 of 5000 -2 * Loglike = 4427.591329 Actual update 250 of 5000, Stored update 250 of 5000 -2 * Loglike = 4405.802813 Actual update 300 of 5000, Stored update 300 of 5000 -2 * Loglike = 4405.061572 Actual update 350 of 5000, Stored update 350 of 5000 -2 * Loglike = 4431.071183 Actual update 400 of 5000, Stored update 400 of 5000 -2 * Loglike = 4390.015335 Actual update 450 of 5000, Stored update 450 of 5000 -2 * Loglike = 4428.882238 Actual update 500 of 5000, Stored update 500 of 5000 -2 * Loglike = 4422.097169 Actual update 550 of 5000, Stored update 550 of 5000 -2 * Loglike = 4436.212959 Actual update 600 of 5000, Stored update 600 of 5000 -2 * Loglike = 4425.783940 Actual update 650 of 5000, Stored update 650 of 5000 -2 * Loglike = 4444.538058 Actual update 700 of 5000, Stored update 700 of 5000 -2 * Loglike = 4395.588680 Actual update 750 of 5000, Stored update 750 of 5000 -2 * Loglike = 4417.357487 Actual update 800 of 5000, Stored update 800 of 5000 -2 * Loglike = 4432.689565 Actual update 850 of 5000, Stored update 850 of 5000 -2 * Loglike = 4415.232506 Actual update 900 of 5000, Stored update 900 of 5000 -2 * Loglike = 4412.740067 Actual update 950 of 5000, Stored update 950 of 5000 -2 * Loglike = 4439.486378 Actual update 1000 of 5000, Stored update 1000 of 5000 -2 * Loglike = 4420.159566 Actual update 1050 of 5000, Stored update 1050 of 5000 -2 * Loglike = 4414.230086 Actual update 1100 of 5000, Stored update 1100 of 5000 -2 * Loglike = 4444.734048 Actual update 1150 of 5000, Stored update 1150 of 5000 -2 * Loglike = 4427.134215 Actual update 1200 of 5000, Stored update 1200 of 5000 -2 * Loglike = 4429.406698 Actual update 1250 of 5000, Stored update 1250 of 5000 -2 * Loglike = 4421.818506 Actual update 1300 of 5000, Stored update 1300 of 5000 -2 * Loglike = 4402.810917 Actual update 1350 of 5000, Stored update 1350 of 5000 -2 * Loglike = 4449.394090 Actual update 1400 of 5000, Stored update 1400 of 5000 -2 * Loglike = 4451.409752 Actual update 1450 of 5000, Stored update 1450 of 5000 -2 * Loglike = 4407.419772 Actual update 1500 of 5000, Stored update 1500 of 5000 -2 * Loglike = 4423.011450 Actual update 1550 of 5000, Stored update 1550 of 5000 -2 * Loglike = 4423.284429 Actual update 1600 of 5000, Stored update 1600 of 5000 -2 * Loglike = 4402.499105 Actual update 1650 of 5000, Stored update 1650 of 5000 -2 * Loglike = 4421.064632 Actual update 1700 of 5000, Stored update 1700 of 5000 -2 * Loglike = 4449.962233 Actual update 1750 of 5000, Stored update 1750 of 5000 -2 * Loglike = 4448.813657 Actual update 1800 of 5000, Stored update 1800 of 5000 -2 * Loglike = 4435.374188 Actual update 1850 of 5000, Stored update 1850 of 5000 -2 * Loglike = 4413.230333 Actual update 1900 of 5000, Stored update 1900 of 5000 -2 * Loglike = 4397.312629 Actual update 1950 of 5000, Stored update 1950 of 5000 -2 * Loglike = 4451.075617 Actual update 2000 of 5000, Stored update 2000 of 5000 -2 * Loglike = 4442.529354 Actual update 2050 of 5000, Stored update 2050 of 5000 -2 * Loglike = 4405.595099 Actual update 2100 of 5000, Stored update 2100 of 5000 -2 * Loglike = 4445.859980 Actual update 2150 of 5000, Stored update 2150 of 5000 -2 * Loglike = 4410.553328 Actual update 2200 of 5000, Stored update 2200 of 5000 -2 * Loglike = 4424.678485 Actual update 2250 of 5000, Stored update 2250 of 5000 -2 * Loglike = 4462.218858 Actual update 2300 of 5000, Stored update 2300 of 5000 -2 * Loglike = 4402.663824 Actual update 2350 of 5000, Stored update 2350 of 5000 -2 * Loglike = 4388.437553 Actual update 2400 of 5000, Stored update 2400 of 5000 -2 * Loglike = 4416.302296 Actual update 2450 of 5000, Stored update 2450 of 5000 -2 * Loglike = 4421.765062 Actual update 2500 of 5000, Stored update 2500 of 5000 -2 * Loglike = 4417.737247 Actual update 2550 of 5000, Stored update 2550 of 5000 -2 * Loglike = 4429.616560 Actual update 2600 of 5000, Stored update 2600 of 5000 -2 * Loglike = 4390.289695 Actual update 2650 of 5000, Stored update 2650 of 5000 -2 * Loglike = 4438.892751 Actual update 2700 of 5000, Stored update 2700 of 5000 -2 * Loglike = 4417.338960 Actual update 2750 of 5000, Stored update 2750 of 5000 -2 * Loglike = 4436.055961 Actual update 2800 of 5000, Stored update 2800 of 5000 -2 * Loglike = 4413.218007 Actual update 2850 of 5000, Stored update 2850 of 5000 -2 * Loglike = 4450.493935 Actual update 2900 of 5000, Stored update 2900 of 5000 -2 * Loglike = 4416.620635 Actual update 2950 of 5000, Stored update 2950 of 5000 -2 * Loglike = 4421.389645 Actual update 3000 of 5000, Stored update 3000 of 5000 -2 * Loglike = 4414.265899 Actual update 3050 of 5000, Stored update 3050 of 5000 -2 * Loglike = 4409.919566 Actual update 3100 of 5000, Stored update 3100 of 5000 -2 * Loglike = 4418.703885 Actual update 3150 of 5000, Stored update 3150 of 5000 -2 * Loglike = 4427.183504 Actual update 3200 of 5000, Stored update 3200 of 5000 -2 * Loglike = 4401.020076 Actual update 3250 of 5000, Stored update 3250 of 5000 -2 * Loglike = 4414.337253 Actual update 3300 of 5000, Stored update 3300 of 5000 -2 * Loglike = 4431.720176 Actual update 3350 of 5000, Stored update 3350 of 5000 -2 * Loglike = 4432.855748 Actual update 3400 of 5000, Stored update 3400 of 5000 -2 * Loglike = 4401.303612 Actual update 3450 of 5000, Stored update 3450 of 5000 -2 * Loglike = 4397.909723 Actual update 3500 of 5000, Stored update 3500 of 5000 -2 * Loglike = 4422.757255 Actual update 3550 of 5000, Stored update 3550 of 5000 -2 * Loglike = 4428.978638 Actual update 3600 of 5000, Stored update 3600 of 5000 -2 * Loglike = 4425.692483 Actual update 3650 of 5000, Stored update 3650 of 5000 -2 * Loglike = 4435.624392 Actual update 3700 of 5000, Stored update 3700 of 5000 -2 * Loglike = 4431.142627 Actual update 3750 of 5000, Stored update 3750 of 5000 -2 * Loglike = 4407.585797 Actual update 3800 of 5000, Stored update 3800 of 5000 -2 * Loglike = 4405.188922 Actual update 3850 of 5000, Stored update 3850 of 5000 -2 * Loglike = 4426.913686 Actual update 3900 of 5000, Stored update 3900 of 5000 -2 * Loglike = 4453.549091 Actual update 3950 of 5000, Stored update 3950 of 5000 -2 * Loglike = 4428.519955 Actual update 4000 of 5000, Stored update 4000 of 5000 -2 * Loglike = 4432.379244 Actual update 4050 of 5000, Stored update 4050 of 5000 -2 * Loglike = 4428.513394 Actual update 4100 of 5000, Stored update 4100 of 5000 -2 * Loglike = 4416.955061 Actual update 4150 of 5000, Stored update 4150 of 5000 -2 * Loglike = 4445.326899 Actual update 4200 of 5000, Stored update 4200 of 5000 -2 * Loglike = 4408.951777 Actual update 4250 of 5000, Stored update 4250 of 5000 -2 * Loglike = 4409.512024 Actual update 4300 of 5000, Stored update 4300 of 5000 -2 * Loglike = 4390.045235 Actual update 4350 of 5000, Stored update 4350 of 5000 -2 * Loglike = 4406.500725 Actual update 4400 of 5000, Stored update 4400 of 5000 -2 * Loglike = 4433.651761 Actual update 4450 of 5000, Stored update 4450 of 5000 -2 * Loglike = 4413.532029 Actual update 4500 of 5000, Stored update 4500 of 5000 -2 * Loglike = 4404.976724 Actual update 4550 of 5000, Stored update 4550 of 5000 -2 * Loglike = 4429.909169 Actual update 4600 of 5000, Stored update 4600 of 5000 -2 * Loglike = 4403.338895 Actual update 4650 of 5000, Stored update 4650 of 5000 -2 * Loglike = 4402.137121 Actual update 4700 of 5000, Stored update 4700 of 5000 -2 * Loglike = 4446.552378 Actual update 4750 of 5000, Stored update 4750 of 5000 -2 * Loglike = 4417.718650 Actual update 4800 of 5000, Stored update 4800 of 5000 -2 * Loglike = 4433.040824 Actual update 4850 of 5000, Stored update 4850 of 5000 -2 * Loglike = 4398.774909 Actual update 4900 of 5000, Stored update 4900 of 5000 -2 * Loglike = 4440.073132 Actual update 4950 of 5000, Stored update 4950 of 5000 -2 * Loglike = 4449.335121 Actual update 5000 of 5000, Stored update 5000 of 5000 -2 * Loglike = 4415.447190 PUPN c1003 c1004 AVER c1091 b99 b100 Count = 5000 Average = 4421.9 S.D. = 16.875 S.E.M. = 0.23865 ECHO 0 Execution completed -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- MLwiN (version: 3.11) multilevel model (Normal) N min mean max N_complete min_complete mean_complete max_complete company 141 2 21.43262 49 141 2 21.43262 49 Estimation algorithm: MCMC Elapsed time : 2.11s Number of obs: 3022 (from total 3022) Number of iter.: 5000 Chains: 1 Burn-in: 500 Bayesian Deviance Information Criterion (DIC) Dbar D(thetabar) pD DIC 4421.938 4312.469 109.468 4531.406 --------------------------------------------------------------------------------------------------- The model formula: logearn ~ 1 + age_40 + sex + parttime + (1 | company) + (1 | id) Level 2: company Level 1: id --------------------------------------------------------------------------------------------------- The fixed part estimates: Coef. Std. Err. z Pr(>|z|) [95% Cred. Interval] ESS Intercept 3.03900 0.02255 134.76 0 *** 2.99418 3.08389 601 age_40 0.01131 0.00093 12.18 3.959e-34 *** 0.00948 0.01314 4727 sexfemale -0.21209 0.01915 -11.07 1.697e-28 *** -0.24979 -0.17464 5000 parttimeParttime -0.39953 0.03257 -12.27 1.394e-34 *** -0.46362 -0.33659 4437 Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 --------------------------------------------------------------------------------------------------- The random part estimates at the company level: Coef. Std. Err. [95% Cred. Interval] ESS var_Intercept 0.05110 0.00803 0.03741 0.06896 2110 --------------------------------------------------------------------------------------------------- The random part estimates at the id level: Coef. Std. Err. [95% Cred. Interval] ESS var_Intercept 0.25305 0.00663 0.24021 0.26665 4489 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- > > ## Multiple membership > (mymodel <- runMLwiN(logearn ~ 1 + age_40 + sex + parttime + (1 | company) + (1 | id), estoptions = list(EstM = 1, + mm = list(list(mmvar = list("company", "company2", "company3", "company4"), weights = list("weight1", "weight2", + "weight3", "weight4")), NA), resi.store = TRUE, resi.store.levs = 2), data = wage1)) MLwiN is running, please wait...... /nogui option ignored ECHO 0 Echoing is ON BATC 1 Batch mode is ON MAXI 2 STAR iteration 0 iteration 1 Convergence not achieved TOLE 2 MAXI 20 BATC 1 Batch mode is ON NEXT iteration 2 Convergence achieved ECHO 0 Echoing is ON MCMC 0 500 1 5.8 50 10 1 1 1 1 1 1 Setting up XC/MM data structures - may take a while BURNING IN... Burning in for 50 iterations out of 500 -2 * Loglike = 4520.207046 Burning in for 100 iterations out of 500 -2 * Loglike = 4359.918609 Burning in for 150 iterations out of 500 -2 * Loglike = 4353.688209 Burning in for 200 iterations out of 500 -2 * Loglike = 4328.997185 Burning in for 250 iterations out of 500 -2 * Loglike = 4368.963879 Burning in for 300 iterations out of 500 -2 * Loglike = 4350.032851 Burning in for 350 iterations out of 500 -2 * Loglike = 4360.417183 Burning in for 400 iterations out of 500 -2 * Loglike = 4357.661808 Burning in for 450 iterations out of 500 -2 * Loglike = 4334.866872 Burning in for 500 iterations out of 500 -2 * Loglike = 4368.069765 ERAS c1090 c1091 MCMC 1 5000 1 c1090 c1091 c1003 c1004 1 1 Actual update 50 of 5000, Stored update 50 of 5000 -2 * Loglike = 4371.426425 Actual update 100 of 5000, Stored update 100 of 5000 -2 * Loglike = 4353.216363 Actual update 150 of 5000, Stored update 150 of 5000 -2 * Loglike = 4330.526955 Actual update 200 of 5000, Stored update 200 of 5000 -2 * Loglike = 4348.367660 Actual update 250 of 5000, Stored update 250 of 5000 -2 * Loglike = 4375.217821 Actual update 300 of 5000, Stored update 300 of 5000 -2 * Loglike = 4360.747020 Actual update 350 of 5000, Stored update 350 of 5000 -2 * Loglike = 4343.801872 Actual update 400 of 5000, Stored update 400 of 5000 -2 * Loglike = 4342.295146 Actual update 450 of 5000, Stored update 450 of 5000 -2 * Loglike = 4325.159264 Actual update 500 of 5000, Stored update 500 of 5000 -2 * Loglike = 4355.153836 Actual update 550 of 5000, Stored update 550 of 5000 -2 * Loglike = 4369.708871 Actual update 600 of 5000, Stored update 600 of 5000 -2 * Loglike = 4395.811897 Actual update 650 of 5000, Stored update 650 of 5000 -2 * Loglike = 4334.444244 Actual update 700 of 5000, Stored update 700 of 5000 -2 * Loglike = 4356.789170 Actual update 750 of 5000, Stored update 750 of 5000 -2 * Loglike = 4355.943242 Actual update 800 of 5000, Stored update 800 of 5000 -2 * Loglike = 4351.856296 Actual update 850 of 5000, Stored update 850 of 5000 -2 * Loglike = 4361.368104 Actual update 900 of 5000, Stored update 900 of 5000 -2 * Loglike = 4341.529818 Actual update 950 of 5000, Stored update 950 of 5000 -2 * Loglike = 4345.116466 Actual update 1000 of 5000, Stored update 1000 of 5000 -2 * Loglike = 4334.767975 Actual update 1050 of 5000, Stored update 1050 of 5000 -2 * Loglike = 4354.762317 Actual update 1100 of 5000, Stored update 1100 of 5000 -2 * Loglike = 4329.096335 Actual update 1150 of 5000, Stored update 1150 of 5000 -2 * Loglike = 4348.990477 Actual update 1200 of 5000, Stored update 1200 of 5000 -2 * Loglike = 4372.575510 Actual update 1250 of 5000, Stored update 1250 of 5000 -2 * Loglike = 4362.549342 Actual update 1300 of 5000, Stored update 1300 of 5000 -2 * Loglike = 4346.674721 Actual update 1350 of 5000, Stored update 1350 of 5000 -2 * Loglike = 4344.594822 Actual update 1400 of 5000, Stored update 1400 of 5000 -2 * Loglike = 4360.004672 Actual update 1450 of 5000, Stored update 1450 of 5000 -2 * Loglike = 4339.665678 Actual update 1500 of 5000, Stored update 1500 of 5000 -2 * Loglike = 4360.014609 Actual update 1550 of 5000, Stored update 1550 of 5000 -2 * Loglike = 4324.573102 Actual update 1600 of 5000, Stored update 1600 of 5000 -2 * Loglike = 4333.152497 Actual update 1650 of 5000, Stored update 1650 of 5000 -2 * Loglike = 4359.674819 Actual update 1700 of 5000, Stored update 1700 of 5000 -2 * Loglike = 4348.203745 Actual update 1750 of 5000, Stored update 1750 of 5000 -2 * Loglike = 4385.245817 Actual update 1800 of 5000, Stored update 1800 of 5000 -2 * Loglike = 4329.933270 Actual update 1850 of 5000, Stored update 1850 of 5000 -2 * Loglike = 4330.844942 Actual update 1900 of 5000, Stored update 1900 of 5000 -2 * Loglike = 4344.659191 Actual update 1950 of 5000, Stored update 1950 of 5000 -2 * Loglike = 4366.577164 Actual update 2000 of 5000, Stored update 2000 of 5000 -2 * Loglike = 4367.503087 Actual update 2050 of 5000, Stored update 2050 of 5000 -2 * Loglike = 4366.416056 Actual update 2100 of 5000, Stored update 2100 of 5000 -2 * Loglike = 4350.905276 Actual update 2150 of 5000, Stored update 2150 of 5000 -2 * Loglike = 4357.077406 Actual update 2200 of 5000, Stored update 2200 of 5000 -2 * Loglike = 4362.113585 Actual update 2250 of 5000, Stored update 2250 of 5000 -2 * Loglike = 4363.158373 Actual update 2300 of 5000, Stored update 2300 of 5000 -2 * Loglike = 4356.098693 Actual update 2350 of 5000, Stored update 2350 of 5000 -2 * Loglike = 4339.293267 Actual update 2400 of 5000, Stored update 2400 of 5000 -2 * Loglike = 4371.887828 Actual update 2450 of 5000, Stored update 2450 of 5000 -2 * Loglike = 4380.676959 Actual update 2500 of 5000, Stored update 2500 of 5000 -2 * Loglike = 4335.228503 Actual update 2550 of 5000, Stored update 2550 of 5000 -2 * Loglike = 4339.194357 Actual update 2600 of 5000, Stored update 2600 of 5000 -2 * Loglike = 4339.063134 Actual update 2650 of 5000, Stored update 2650 of 5000 -2 * Loglike = 4356.660205 Actual update 2700 of 5000, Stored update 2700 of 5000 -2 * Loglike = 4372.109027 Actual update 2750 of 5000, Stored update 2750 of 5000 -2 * Loglike = 4344.241712 Actual update 2800 of 5000, Stored update 2800 of 5000 -2 * Loglike = 4346.797297 Actual update 2850 of 5000, Stored update 2850 of 5000 -2 * Loglike = 4332.967973 Actual update 2900 of 5000, Stored update 2900 of 5000 -2 * Loglike = 4338.656263 Actual update 2950 of 5000, Stored update 2950 of 5000 -2 * Loglike = 4350.855541 Actual update 3000 of 5000, Stored update 3000 of 5000 -2 * Loglike = 4340.212968 Actual update 3050 of 5000, Stored update 3050 of 5000 -2 * Loglike = 4357.183306 Actual update 3100 of 5000, Stored update 3100 of 5000 -2 * Loglike = 4331.869020 Actual update 3150 of 5000, Stored update 3150 of 5000 -2 * Loglike = 4366.149426 Actual update 3200 of 5000, Stored update 3200 of 5000 -2 * Loglike = 4357.216235 Actual update 3250 of 5000, Stored update 3250 of 5000 -2 * Loglike = 4360.986067 Actual update 3300 of 5000, Stored update 3300 of 5000 -2 * Loglike = 4374.085840 Actual update 3350 of 5000, Stored update 3350 of 5000 -2 * Loglike = 4342.784682 Actual update 3400 of 5000, Stored update 3400 of 5000 -2 * Loglike = 4366.708808 Actual update 3450 of 5000, Stored update 3450 of 5000 -2 * Loglike = 4339.731058 Actual update 3500 of 5000, Stored update 3500 of 5000 -2 * Loglike = 4373.163837 Actual update 3550 of 5000, Stored update 3550 of 5000 -2 * Loglike = 4340.857726 Actual update 3600 of 5000, Stored update 3600 of 5000 -2 * Loglike = 4357.950606 Actual update 3650 of 5000, Stored update 3650 of 5000 -2 * Loglike = 4352.894751 Actual update 3700 of 5000, Stored update 3700 of 5000 -2 * Loglike = 4360.068223 Actual update 3750 of 5000, Stored update 3750 of 5000 -2 * Loglike = 4365.438111 Actual update 3800 of 5000, Stored update 3800 of 5000 -2 * Loglike = 4367.288429 Actual update 3850 of 5000, Stored update 3850 of 5000 -2 * Loglike = 4332.440997 Actual update 3900 of 5000, Stored update 3900 of 5000 -2 * Loglike = 4382.946112 Actual update 3950 of 5000, Stored update 3950 of 5000 -2 * Loglike = 4365.226976 Actual update 4000 of 5000, Stored update 4000 of 5000 -2 * Loglike = 4363.261237 Actual update 4050 of 5000, Stored update 4050 of 5000 -2 * Loglike = 4405.805199 Actual update 4100 of 5000, Stored update 4100 of 5000 -2 * Loglike = 4374.643854 Actual update 4150 of 5000, Stored update 4150 of 5000 -2 * Loglike = 4331.581569 Actual update 4200 of 5000, Stored update 4200 of 5000 -2 * Loglike = 4346.512439 Actual update 4250 of 5000, Stored update 4250 of 5000 -2 * Loglike = 4339.852243 Actual update 4300 of 5000, Stored update 4300 of 5000 -2 * Loglike = 4344.070089 Actual update 4350 of 5000, Stored update 4350 of 5000 -2 * Loglike = 4352.621068 Actual update 4400 of 5000, Stored update 4400 of 5000 -2 * Loglike = 4331.831011 Actual update 4450 of 5000, Stored update 4450 of 5000 -2 * Loglike = 4323.085955 Actual update 4500 of 5000, Stored update 4500 of 5000 -2 * Loglike = 4355.389414 Actual update 4550 of 5000, Stored update 4550 of 5000 -2 * Loglike = 4373.709911 Actual update 4600 of 5000, Stored update 4600 of 5000 -2 * Loglike = 4351.744250 Actual update 4650 of 5000, Stored update 4650 of 5000 -2 * Loglike = 4341.134746 Actual update 4700 of 5000, Stored update 4700 of 5000 -2 * Loglike = 4379.918723 Actual update 4750 of 5000, Stored update 4750 of 5000 -2 * Loglike = 4371.581191 Actual update 4800 of 5000, Stored update 4800 of 5000 -2 * Loglike = 4345.297398 Actual update 4850 of 5000, Stored update 4850 of 5000 -2 * Loglike = 4357.697235 Actual update 4900 of 5000, Stored update 4900 of 5000 -2 * Loglike = 4353.466160 Actual update 4950 of 5000, Stored update 4950 of 5000 -2 * Loglike = 4371.659082 Actual update 5000 of 5000, Stored update 5000 of 5000 -2 * Loglike = 4357.642449 PUPN c1003 c1004 AVER c1091 b99 b100 Count = 5000 Average = 4354.7 S.D. = 16.902 S.E.M. = 0.23904 ECHO 0 Execution completed -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- MLwiN (version: 3.11) multilevel model (Normal) N min mean max N_complete min_complete mean_complete max_complete company 141 2 21.43262 49 141 2 21.43262 49 Estimation algorithm: MCMC Cross-classified Elapsed time : 2.3s Number of obs: 3022 (from total 3022) Number of iter.: 5000 Chains: 1 Burn-in: 500 Bayesian Deviance Information Criterion (DIC) Dbar D(thetabar) pD DIC 4354.738 4241.144 113.594 4468.331 --------------------------------------------------------------------------------------------------- The model formula: logearn ~ 1 + age_40 + sex + parttime + (1 | company) + (1 | id) Level 2: company Level 1: id --------------------------------------------------------------------------------------------------- The fixed part estimates: Coef. Std. Err. z Pr(>|z|) [95% Cred. Interval] ESS Intercept 3.04028 0.02339 129.96 0 *** 2.99373 3.08677 535 age_40 0.01138 0.00092 12.39 2.869e-35 *** 0.00956 0.01318 4737 sexfemale -0.21710 0.01896 -11.45 2.263e-30 *** -0.25458 -0.17997 5000 parttimeParttime -0.40433 0.03209 -12.60 2.085e-36 *** -0.46740 -0.34213 4512 Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 --------------------------------------------------------------------------------------------------- The random part estimates at the company level: Coef. Std. Err. [95% Cred. Interval] ESS var_Intercept 0.05849 0.00886 0.04325 0.07820 2327 --------------------------------------------------------------------------------------------------- The random part estimates at the id level: Coef. Std. Err. [95% Cred. Interval] ESS var_Intercept 0.24748 0.00648 0.23495 0.26078 4498 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- > > # 16.5 Residuals in multiple membership models . . . . . . . . . . . . . 240 > > lencateg <- length(unique(wage1$company)) > resi0 <- mymodel@resi.chains$resi_lev2 > resi0mean <- apply(resi0, 2, mean) > resi0sd <- apply(resi0, 2, sd) > > rankno <- order(resi0mean) > resi0.lo <- resi0mean - 1.4 * resi0sd > resi0.hi <- resi0mean + 1.4 * resi0sd > caterpillar(y = resi0mean[rankno], x = 1:length(resi0mean), qtlow = resi0.lo[rankno], qtup = resi0.hi[rankno], ylim = c(-1, + 1.3)) > abline(h = 0, lty = "dotted") > > aa <- qqnorm(resi0mean, plot.it = FALSE) > plot(x = aa$x[rankno], y = resi0mean[rankno], pch = 24, bg = "black", xlab = "nscore", ylab = "cons") > abline(h = 0, lty = "dotted") > > wage1$companyno54 <- (wage1$company == 54) + (wage1$company2 == 54) + (wage1$company3 == 54) + (wage1$company4 == + 54) > wage1$companyno67 <- (wage1$company == 67) + (wage1$company2 == 67) + (wage1$company3 == 67) + (wage1$company4 == + 67) > > ## Multiple membership > (mymodel <- runMLwiN(logearn ~ 1 + age_40 + sex + parttime + companyno54 + companyno67 + (1 | company) + (1 | id), + estoptions = list(EstM = 1, mm = list(list(mmvar = list("company", "company2", "company3", "company4"), weights = list("weight1", + "weight2", "weight3", "weight4")), NA)), data = wage1)) MLwiN is running, please wait...... /nogui option ignored ECHO 0 Echoing is ON BATC 1 Batch mode is ON MAXI 2 STAR iteration 0 iteration 1 Convergence not achieved TOLE 2 MAXI 20 BATC 1 Batch mode is ON NEXT iteration 2 Convergence achieved ECHO 0 Echoing is ON MCMC 0 500 1 5.8 50 10 1 1 1 1 1 1 Setting up XC/MM data structures - may take a while BURNING IN... Burning in for 50 iterations out of 500 -2 * Loglike = 4482.413088 Burning in for 100 iterations out of 500 -2 * Loglike = 4365.726410 Burning in for 150 iterations out of 500 -2 * Loglike = 4344.128241 Burning in for 200 iterations out of 500 -2 * Loglike = 4338.109497 Burning in for 250 iterations out of 500 -2 * Loglike = 4363.998915 Burning in for 300 iterations out of 500 -2 * Loglike = 4370.139604 Burning in for 350 iterations out of 500 -2 * Loglike = 4329.847583 Burning in for 400 iterations out of 500 -2 * Loglike = 4328.730216 Burning in for 450 iterations out of 500 -2 * Loglike = 4377.277799 Burning in for 500 iterations out of 500 -2 * Loglike = 4360.071739 ERAS c1090 c1091 MCMC 1 5000 1 c1090 c1091 c1003 c1004 1 1 Actual update 50 of 5000, Stored update 50 of 5000 -2 * Loglike = 4372.171261 Actual update 100 of 5000, Stored update 100 of 5000 -2 * Loglike = 4350.501820 Actual update 150 of 5000, Stored update 150 of 5000 -2 * Loglike = 4365.810981 Actual update 200 of 5000, Stored update 200 of 5000 -2 * Loglike = 4358.878734 Actual update 250 of 5000, Stored update 250 of 5000 -2 * Loglike = 4341.447049 Actual update 300 of 5000, Stored update 300 of 5000 -2 * Loglike = 4340.316561 Actual update 350 of 5000, Stored update 350 of 5000 -2 * Loglike = 4340.916760 Actual update 400 of 5000, Stored update 400 of 5000 -2 * Loglike = 4356.800377 Actual update 450 of 5000, Stored update 450 of 5000 -2 * Loglike = 4372.463493 Actual update 500 of 5000, Stored update 500 of 5000 -2 * Loglike = 4388.904583 Actual update 550 of 5000, Stored update 550 of 5000 -2 * Loglike = 4345.313626 Actual update 600 of 5000, Stored update 600 of 5000 -2 * Loglike = 4357.128836 Actual update 650 of 5000, Stored update 650 of 5000 -2 * Loglike = 4358.412553 Actual update 700 of 5000, Stored update 700 of 5000 -2 * Loglike = 4369.784210 Actual update 750 of 5000, Stored update 750 of 5000 -2 * Loglike = 4368.158123 Actual update 800 of 5000, Stored update 800 of 5000 -2 * Loglike = 4346.376379 Actual update 850 of 5000, Stored update 850 of 5000 -2 * Loglike = 4327.826937 Actual update 900 of 5000, Stored update 900 of 5000 -2 * Loglike = 4358.362384 Actual update 950 of 5000, Stored update 950 of 5000 -2 * Loglike = 4379.921115 Actual update 1000 of 5000, Stored update 1000 of 5000 -2 * Loglike = 4366.616401 Actual update 1050 of 5000, Stored update 1050 of 5000 -2 * Loglike = 4357.891849 Actual update 1100 of 5000, Stored update 1100 of 5000 -2 * Loglike = 4359.680219 Actual update 1150 of 5000, Stored update 1150 of 5000 -2 * Loglike = 4346.907619 Actual update 1200 of 5000, Stored update 1200 of 5000 -2 * Loglike = 4349.887018 Actual update 1250 of 5000, Stored update 1250 of 5000 -2 * Loglike = 4343.204410 Actual update 1300 of 5000, Stored update 1300 of 5000 -2 * Loglike = 4349.134989 Actual update 1350 of 5000, Stored update 1350 of 5000 -2 * Loglike = 4356.192621 Actual update 1400 of 5000, Stored update 1400 of 5000 -2 * Loglike = 4336.192086 Actual update 1450 of 5000, Stored update 1450 of 5000 -2 * Loglike = 4352.487442 Actual update 1500 of 5000, Stored update 1500 of 5000 -2 * Loglike = 4359.955832 Actual update 1550 of 5000, Stored update 1550 of 5000 -2 * Loglike = 4363.771859 Actual update 1600 of 5000, Stored update 1600 of 5000 -2 * Loglike = 4361.740199 Actual update 1650 of 5000, Stored update 1650 of 5000 -2 * Loglike = 4346.287451 Actual update 1700 of 5000, Stored update 1700 of 5000 -2 * Loglike = 4367.234856 Actual update 1750 of 5000, Stored update 1750 of 5000 -2 * Loglike = 4363.996709 Actual update 1800 of 5000, Stored update 1800 of 5000 -2 * Loglike = 4383.441706 Actual update 1850 of 5000, Stored update 1850 of 5000 -2 * Loglike = 4374.174073 Actual update 1900 of 5000, Stored update 1900 of 5000 -2 * Loglike = 4355.081521 Actual update 1950 of 5000, Stored update 1950 of 5000 -2 * Loglike = 4340.201880 Actual update 2000 of 5000, Stored update 2000 of 5000 -2 * Loglike = 4380.458942 Actual update 2050 of 5000, Stored update 2050 of 5000 -2 * Loglike = 4346.559417 Actual update 2100 of 5000, Stored update 2100 of 5000 -2 * Loglike = 4332.779574 Actual update 2150 of 5000, Stored update 2150 of 5000 -2 * Loglike = 4375.457574 Actual update 2200 of 5000, Stored update 2200 of 5000 -2 * Loglike = 4407.104326 Actual update 2250 of 5000, Stored update 2250 of 5000 -2 * Loglike = 4328.269307 Actual update 2300 of 5000, Stored update 2300 of 5000 -2 * Loglike = 4361.493327 Actual update 2350 of 5000, Stored update 2350 of 5000 -2 * Loglike = 4363.572504 Actual update 2400 of 5000, Stored update 2400 of 5000 -2 * Loglike = 4375.948414 Actual update 2450 of 5000, Stored update 2450 of 5000 -2 * Loglike = 4398.187028 Actual update 2500 of 5000, Stored update 2500 of 5000 -2 * Loglike = 4361.795881 Actual update 2550 of 5000, Stored update 2550 of 5000 -2 * Loglike = 4337.451602 Actual update 2600 of 5000, Stored update 2600 of 5000 -2 * Loglike = 4361.985855 Actual update 2650 of 5000, Stored update 2650 of 5000 -2 * Loglike = 4364.069210 Actual update 2700 of 5000, Stored update 2700 of 5000 -2 * Loglike = 4328.103323 Actual update 2750 of 5000, Stored update 2750 of 5000 -2 * Loglike = 4364.684655 Actual update 2800 of 5000, Stored update 2800 of 5000 -2 * Loglike = 4372.154237 Actual update 2850 of 5000, Stored update 2850 of 5000 -2 * Loglike = 4363.931440 Actual update 2900 of 5000, Stored update 2900 of 5000 -2 * Loglike = 4355.412271 Actual update 2950 of 5000, Stored update 2950 of 5000 -2 * Loglike = 4378.692773 Actual update 3000 of 5000, Stored update 3000 of 5000 -2 * Loglike = 4362.004683 Actual update 3050 of 5000, Stored update 3050 of 5000 -2 * Loglike = 4335.682100 Actual update 3100 of 5000, Stored update 3100 of 5000 -2 * Loglike = 4353.261149 Actual update 3150 of 5000, Stored update 3150 of 5000 -2 * Loglike = 4355.108514 Actual update 3200 of 5000, Stored update 3200 of 5000 -2 * Loglike = 4331.864812 Actual update 3250 of 5000, Stored update 3250 of 5000 -2 * Loglike = 4331.911284 Actual update 3300 of 5000, Stored update 3300 of 5000 -2 * Loglike = 4364.432875 Actual update 3350 of 5000, Stored update 3350 of 5000 -2 * Loglike = 4362.904482 Actual update 3400 of 5000, Stored update 3400 of 5000 -2 * Loglike = 4349.143135 Actual update 3450 of 5000, Stored update 3450 of 5000 -2 * Loglike = 4335.079058 Actual update 3500 of 5000, Stored update 3500 of 5000 -2 * Loglike = 4350.327573 Actual update 3550 of 5000, Stored update 3550 of 5000 -2 * Loglike = 4357.953347 Actual update 3600 of 5000, Stored update 3600 of 5000 -2 * Loglike = 4369.534500 Actual update 3650 of 5000, Stored update 3650 of 5000 -2 * Loglike = 4355.483398 Actual update 3700 of 5000, Stored update 3700 of 5000 -2 * Loglike = 4374.068714 Actual update 3750 of 5000, Stored update 3750 of 5000 -2 * Loglike = 4352.723042 Actual update 3800 of 5000, Stored update 3800 of 5000 -2 * Loglike = 4356.445355 Actual update 3850 of 5000, Stored update 3850 of 5000 -2 * Loglike = 4356.136957 Actual update 3900 of 5000, Stored update 3900 of 5000 -2 * Loglike = 4372.359883 Actual update 3950 of 5000, Stored update 3950 of 5000 -2 * Loglike = 4328.924568 Actual update 4000 of 5000, Stored update 4000 of 5000 -2 * Loglike = 4360.928357 Actual update 4050 of 5000, Stored update 4050 of 5000 -2 * Loglike = 4358.067328 Actual update 4100 of 5000, Stored update 4100 of 5000 -2 * Loglike = 4376.606808 Actual update 4150 of 5000, Stored update 4150 of 5000 -2 * Loglike = 4353.489419 Actual update 4200 of 5000, Stored update 4200 of 5000 -2 * Loglike = 4340.491662 Actual update 4250 of 5000, Stored update 4250 of 5000 -2 * Loglike = 4409.735475 Actual update 4300 of 5000, Stored update 4300 of 5000 -2 * Loglike = 4346.421513 Actual update 4350 of 5000, Stored update 4350 of 5000 -2 * Loglike = 4393.412276 Actual update 4400 of 5000, Stored update 4400 of 5000 -2 * Loglike = 4353.914161 Actual update 4450 of 5000, Stored update 4450 of 5000 -2 * Loglike = 4331.655375 Actual update 4500 of 5000, Stored update 4500 of 5000 -2 * Loglike = 4363.859257 Actual update 4550 of 5000, Stored update 4550 of 5000 -2 * Loglike = 4342.008607 Actual update 4600 of 5000, Stored update 4600 of 5000 -2 * Loglike = 4363.423703 Actual update 4650 of 5000, Stored update 4650 of 5000 -2 * Loglike = 4371.258140 Actual update 4700 of 5000, Stored update 4700 of 5000 -2 * Loglike = 4372.019826 Actual update 4750 of 5000, Stored update 4750 of 5000 -2 * Loglike = 4396.517630 Actual update 4800 of 5000, Stored update 4800 of 5000 -2 * Loglike = 4358.769169 Actual update 4850 of 5000, Stored update 4850 of 5000 -2 * Loglike = 4381.005944 Actual update 4900 of 5000, Stored update 4900 of 5000 -2 * Loglike = 4361.819509 Actual update 4950 of 5000, Stored update 4950 of 5000 -2 * Loglike = 4351.128600 Actual update 5000 of 5000, Stored update 5000 of 5000 -2 * Loglike = 4330.735804 PUPN c1003 c1004 AVER c1091 b99 b100 Count = 5000 Average = 4356.9 S.D. = 17.102 S.E.M. = 0.24186 ECHO 0 Execution completed -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- MLwiN (version: 3.11) multilevel model (Normal) N min mean max N_complete min_complete mean_complete max_complete company 141 2 21.43262 49 141 2 21.43262 49 Estimation algorithm: MCMC Cross-classified Elapsed time : 2.22s Number of obs: 3022 (from total 3022) Number of iter.: 5000 Chains: 1 Burn-in: 500 Bayesian Deviance Information Criterion (DIC) Dbar D(thetabar) pD DIC 4356.921 4249.017 107.904 4464.824 --------------------------------------------------------------------------------------------------- The model formula: logearn ~ 1 + age_40 + sex + parttime + companyno54 + companyno67 + (1 | company) + (1 | id) Level 2: company Level 1: id --------------------------------------------------------------------------------------------------- The fixed part estimates: Coef. Std. Err. z Pr(>|z|) [95% Cred. Interval] ESS Intercept 3.02618 0.02256 134.17 0 *** 2.98041 3.06955 642 age_40 0.01141 0.00093 12.29 1.058e-34 *** 0.00962 0.01321 4324 sexfemale -0.21762 0.01878 -11.59 4.84e-31 *** -0.25494 -0.18095 4643 parttimeParttime -0.41082 0.03236 -12.69 6.359e-37 *** -0.47235 -0.34799 4689 companyno54 0.75841 0.18828 4.03 5.624e-05 *** 0.38619 1.11285 524 companyno67 0.87255 0.22131 3.94 8.057e-05 *** 0.45340 1.31171 432 Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 --------------------------------------------------------------------------------------------------- The random part estimates at the company level: Coef. Std. Err. [95% Cred. Interval] ESS var_Intercept 0.04462 0.00721 0.03229 0.06088 1780 --------------------------------------------------------------------------------------------------- The random part estimates at the id level: Coef. Std. Err. [95% Cred. Interval] ESS var_Intercept 0.24772 0.00646 0.23561 0.26061 4299 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- > > # 16.6 Alternative weights for multiple membership models . . . . . . . .243 > > > ## New weights > (mymodel <- runMLwiN(logearn ~ 1 + age_40 + sex + parttime + companyno54 + companyno67 + (1 | company) + (1 | id), + estoptions = list(EstM = 1, mm = list(list(mmvar = list("company", "company2", "company3", "company4"), weights = list("ew1", + "ew2", "ew3", "ew4")), NA)), data = wage1)) MLwiN is running, please wait...... /nogui option ignored ECHO 0 Echoing is ON BATC 1 Batch mode is ON MAXI 2 STAR iteration 0 iteration 1 Convergence not achieved TOLE 2 MAXI 20 BATC 1 Batch mode is ON NEXT iteration 2 Convergence achieved ECHO 0 Echoing is ON MCMC 0 500 1 5.8 50 10 1 1 1 1 1 1 Setting up XC/MM data structures - may take a while BURNING IN... Burning in for 50 iterations out of 500 -2 * Loglike = 4488.567840 Burning in for 100 iterations out of 500 -2 * Loglike = 4378.740692 Burning in for 150 iterations out of 500 -2 * Loglike = 4357.782436 Burning in for 200 iterations out of 500 -2 * Loglike = 4351.303418 Burning in for 250 iterations out of 500 -2 * Loglike = 4377.577358 Burning in for 300 iterations out of 500 -2 * Loglike = 4382.232059 Burning in for 350 iterations out of 500 -2 * Loglike = 4343.813897 Burning in for 400 iterations out of 500 -2 * Loglike = 4340.078888 Burning in for 450 iterations out of 500 -2 * Loglike = 4390.561197 Burning in for 500 iterations out of 500 -2 * Loglike = 4371.761980 ERAS c1090 c1091 MCMC 1 5000 1 c1090 c1091 c1003 c1004 1 1 Actual update 50 of 5000, Stored update 50 of 5000 -2 * Loglike = 4383.676592 Actual update 100 of 5000, Stored update 100 of 5000 -2 * Loglike = 4360.899099 Actual update 150 of 5000, Stored update 150 of 5000 -2 * Loglike = 4378.216995 Actual update 200 of 5000, Stored update 200 of 5000 -2 * Loglike = 4370.781004 Actual update 250 of 5000, Stored update 250 of 5000 -2 * Loglike = 4354.179270 Actual update 300 of 5000, Stored update 300 of 5000 -2 * Loglike = 4353.706447 Actual update 350 of 5000, Stored update 350 of 5000 -2 * Loglike = 4354.107972 Actual update 400 of 5000, Stored update 400 of 5000 -2 * Loglike = 4369.377441 Actual update 450 of 5000, Stored update 450 of 5000 -2 * Loglike = 4384.300744 Actual update 500 of 5000, Stored update 500 of 5000 -2 * Loglike = 4402.311207 Actual update 550 of 5000, Stored update 550 of 5000 -2 * Loglike = 4357.980661 Actual update 600 of 5000, Stored update 600 of 5000 -2 * Loglike = 4369.438759 Actual update 650 of 5000, Stored update 650 of 5000 -2 * Loglike = 4370.734946 Actual update 700 of 5000, Stored update 700 of 5000 -2 * Loglike = 4381.441366 Actual update 750 of 5000, Stored update 750 of 5000 -2 * Loglike = 4380.417656 Actual update 800 of 5000, Stored update 800 of 5000 -2 * Loglike = 4358.772526 Actual update 850 of 5000, Stored update 850 of 5000 -2 * Loglike = 4342.000868 Actual update 900 of 5000, Stored update 900 of 5000 -2 * Loglike = 4371.842784 Actual update 950 of 5000, Stored update 950 of 5000 -2 * Loglike = 4392.635737 Actual update 1000 of 5000, Stored update 1000 of 5000 -2 * Loglike = 4379.070297 Actual update 1050 of 5000, Stored update 1050 of 5000 -2 * Loglike = 4370.631019 Actual update 1100 of 5000, Stored update 1100 of 5000 -2 * Loglike = 4371.183244 Actual update 1150 of 5000, Stored update 1150 of 5000 -2 * Loglike = 4358.890831 Actual update 1200 of 5000, Stored update 1200 of 5000 -2 * Loglike = 4362.462708 Actual update 1250 of 5000, Stored update 1250 of 5000 -2 * Loglike = 4355.791602 Actual update 1300 of 5000, Stored update 1300 of 5000 -2 * Loglike = 4362.821203 Actual update 1350 of 5000, Stored update 1350 of 5000 -2 * Loglike = 4369.356198 Actual update 1400 of 5000, Stored update 1400 of 5000 -2 * Loglike = 4348.886758 Actual update 1450 of 5000, Stored update 1450 of 5000 -2 * Loglike = 4364.942096 Actual update 1500 of 5000, Stored update 1500 of 5000 -2 * Loglike = 4371.794705 Actual update 1550 of 5000, Stored update 1550 of 5000 -2 * Loglike = 4376.042590 Actual update 1600 of 5000, Stored update 1600 of 5000 -2 * Loglike = 4374.226486 Actual update 1650 of 5000, Stored update 1650 of 5000 -2 * Loglike = 4360.457989 Actual update 1700 of 5000, Stored update 1700 of 5000 -2 * Loglike = 4381.580811 Actual update 1750 of 5000, Stored update 1750 of 5000 -2 * Loglike = 4377.090637 Actual update 1800 of 5000, Stored update 1800 of 5000 -2 * Loglike = 4395.388759 Actual update 1850 of 5000, Stored update 1850 of 5000 -2 * Loglike = 4385.408621 Actual update 1900 of 5000, Stored update 1900 of 5000 -2 * Loglike = 4368.425510 Actual update 1950 of 5000, Stored update 1950 of 5000 -2 * Loglike = 4351.376377 Actual update 2000 of 5000, Stored update 2000 of 5000 -2 * Loglike = 4392.439316 Actual update 2050 of 5000, Stored update 2050 of 5000 -2 * Loglike = 4358.541513 Actual update 2100 of 5000, Stored update 2100 of 5000 -2 * Loglike = 4346.150542 Actual update 2150 of 5000, Stored update 2150 of 5000 -2 * Loglike = 4387.084860 Actual update 2200 of 5000, Stored update 2200 of 5000 -2 * Loglike = 4420.364349 Actual update 2250 of 5000, Stored update 2250 of 5000 -2 * Loglike = 4342.569130 Actual update 2300 of 5000, Stored update 2300 of 5000 -2 * Loglike = 4373.717269 Actual update 2350 of 5000, Stored update 2350 of 5000 -2 * Loglike = 4375.499447 Actual update 2400 of 5000, Stored update 2400 of 5000 -2 * Loglike = 4388.039490 Actual update 2450 of 5000, Stored update 2450 of 5000 -2 * Loglike = 4409.309913 Actual update 2500 of 5000, Stored update 2500 of 5000 -2 * Loglike = 4373.021866 Actual update 2550 of 5000, Stored update 2550 of 5000 -2 * Loglike = 4350.586111 Actual update 2600 of 5000, Stored update 2600 of 5000 -2 * Loglike = 4375.236627 Actual update 2650 of 5000, Stored update 2650 of 5000 -2 * Loglike = 4379.500106 Actual update 2700 of 5000, Stored update 2700 of 5000 -2 * Loglike = 4341.396557 Actual update 2750 of 5000, Stored update 2750 of 5000 -2 * Loglike = 4376.974718 Actual update 2800 of 5000, Stored update 2800 of 5000 -2 * Loglike = 4383.183060 Actual update 2850 of 5000, Stored update 2850 of 5000 -2 * Loglike = 4377.775414 Actual update 2900 of 5000, Stored update 2900 of 5000 -2 * Loglike = 4368.179284 Actual update 2950 of 5000, Stored update 2950 of 5000 -2 * Loglike = 4392.736223 Actual update 3000 of 5000, Stored update 3000 of 5000 -2 * Loglike = 4372.981916 Actual update 3050 of 5000, Stored update 3050 of 5000 -2 * Loglike = 4349.633060 Actual update 3100 of 5000, Stored update 3100 of 5000 -2 * Loglike = 4364.458428 Actual update 3150 of 5000, Stored update 3150 of 5000 -2 * Loglike = 4366.948197 Actual update 3200 of 5000, Stored update 3200 of 5000 -2 * Loglike = 4343.789589 Actual update 3250 of 5000, Stored update 3250 of 5000 -2 * Loglike = 4343.433573 Actual update 3300 of 5000, Stored update 3300 of 5000 -2 * Loglike = 4378.667200 Actual update 3350 of 5000, Stored update 3350 of 5000 -2 * Loglike = 4375.462705 Actual update 3400 of 5000, Stored update 3400 of 5000 -2 * Loglike = 4360.648771 Actual update 3450 of 5000, Stored update 3450 of 5000 -2 * Loglike = 4346.413915 Actual update 3500 of 5000, Stored update 3500 of 5000 -2 * Loglike = 4363.032799 Actual update 3550 of 5000, Stored update 3550 of 5000 -2 * Loglike = 4372.059643 Actual update 3600 of 5000, Stored update 3600 of 5000 -2 * Loglike = 4381.597971 Actual update 3650 of 5000, Stored update 3650 of 5000 -2 * Loglike = 4367.802468 Actual update 3700 of 5000, Stored update 3700 of 5000 -2 * Loglike = 4388.174707 Actual update 3750 of 5000, Stored update 3750 of 5000 -2 * Loglike = 4364.689796 Actual update 3800 of 5000, Stored update 3800 of 5000 -2 * Loglike = 4369.668514 Actual update 3850 of 5000, Stored update 3850 of 5000 -2 * Loglike = 4367.807246 Actual update 3900 of 5000, Stored update 3900 of 5000 -2 * Loglike = 4385.690429 Actual update 3950 of 5000, Stored update 3950 of 5000 -2 * Loglike = 4340.547789 Actual update 4000 of 5000, Stored update 4000 of 5000 -2 * Loglike = 4374.508769 Actual update 4050 of 5000, Stored update 4050 of 5000 -2 * Loglike = 4369.482938 Actual update 4100 of 5000, Stored update 4100 of 5000 -2 * Loglike = 4387.488013 Actual update 4150 of 5000, Stored update 4150 of 5000 -2 * Loglike = 4366.381971 Actual update 4200 of 5000, Stored update 4200 of 5000 -2 * Loglike = 4355.456054 Actual update 4250 of 5000, Stored update 4250 of 5000 -2 * Loglike = 4423.287838 Actual update 4300 of 5000, Stored update 4300 of 5000 -2 * Loglike = 4357.369369 Actual update 4350 of 5000, Stored update 4350 of 5000 -2 * Loglike = 4407.202244 Actual update 4400 of 5000, Stored update 4400 of 5000 -2 * Loglike = 4366.985025 Actual update 4450 of 5000, Stored update 4450 of 5000 -2 * Loglike = 4344.824569 Actual update 4500 of 5000, Stored update 4500 of 5000 -2 * Loglike = 4376.372951 Actual update 4550 of 5000, Stored update 4550 of 5000 -2 * Loglike = 4354.705853 Actual update 4600 of 5000, Stored update 4600 of 5000 -2 * Loglike = 4376.770686 Actual update 4650 of 5000, Stored update 4650 of 5000 -2 * Loglike = 4384.543928 Actual update 4700 of 5000, Stored update 4700 of 5000 -2 * Loglike = 4384.555533 Actual update 4750 of 5000, Stored update 4750 of 5000 -2 * Loglike = 4408.883302 Actual update 4800 of 5000, Stored update 4800 of 5000 -2 * Loglike = 4370.628066 Actual update 4850 of 5000, Stored update 4850 of 5000 -2 * Loglike = 4393.958027 Actual update 4900 of 5000, Stored update 4900 of 5000 -2 * Loglike = 4374.432108 Actual update 4950 of 5000, Stored update 4950 of 5000 -2 * Loglike = 4362.542138 Actual update 5000 of 5000, Stored update 5000 of 5000 -2 * Loglike = 4344.062467 PUPN c1003 c1004 AVER c1091 b99 b100 Count = 5000 Average = 4369.6 S.D. = 17.064 S.E.M. = 0.24132 ECHO 0 Execution completed -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- MLwiN (version: 3.11) multilevel model (Normal) N min mean max N_complete min_complete mean_complete max_complete company 141 2 21.43262 49 141 2 21.43262 49 Estimation algorithm: MCMC Cross-classified Elapsed time : 2.19s Number of obs: 3022 (from total 3022) Number of iter.: 5000 Chains: 1 Burn-in: 500 Bayesian Deviance Information Criterion (DIC) Dbar D(thetabar) pD DIC 4369.576 4262.305 107.270 4476.846 --------------------------------------------------------------------------------------------------- The model formula: logearn ~ 1 + age_40 + sex + parttime + companyno54 + companyno67 + (1 | company) + (1 | id) Level 2: company Level 1: id --------------------------------------------------------------------------------------------------- The fixed part estimates: Coef. Std. Err. z Pr(>|z|) [95% Cred. Interval] ESS Intercept 3.02483 0.02262 133.73 0 *** 2.97916 3.06858 644 age_40 0.01140 0.00093 12.25 1.755e-34 *** 0.00961 0.01321 4314 sexfemale -0.21655 0.01882 -11.51 1.227e-30 *** -0.25374 -0.17976 4648 parttimeParttime -0.41036 0.03243 -12.65 1.073e-36 *** -0.47205 -0.34733 4696 companyno54 0.78561 0.19434 4.04 5.289e-05 *** 0.39831 1.15192 491 companyno67 0.87102 0.22416 3.89 0.000102 *** 0.44594 1.31442 423 Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 --------------------------------------------------------------------------------------------------- The random part estimates at the company level: Coef. Std. Err. [95% Cred. Interval] ESS var_Intercept 0.04488 0.00728 0.03248 0.06117 1759 --------------------------------------------------------------------------------------------------- The random part estimates at the id level: Coef. Std. Err. [95% Cred. Interval] ESS var_Intercept 0.24876 0.00648 0.23660 0.26168 4299 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- > > # 16.7 Multiple membership multiple classification (MMMC) models . . . . 244 > > # Chapter learning outcomes . . . . . . . . . . . . . . . . . . . . . . .128 > > > > > > ############################################################################ > > proc.time() user system elapsed 9.68 0.82 21.93