R version 3.6.3 (2020-02-29) -- "Holding the Windsock" Copyright (C) 2020 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit) 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. Natural language support but running in an English locale 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-2017 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.05/ 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 for 50 iterations out of 500 -2 * Loglike = 5198.982763 Burning in for 100 iterations out of 500 -2 * Loglike = 5197.436691 Burning in for 150 iterations out of 500 -2 * Loglike = 5196.417640 Burning in for 200 iterations out of 500 -2 * Loglike = 5201.730364 Burning in for 250 iterations out of 500 -2 * Loglike = 5205.060154 Burning in for 300 iterations out of 500 -2 * Loglike = 5205.276540 Burning in for 350 iterations out of 500 -2 * Loglike = 5196.572709 Burning in for 400 iterations out of 500 -2 * Loglike = 5198.122166 Burning in for 450 iterations out of 500 -2 * Loglike = 5198.712467 Burning in for 500 iterations out of 500 -2 * Loglike = 5201.914356 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 = 5197.573647 Actual update 100 of 5000, Stored update 100 of 5000 -2 * Loglike = 5203.266591 Actual update 150 of 5000, Stored update 150 of 5000 -2 * Loglike = 5200.118233 Actual update 200 of 5000, Stored update 200 of 5000 -2 * Loglike = 5197.682028 Actual update 250 of 5000, Stored update 250 of 5000 -2 * Loglike = 5199.245425 Actual update 300 of 5000, Stored update 300 of 5000 -2 * Loglike = 5205.936877 Actual update 350 of 5000, Stored update 350 of 5000 -2 * Loglike = 5198.303288 Actual update 400 of 5000, Stored update 400 of 5000 -2 * Loglike = 5199.510949 Actual update 450 of 5000, Stored update 450 of 5000 -2 * Loglike = 5205.950365 Actual update 500 of 5000, Stored update 500 of 5000 -2 * Loglike = 5199.323995 Actual update 550 of 5000, Stored update 550 of 5000 -2 * Loglike = 5199.884440 Actual update 600 of 5000, Stored update 600 of 5000 -2 * Loglike = 5198.805587 Actual update 650 of 5000, Stored update 650 of 5000 -2 * Loglike = 5198.886882 Actual update 700 of 5000, Stored update 700 of 5000 -2 * Loglike = 5196.456280 Actual update 750 of 5000, Stored update 750 of 5000 -2 * Loglike = 5197.390986 Actual update 800 of 5000, Stored update 800 of 5000 -2 * Loglike = 5201.912327 Actual update 850 of 5000, Stored update 850 of 5000 -2 * Loglike = 5196.978427 Actual update 900 of 5000, Stored update 900 of 5000 -2 * Loglike = 5197.037806 Actual update 950 of 5000, Stored update 950 of 5000 -2 * Loglike = 5203.545453 Actual update 1000 of 5000, Stored update 1000 of 5000 -2 * Loglike = 5198.882645 Actual update 1050 of 5000, Stored update 1050 of 5000 -2 * Loglike = 5201.758183 Actual update 1100 of 5000, Stored update 1100 of 5000 -2 * Loglike = 5202.316964 Actual update 1150 of 5000, Stored update 1150 of 5000 -2 * Loglike = 5203.542867 Actual update 1200 of 5000, Stored update 1200 of 5000 -2 * Loglike = 5197.538764 Actual update 1250 of 5000, Stored update 1250 of 5000 -2 * Loglike = 5199.237736 Actual update 1300 of 5000, Stored update 1300 of 5000 -2 * Loglike = 5197.700914 Actual update 1350 of 5000, Stored update 1350 of 5000 -2 * Loglike = 5199.350235 Actual update 1400 of 5000, Stored update 1400 of 5000 -2 * Loglike = 5199.305157 Actual update 1450 of 5000, Stored update 1450 of 5000 -2 * Loglike = 5202.084780 Actual update 1500 of 5000, Stored update 1500 of 5000 -2 * Loglike = 5198.838415 Actual update 1550 of 5000, Stored update 1550 of 5000 -2 * Loglike = 5197.400677 Actual update 1600 of 5000, Stored update 1600 of 5000 -2 * Loglike = 5199.816946 Actual update 1650 of 5000, Stored update 1650 of 5000 -2 * Loglike = 5203.426297 Actual update 1700 of 5000, Stored update 1700 of 5000 -2 * Loglike = 5196.690256 Actual update 1750 of 5000, Stored update 1750 of 5000 -2 * Loglike = 5197.551177 Actual update 1800 of 5000, Stored update 1800 of 5000 -2 * Loglike = 5196.331795 Actual update 1850 of 5000, Stored update 1850 of 5000 -2 * Loglike = 5196.575053 Actual update 1900 of 5000, Stored update 1900 of 5000 -2 * Loglike = 5196.954154 Actual update 1950 of 5000, Stored update 1950 of 5000 -2 * Loglike = 5196.819877 Actual update 2000 of 5000, Stored update 2000 of 5000 -2 * Loglike = 5196.681240 Actual update 2050 of 5000, Stored update 2050 of 5000 -2 * Loglike = 5202.133738 Actual update 2100 of 5000, Stored update 2100 of 5000 -2 * Loglike = 5196.937715 Actual update 2150 of 5000, Stored update 2150 of 5000 -2 * Loglike = 5198.433088 Actual update 2200 of 5000, Stored update 2200 of 5000 -2 * Loglike = 5199.512167 Actual update 2250 of 5000, Stored update 2250 of 5000 -2 * Loglike = 5199.313959 Actual update 2300 of 5000, Stored update 2300 of 5000 -2 * Loglike = 5198.605318 Actual update 2350 of 5000, Stored update 2350 of 5000 -2 * Loglike = 5199.815588 Actual update 2400 of 5000, Stored update 2400 of 5000 -2 * Loglike = 5200.712235 Actual update 2450 of 5000, Stored update 2450 of 5000 -2 * Loglike = 5200.820228 Actual update 2500 of 5000, Stored update 2500 of 5000 -2 * Loglike = 5199.042657 Actual update 2550 of 5000, Stored update 2550 of 5000 -2 * Loglike = 5196.022950 Actual update 2600 of 5000, Stored update 2600 of 5000 -2 * Loglike = 5197.797624 Actual update 2650 of 5000, Stored update 2650 of 5000 -2 * Loglike = 5198.003173 Actual update 2700 of 5000, Stored update 2700 of 5000 -2 * Loglike = 5198.363859 Actual update 2750 of 5000, Stored update 2750 of 5000 -2 * Loglike = 5196.870374 Actual update 2800 of 5000, Stored update 2800 of 5000 -2 * Loglike = 5206.355676 Actual update 2850 of 5000, Stored update 2850 of 5000 -2 * Loglike = 5202.402259 Actual update 2900 of 5000, Stored update 2900 of 5000 -2 * Loglike = 5199.743960 Actual update 2950 of 5000, Stored update 2950 of 5000 -2 * Loglike = 5195.729191 Actual update 3000 of 5000, Stored update 3000 of 5000 -2 * Loglike = 5199.934239 Actual update 3050 of 5000, Stored update 3050 of 5000 -2 * Loglike = 5198.753129 Actual update 3100 of 5000, Stored update 3100 of 5000 -2 * Loglike = 5200.954046 Actual update 3150 of 5000, Stored update 3150 of 5000 -2 * Loglike = 5196.857215 Actual update 3200 of 5000, Stored update 3200 of 5000 -2 * Loglike = 5196.150604 Actual update 3250 of 5000, Stored update 3250 of 5000 -2 * Loglike = 5200.618405 Actual update 3300 of 5000, Stored update 3300 of 5000 -2 * Loglike = 5196.280444 Actual update 3350 of 5000, Stored update 3350 of 5000 -2 * Loglike = 5195.763100 Actual update 3400 of 5000, Stored update 3400 of 5000 -2 * Loglike = 5196.421645 Actual update 3450 of 5000, Stored update 3450 of 5000 -2 * Loglike = 5198.212843 Actual update 3500 of 5000, Stored update 3500 of 5000 -2 * Loglike = 5201.366017 Actual update 3550 of 5000, Stored update 3550 of 5000 -2 * Loglike = 5199.117032 Actual update 3600 of 5000, Stored update 3600 of 5000 -2 * Loglike = 5201.548889 Actual update 3650 of 5000, Stored update 3650 of 5000 -2 * Loglike = 5197.379101 Actual update 3700 of 5000, Stored update 3700 of 5000 -2 * Loglike = 5198.040303 Actual update 3750 of 5000, Stored update 3750 of 5000 -2 * Loglike = 5199.100227 Actual update 3800 of 5000, Stored update 3800 of 5000 -2 * Loglike = 5197.626009 Actual update 3850 of 5000, Stored update 3850 of 5000 -2 * Loglike = 5199.045448 Actual update 3900 of 5000, Stored update 3900 of 5000 -2 * Loglike = 5200.315638 Actual update 3950 of 5000, Stored update 3950 of 5000 -2 * Loglike = 5199.589975 Actual update 4000 of 5000, Stored update 4000 of 5000 -2 * Loglike = 5201.050314 Actual update 4050 of 5000, Stored update 4050 of 5000 -2 * Loglike = 5199.567042 Actual update 4100 of 5000, Stored update 4100 of 5000 -2 * Loglike = 5196.198520 Actual update 4150 of 5000, Stored update 4150 of 5000 -2 * Loglike = 5203.924736 Actual update 4200 of 5000, Stored update 4200 of 5000 -2 * Loglike = 5197.326979 Actual update 4250 of 5000, Stored update 4250 of 5000 -2 * Loglike = 5196.811130 Actual update 4300 of 5000, Stored update 4300 of 5000 -2 * Loglike = 5204.231665 Actual update 4350 of 5000, Stored update 4350 of 5000 -2 * Loglike = 5203.387749 Actual update 4400 of 5000, Stored update 4400 of 5000 -2 * Loglike = 5199.176780 Actual update 4450 of 5000, Stored update 4450 of 5000 -2 * Loglike = 5198.681302 Actual update 4500 of 5000, Stored update 4500 of 5000 -2 * Loglike = 5207.454527 Actual update 4550 of 5000, Stored update 4550 of 5000 -2 * Loglike = 5196.201476 Actual update 4600 of 5000, Stored update 4600 of 5000 -2 * Loglike = 5197.537863 Actual update 4650 of 5000, Stored update 4650 of 5000 -2 * Loglike = 5205.380009 Actual update 4700 of 5000, Stored update 4700 of 5000 -2 * Loglike = 5205.892600 Actual update 4750 of 5000, Stored update 4750 of 5000 -2 * Loglike = 5197.015902 Actual update 4800 of 5000, Stored update 4800 of 5000 -2 * Loglike = 5202.055613 Actual update 4850 of 5000, Stored update 4850 of 5000 -2 * Loglike = 5196.486611 Actual update 4900 of 5000, Stored update 4900 of 5000 -2 * Loglike = 5198.952055 Actual update 4950 of 5000, Stored update 4950 of 5000 -2 * Loglike = 5197.008565 Actual update 5000 of 5000, Stored update 5000 of 5000 -2 * Loglike = 5196.534022 PUPN c1003 c1004 AVER c1091 b99 b100 Count = 5000 Average = 5199.6 S.D. = 2.7830 S.E.M. = 0.039358 ECHO 0 Execution completed -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- MLwiN (version: 3.05) multilevel model (Normal) Estimation algorithm: MCMC Elapsed time : 0.47s 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.581 5195.622 3.958 5203.539 --------------------------------------------------------------------------------------------------- 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.07972 0.03013 102.21 0 *** 3.02052 3.13916 4846 age_40 0.01219 0.00102 11.94 7.449e-33 *** 0.01020 0.01420 5000 numjobs -0.12967 0.02379 -5.45 5.036e-08 *** -0.17575 -0.08231 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.32722 0.00844 0.31125 0.34434 4774 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- > > (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 for 50 iterations out of 500 -2 * Loglike = 4993.672298 Burning in for 100 iterations out of 500 -2 * Loglike = 4987.960729 Burning in for 150 iterations out of 500 -2 * Loglike = 4988.381983 Burning in for 200 iterations out of 500 -2 * Loglike = 4989.249048 Burning in for 250 iterations out of 500 -2 * Loglike = 4987.926581 Burning in for 300 iterations out of 500 -2 * Loglike = 4986.110916 Burning in for 350 iterations out of 500 -2 * Loglike = 4992.210994 Burning in for 400 iterations out of 500 -2 * Loglike = 4985.223422 Burning in for 450 iterations out of 500 -2 * Loglike = 4995.420050 Burning in for 500 iterations out of 500 -2 * Loglike = 4990.643840 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.501309 Actual update 100 of 5000, Stored update 100 of 5000 -2 * Loglike = 4997.257291 Actual update 150 of 5000, Stored update 150 of 5000 -2 * Loglike = 4989.657633 Actual update 200 of 5000, Stored update 200 of 5000 -2 * Loglike = 4989.074338 Actual update 250 of 5000, Stored update 250 of 5000 -2 * Loglike = 4986.266369 Actual update 300 of 5000, Stored update 300 of 5000 -2 * Loglike = 4987.187833 Actual update 350 of 5000, Stored update 350 of 5000 -2 * Loglike = 4992.559179 Actual update 400 of 5000, Stored update 400 of 5000 -2 * Loglike = 5003.948926 Actual update 450 of 5000, Stored update 450 of 5000 -2 * Loglike = 4990.810902 Actual update 500 of 5000, Stored update 500 of 5000 -2 * Loglike = 4989.420420 Actual update 550 of 5000, Stored update 550 of 5000 -2 * Loglike = 4987.827231 Actual update 600 of 5000, Stored update 600 of 5000 -2 * Loglike = 4987.973286 Actual update 650 of 5000, Stored update 650 of 5000 -2 * Loglike = 4989.748008 Actual update 700 of 5000, Stored update 700 of 5000 -2 * Loglike = 4989.152181 Actual update 750 of 5000, Stored update 750 of 5000 -2 * Loglike = 4996.001438 Actual update 800 of 5000, Stored update 800 of 5000 -2 * Loglike = 4988.071909 Actual update 850 of 5000, Stored update 850 of 5000 -2 * Loglike = 4990.316589 Actual update 900 of 5000, Stored update 900 of 5000 -2 * Loglike = 4991.137136 Actual update 950 of 5000, Stored update 950 of 5000 -2 * Loglike = 4989.592796 Actual update 1000 of 5000, Stored update 1000 of 5000 -2 * Loglike = 4988.297320 Actual update 1050 of 5000, Stored update 1050 of 5000 -2 * Loglike = 4985.229190 Actual update 1100 of 5000, Stored update 1100 of 5000 -2 * Loglike = 4988.975930 Actual update 1150 of 5000, Stored update 1150 of 5000 -2 * Loglike = 4987.094746 Actual update 1200 of 5000, Stored update 1200 of 5000 -2 * Loglike = 4991.052261 Actual update 1250 of 5000, Stored update 1250 of 5000 -2 * Loglike = 4995.965918 Actual update 1300 of 5000, Stored update 1300 of 5000 -2 * Loglike = 4986.590284 Actual update 1350 of 5000, Stored update 1350 of 5000 -2 * Loglike = 4990.293013 Actual update 1400 of 5000, Stored update 1400 of 5000 -2 * Loglike = 4990.089773 Actual update 1450 of 5000, Stored update 1450 of 5000 -2 * Loglike = 4989.298469 Actual update 1500 of 5000, Stored update 1500 of 5000 -2 * Loglike = 4994.996355 Actual update 1550 of 5000, Stored update 1550 of 5000 -2 * Loglike = 4990.078930 Actual update 1600 of 5000, Stored update 1600 of 5000 -2 * Loglike = 4991.948438 Actual update 1650 of 5000, Stored update 1650 of 5000 -2 * Loglike = 4987.766023 Actual update 1700 of 5000, Stored update 1700 of 5000 -2 * Loglike = 4988.892076 Actual update 1750 of 5000, Stored update 1750 of 5000 -2 * Loglike = 4999.680357 Actual update 1800 of 5000, Stored update 1800 of 5000 -2 * Loglike = 4987.930437 Actual update 1850 of 5000, Stored update 1850 of 5000 -2 * Loglike = 4988.006847 Actual update 1900 of 5000, Stored update 1900 of 5000 -2 * Loglike = 4988.709234 Actual update 1950 of 5000, Stored update 1950 of 5000 -2 * Loglike = 4986.007262 Actual update 2000 of 5000, Stored update 2000 of 5000 -2 * Loglike = 4988.480831 Actual update 2050 of 5000, Stored update 2050 of 5000 -2 * Loglike = 4992.185380 Actual update 2100 of 5000, Stored update 2100 of 5000 -2 * Loglike = 4989.679547 Actual update 2150 of 5000, Stored update 2150 of 5000 -2 * Loglike = 4994.432650 Actual update 2200 of 5000, Stored update 2200 of 5000 -2 * Loglike = 4987.280928 Actual update 2250 of 5000, Stored update 2250 of 5000 -2 * Loglike = 4988.780816 Actual update 2300 of 5000, Stored update 2300 of 5000 -2 * Loglike = 4985.152756 Actual update 2350 of 5000, Stored update 2350 of 5000 -2 * Loglike = 4991.717809 Actual update 2400 of 5000, Stored update 2400 of 5000 -2 * Loglike = 4997.048111 Actual update 2450 of 5000, Stored update 2450 of 5000 -2 * Loglike = 4990.019073 Actual update 2500 of 5000, Stored update 2500 of 5000 -2 * Loglike = 4988.321291 Actual update 2550 of 5000, Stored update 2550 of 5000 -2 * Loglike = 5001.129875 Actual update 2600 of 5000, Stored update 2600 of 5000 -2 * Loglike = 4989.730748 Actual update 2650 of 5000, Stored update 2650 of 5000 -2 * Loglike = 4987.559879 Actual update 2700 of 5000, Stored update 2700 of 5000 -2 * Loglike = 4987.313213 Actual update 2750 of 5000, Stored update 2750 of 5000 -2 * Loglike = 4988.810253 Actual update 2800 of 5000, Stored update 2800 of 5000 -2 * Loglike = 4989.563836 Actual update 2850 of 5000, Stored update 2850 of 5000 -2 * Loglike = 4988.604105 Actual update 2900 of 5000, Stored update 2900 of 5000 -2 * Loglike = 4988.721581 Actual update 2950 of 5000, Stored update 2950 of 5000 -2 * Loglike = 4989.027972 Actual update 3000 of 5000, Stored update 3000 of 5000 -2 * Loglike = 4996.253914 Actual update 3050 of 5000, Stored update 3050 of 5000 -2 * Loglike = 4986.768338 Actual update 3100 of 5000, Stored update 3100 of 5000 -2 * Loglike = 4988.842250 Actual update 3150 of 5000, Stored update 3150 of 5000 -2 * Loglike = 4998.023869 Actual update 3200 of 5000, Stored update 3200 of 5000 -2 * Loglike = 4991.557347 Actual update 3250 of 5000, Stored update 3250 of 5000 -2 * Loglike = 4988.878749 Actual update 3300 of 5000, Stored update 3300 of 5000 -2 * Loglike = 4986.920471 Actual update 3350 of 5000, Stored update 3350 of 5000 -2 * Loglike = 4995.790841 Actual update 3400 of 5000, Stored update 3400 of 5000 -2 * Loglike = 4987.659900 Actual update 3450 of 5000, Stored update 3450 of 5000 -2 * Loglike = 4990.444129 Actual update 3500 of 5000, Stored update 3500 of 5000 -2 * Loglike = 5000.065153 Actual update 3550 of 5000, Stored update 3550 of 5000 -2 * Loglike = 4984.739906 Actual update 3600 of 5000, Stored update 3600 of 5000 -2 * Loglike = 4988.798568 Actual update 3650 of 5000, Stored update 3650 of 5000 -2 * Loglike = 4998.168163 Actual update 3700 of 5000, Stored update 3700 of 5000 -2 * Loglike = 4986.899542 Actual update 3750 of 5000, Stored update 3750 of 5000 -2 * Loglike = 4988.686935 Actual update 3800 of 5000, Stored update 3800 of 5000 -2 * Loglike = 4988.968459 Actual update 3850 of 5000, Stored update 3850 of 5000 -2 * Loglike = 4997.252454 Actual update 3900 of 5000, Stored update 3900 of 5000 -2 * Loglike = 4989.046867 Actual update 3950 of 5000, Stored update 3950 of 5000 -2 * Loglike = 4988.511939 Actual update 4000 of 5000, Stored update 4000 of 5000 -2 * Loglike = 4993.511460 Actual update 4050 of 5000, Stored update 4050 of 5000 -2 * Loglike = 4990.787304 Actual update 4100 of 5000, Stored update 4100 of 5000 -2 * Loglike = 4990.315258 Actual update 4150 of 5000, Stored update 4150 of 5000 -2 * Loglike = 4989.446292 Actual update 4200 of 5000, Stored update 4200 of 5000 -2 * Loglike = 4988.572518 Actual update 4250 of 5000, Stored update 4250 of 5000 -2 * Loglike = 4986.371273 Actual update 4300 of 5000, Stored update 4300 of 5000 -2 * Loglike = 4987.933853 Actual update 4350 of 5000, Stored update 4350 of 5000 -2 * Loglike = 4996.765202 Actual update 4400 of 5000, Stored update 4400 of 5000 -2 * Loglike = 4986.090147 Actual update 4450 of 5000, Stored update 4450 of 5000 -2 * Loglike = 4985.853503 Actual update 4500 of 5000, Stored update 4500 of 5000 -2 * Loglike = 4991.948269 Actual update 4550 of 5000, Stored update 4550 of 5000 -2 * Loglike = 4988.023666 Actual update 4600 of 5000, Stored update 4600 of 5000 -2 * Loglike = 4984.492326 Actual update 4650 of 5000, Stored update 4650 of 5000 -2 * Loglike = 4987.865978 Actual update 4700 of 5000, Stored update 4700 of 5000 -2 * Loglike = 4988.678908 Actual update 4750 of 5000, Stored update 4750 of 5000 -2 * Loglike = 4985.389733 Actual update 4800 of 5000, Stored update 4800 of 5000 -2 * Loglike = 4991.532268 Actual update 4850 of 5000, Stored update 4850 of 5000 -2 * Loglike = 4988.649679 Actual update 4900 of 5000, Stored update 4900 of 5000 -2 * Loglike = 4989.262675 Actual update 4950 of 5000, Stored update 4950 of 5000 -2 * Loglike = 4987.639377 Actual update 5000 of 5000, Stored update 5000 of 5000 -2 * Loglike = 4986.542954 PUPN c1003 c1004 AVER c1091 b99 b100 Count = 5000 Average = 4990.0 S.D. = 3.4432 S.E.M. = 0.048694 ECHO 0 Execution completed -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- MLwiN (version: 3.05) multilevel model (Normal) Estimation algorithm: MCMC Elapsed time : 0.56s 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.992 4983.976 6.016 4996.009 --------------------------------------------------------------------------------------------------- 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.08523 0.03008 102.57 0 *** 3.02619 3.14293 5481 age_40 0.01081 0.00102 10.64 1.947e-26 *** 0.00883 0.01277 5000 numjobs -0.03294 0.02409 -1.37 0.1716 -0.08012 0.01514 5000 sexfemale -0.21157 0.02078 -10.18 2.389e-24 *** -0.25185 -0.17073 5747 parttimeParttime -0.38911 0.03669 -10.61 2.796e-26 *** -0.46042 -0.31789 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.30543 0.00797 0.29044 0.32178 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 for 50 iterations out of 500 -2 * Loglike = 4409.611739 Burning in for 100 iterations out of 500 -2 * Loglike = 4428.681408 Burning in for 150 iterations out of 500 -2 * Loglike = 4448.163776 Burning in for 200 iterations out of 500 -2 * Loglike = 4421.035409 Burning in for 250 iterations out of 500 -2 * Loglike = 4397.136641 Burning in for 300 iterations out of 500 -2 * Loglike = 4427.818966 Burning in for 350 iterations out of 500 -2 * Loglike = 4451.521566 Burning in for 400 iterations out of 500 -2 * Loglike = 4419.026775 Burning in for 450 iterations out of 500 -2 * Loglike = 4404.869313 Burning in for 500 iterations out of 500 -2 * Loglike = 4411.050065 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 = 4425.761511 Actual update 100 of 5000, Stored update 100 of 5000 -2 * Loglike = 4413.013070 Actual update 150 of 5000, Stored update 150 of 5000 -2 * Loglike = 4402.728355 Actual update 200 of 5000, Stored update 200 of 5000 -2 * Loglike = 4412.250801 Actual update 250 of 5000, Stored update 250 of 5000 -2 * Loglike = 4404.696735 Actual update 300 of 5000, Stored update 300 of 5000 -2 * Loglike = 4421.789165 Actual update 350 of 5000, Stored update 350 of 5000 -2 * Loglike = 4400.295999 Actual update 400 of 5000, Stored update 400 of 5000 -2 * Loglike = 4406.463879 Actual update 450 of 5000, Stored update 450 of 5000 -2 * Loglike = 4434.895723 Actual update 500 of 5000, Stored update 500 of 5000 -2 * Loglike = 4419.317404 Actual update 550 of 5000, Stored update 550 of 5000 -2 * Loglike = 4429.074611 Actual update 600 of 5000, Stored update 600 of 5000 -2 * Loglike = 4439.564132 Actual update 650 of 5000, Stored update 650 of 5000 -2 * Loglike = 4425.178283 Actual update 700 of 5000, Stored update 700 of 5000 -2 * Loglike = 4407.246967 Actual update 750 of 5000, Stored update 750 of 5000 -2 * Loglike = 4446.900796 Actual update 800 of 5000, Stored update 800 of 5000 -2 * Loglike = 4414.275653 Actual update 850 of 5000, Stored update 850 of 5000 -2 * Loglike = 4403.029694 Actual update 900 of 5000, Stored update 900 of 5000 -2 * Loglike = 4442.238229 Actual update 950 of 5000, Stored update 950 of 5000 -2 * Loglike = 4441.711239 Actual update 1000 of 5000, Stored update 1000 of 5000 -2 * Loglike = 4427.064327 Actual update 1050 of 5000, Stored update 1050 of 5000 -2 * Loglike = 4407.941349 Actual update 1100 of 5000, Stored update 1100 of 5000 -2 * Loglike = 4422.433501 Actual update 1150 of 5000, Stored update 1150 of 5000 -2 * Loglike = 4434.286327 Actual update 1200 of 5000, Stored update 1200 of 5000 -2 * Loglike = 4427.017498 Actual update 1250 of 5000, Stored update 1250 of 5000 -2 * Loglike = 4394.807783 Actual update 1300 of 5000, Stored update 1300 of 5000 -2 * Loglike = 4402.270728 Actual update 1350 of 5000, Stored update 1350 of 5000 -2 * Loglike = 4432.893009 Actual update 1400 of 5000, Stored update 1400 of 5000 -2 * Loglike = 4391.024441 Actual update 1450 of 5000, Stored update 1450 of 5000 -2 * Loglike = 4398.919914 Actual update 1500 of 5000, Stored update 1500 of 5000 -2 * Loglike = 4398.936153 Actual update 1550 of 5000, Stored update 1550 of 5000 -2 * Loglike = 4428.372804 Actual update 1600 of 5000, Stored update 1600 of 5000 -2 * Loglike = 4439.036152 Actual update 1650 of 5000, Stored update 1650 of 5000 -2 * Loglike = 4423.444385 Actual update 1700 of 5000, Stored update 1700 of 5000 -2 * Loglike = 4434.038178 Actual update 1750 of 5000, Stored update 1750 of 5000 -2 * Loglike = 4454.212100 Actual update 1800 of 5000, Stored update 1800 of 5000 -2 * Loglike = 4438.336664 Actual update 1850 of 5000, Stored update 1850 of 5000 -2 * Loglike = 4425.516687 Actual update 1900 of 5000, Stored update 1900 of 5000 -2 * Loglike = 4452.515747 Actual update 1950 of 5000, Stored update 1950 of 5000 -2 * Loglike = 4420.819973 Actual update 2000 of 5000, Stored update 2000 of 5000 -2 * Loglike = 4411.537952 Actual update 2050 of 5000, Stored update 2050 of 5000 -2 * Loglike = 4397.516081 Actual update 2100 of 5000, Stored update 2100 of 5000 -2 * Loglike = 4437.551221 Actual update 2150 of 5000, Stored update 2150 of 5000 -2 * Loglike = 4439.949904 Actual update 2200 of 5000, Stored update 2200 of 5000 -2 * Loglike = 4429.640495 Actual update 2250 of 5000, Stored update 2250 of 5000 -2 * Loglike = 4430.793973 Actual update 2300 of 5000, Stored update 2300 of 5000 -2 * Loglike = 4423.887570 Actual update 2350 of 5000, Stored update 2350 of 5000 -2 * Loglike = 4420.962473 Actual update 2400 of 5000, Stored update 2400 of 5000 -2 * Loglike = 4401.778734 Actual update 2450 of 5000, Stored update 2450 of 5000 -2 * Loglike = 4418.940438 Actual update 2500 of 5000, Stored update 2500 of 5000 -2 * Loglike = 4423.187684 Actual update 2550 of 5000, Stored update 2550 of 5000 -2 * Loglike = 4448.637514 Actual update 2600 of 5000, Stored update 2600 of 5000 -2 * Loglike = 4420.477540 Actual update 2650 of 5000, Stored update 2650 of 5000 -2 * Loglike = 4458.829409 Actual update 2700 of 5000, Stored update 2700 of 5000 -2 * Loglike = 4428.465629 Actual update 2750 of 5000, Stored update 2750 of 5000 -2 * Loglike = 4429.453256 Actual update 2800 of 5000, Stored update 2800 of 5000 -2 * Loglike = 4410.827195 Actual update 2850 of 5000, Stored update 2850 of 5000 -2 * Loglike = 4440.371225 Actual update 2900 of 5000, Stored update 2900 of 5000 -2 * Loglike = 4422.475466 Actual update 2950 of 5000, Stored update 2950 of 5000 -2 * Loglike = 4430.708626 Actual update 3000 of 5000, Stored update 3000 of 5000 -2 * Loglike = 4441.509845 Actual update 3050 of 5000, Stored update 3050 of 5000 -2 * Loglike = 4411.779710 Actual update 3100 of 5000, Stored update 3100 of 5000 -2 * Loglike = 4464.087117 Actual update 3150 of 5000, Stored update 3150 of 5000 -2 * Loglike = 4420.050802 Actual update 3200 of 5000, Stored update 3200 of 5000 -2 * Loglike = 4428.275293 Actual update 3250 of 5000, Stored update 3250 of 5000 -2 * Loglike = 4418.967588 Actual update 3300 of 5000, Stored update 3300 of 5000 -2 * Loglike = 4433.171150 Actual update 3350 of 5000, Stored update 3350 of 5000 -2 * Loglike = 4428.065561 Actual update 3400 of 5000, Stored update 3400 of 5000 -2 * Loglike = 4419.380000 Actual update 3450 of 5000, Stored update 3450 of 5000 -2 * Loglike = 4416.199065 Actual update 3500 of 5000, Stored update 3500 of 5000 -2 * Loglike = 4447.145608 Actual update 3550 of 5000, Stored update 3550 of 5000 -2 * Loglike = 4423.254053 Actual update 3600 of 5000, Stored update 3600 of 5000 -2 * Loglike = 4414.967831 Actual update 3650 of 5000, Stored update 3650 of 5000 -2 * Loglike = 4454.920509 Actual update 3700 of 5000, Stored update 3700 of 5000 -2 * Loglike = 4430.349026 Actual update 3750 of 5000, Stored update 3750 of 5000 -2 * Loglike = 4414.567768 Actual update 3800 of 5000, Stored update 3800 of 5000 -2 * Loglike = 4394.407244 Actual update 3850 of 5000, Stored update 3850 of 5000 -2 * Loglike = 4414.426577 Actual update 3900 of 5000, Stored update 3900 of 5000 -2 * Loglike = 4429.994329 Actual update 3950 of 5000, Stored update 3950 of 5000 -2 * Loglike = 4411.800948 Actual update 4000 of 5000, Stored update 4000 of 5000 -2 * Loglike = 4411.781168 Actual update 4050 of 5000, Stored update 4050 of 5000 -2 * Loglike = 4431.664256 Actual update 4100 of 5000, Stored update 4100 of 5000 -2 * Loglike = 4467.508548 Actual update 4150 of 5000, Stored update 4150 of 5000 -2 * Loglike = 4415.430242 Actual update 4200 of 5000, Stored update 4200 of 5000 -2 * Loglike = 4399.976041 Actual update 4250 of 5000, Stored update 4250 of 5000 -2 * Loglike = 4429.950605 Actual update 4300 of 5000, Stored update 4300 of 5000 -2 * Loglike = 4422.647310 Actual update 4350 of 5000, Stored update 4350 of 5000 -2 * Loglike = 4402.214348 Actual update 4400 of 5000, Stored update 4400 of 5000 -2 * Loglike = 4408.144800 Actual update 4450 of 5000, Stored update 4450 of 5000 -2 * Loglike = 4465.615132 Actual update 4500 of 5000, Stored update 4500 of 5000 -2 * Loglike = 4418.680114 Actual update 4550 of 5000, Stored update 4550 of 5000 -2 * Loglike = 4399.826883 Actual update 4600 of 5000, Stored update 4600 of 5000 -2 * Loglike = 4413.831935 Actual update 4650 of 5000, Stored update 4650 of 5000 -2 * Loglike = 4426.428157 Actual update 4700 of 5000, Stored update 4700 of 5000 -2 * Loglike = 4416.994390 Actual update 4750 of 5000, Stored update 4750 of 5000 -2 * Loglike = 4416.097580 Actual update 4800 of 5000, Stored update 4800 of 5000 -2 * Loglike = 4419.970996 Actual update 4850 of 5000, Stored update 4850 of 5000 -2 * Loglike = 4431.494909 Actual update 4900 of 5000, Stored update 4900 of 5000 -2 * Loglike = 4411.349804 Actual update 4950 of 5000, Stored update 4950 of 5000 -2 * Loglike = 4418.198303 Actual update 5000 of 5000, Stored update 5000 of 5000 -2 * Loglike = 4418.217576 PUPN c1003 c1004 AVER c1091 b99 b100 Count = 5000 Average = 4422.2 S.D. = 17.119 S.E.M. = 0.24209 ECHO 0 Execution completed -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- MLwiN (version: 3.05) 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 : 1.95s 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 4422.201 4312.284 109.917 4532.118 --------------------------------------------------------------------------------------------------- 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.03915 0.02344 129.68 0 *** 2.99315 3.08456 544 age_40 0.01132 0.00094 12.10 1.048e-33 *** 0.00953 0.01312 4522 sexfemale -0.21195 0.01914 -11.07 1.681e-28 *** -0.24860 -0.17326 5000 parttimeParttime -0.39870 0.03287 -12.13 7.406e-34 *** -0.46610 -0.33393 4655 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.05119 0.00789 0.03753 0.06832 2072 --------------------------------------------------------------------------------------------------- The random part estimates at the id level: Coef. Std. Err. [95% Cred. Interval] ESS var_Intercept 0.25307 0.00660 0.24049 0.26605 4461 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- > > ## 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 Setting up classifications as categorical variables - may take a while 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 for 50 iterations out of 500 -2 * Loglike = 4518.975477 Burning in for 100 iterations out of 500 -2 * Loglike = 4366.277165 Burning in for 150 iterations out of 500 -2 * Loglike = 4335.306419 Burning in for 200 iterations out of 500 -2 * Loglike = 4369.479516 Burning in for 250 iterations out of 500 -2 * Loglike = 4371.524161 Burning in for 300 iterations out of 500 -2 * Loglike = 4352.527015 Burning in for 350 iterations out of 500 -2 * Loglike = 4363.073835 Burning in for 400 iterations out of 500 -2 * Loglike = 4329.519383 Burning in for 450 iterations out of 500 -2 * Loglike = 4332.915879 Burning in for 500 iterations out of 500 -2 * Loglike = 4358.197645 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.990868 Actual update 100 of 5000, Stored update 100 of 5000 -2 * Loglike = 4343.273167 Actual update 150 of 5000, Stored update 150 of 5000 -2 * Loglike = 4335.704025 Actual update 200 of 5000, Stored update 200 of 5000 -2 * Loglike = 4345.943691 Actual update 250 of 5000, Stored update 250 of 5000 -2 * Loglike = 4336.633509 Actual update 300 of 5000, Stored update 300 of 5000 -2 * Loglike = 4356.480832 Actual update 350 of 5000, Stored update 350 of 5000 -2 * Loglike = 4330.616813 Actual update 400 of 5000, Stored update 400 of 5000 -2 * Loglike = 4336.143323 Actual update 450 of 5000, Stored update 450 of 5000 -2 * Loglike = 4365.970271 Actual update 500 of 5000, Stored update 500 of 5000 -2 * Loglike = 4352.701249 Actual update 550 of 5000, Stored update 550 of 5000 -2 * Loglike = 4360.617463 Actual update 600 of 5000, Stored update 600 of 5000 -2 * Loglike = 4369.441793 Actual update 650 of 5000, Stored update 650 of 5000 -2 * Loglike = 4360.002673 Actual update 700 of 5000, Stored update 700 of 5000 -2 * Loglike = 4337.084758 Actual update 750 of 5000, Stored update 750 of 5000 -2 * Loglike = 4378.114454 Actual update 800 of 5000, Stored update 800 of 5000 -2 * Loglike = 4348.303406 Actual update 850 of 5000, Stored update 850 of 5000 -2 * Loglike = 4334.081230 Actual update 900 of 5000, Stored update 900 of 5000 -2 * Loglike = 4381.105718 Actual update 950 of 5000, Stored update 950 of 5000 -2 * Loglike = 4381.067777 Actual update 1000 of 5000, Stored update 1000 of 5000 -2 * Loglike = 4359.940842 Actual update 1050 of 5000, Stored update 1050 of 5000 -2 * Loglike = 4338.693342 Actual update 1100 of 5000, Stored update 1100 of 5000 -2 * Loglike = 4355.943143 Actual update 1150 of 5000, Stored update 1150 of 5000 -2 * Loglike = 4365.933581 Actual update 1200 of 5000, Stored update 1200 of 5000 -2 * Loglike = 4356.495793 Actual update 1250 of 5000, Stored update 1250 of 5000 -2 * Loglike = 4328.251986 Actual update 1300 of 5000, Stored update 1300 of 5000 -2 * Loglike = 4335.293458 Actual update 1350 of 5000, Stored update 1350 of 5000 -2 * Loglike = 4365.769728 Actual update 1400 of 5000, Stored update 1400 of 5000 -2 * Loglike = 4319.979107 Actual update 1450 of 5000, Stored update 1450 of 5000 -2 * Loglike = 4334.284661 Actual update 1500 of 5000, Stored update 1500 of 5000 -2 * Loglike = 4332.564911 Actual update 1550 of 5000, Stored update 1550 of 5000 -2 * Loglike = 4361.094141 Actual update 1600 of 5000, Stored update 1600 of 5000 -2 * Loglike = 4374.081750 Actual update 1650 of 5000, Stored update 1650 of 5000 -2 * Loglike = 4359.490045 Actual update 1700 of 5000, Stored update 1700 of 5000 -2 * Loglike = 4366.370853 Actual update 1750 of 5000, Stored update 1750 of 5000 -2 * Loglike = 4390.194052 Actual update 1800 of 5000, Stored update 1800 of 5000 -2 * Loglike = 4371.696863 Actual update 1850 of 5000, Stored update 1850 of 5000 -2 * Loglike = 4359.427875 Actual update 1900 of 5000, Stored update 1900 of 5000 -2 * Loglike = 4385.187577 Actual update 1950 of 5000, Stored update 1950 of 5000 -2 * Loglike = 4354.077400 Actual update 2000 of 5000, Stored update 2000 of 5000 -2 * Loglike = 4344.376104 Actual update 2050 of 5000, Stored update 2050 of 5000 -2 * Loglike = 4329.632328 Actual update 2100 of 5000, Stored update 2100 of 5000 -2 * Loglike = 4370.330658 Actual update 2150 of 5000, Stored update 2150 of 5000 -2 * Loglike = 4367.907237 Actual update 2200 of 5000, Stored update 2200 of 5000 -2 * Loglike = 4362.312129 Actual update 2250 of 5000, Stored update 2250 of 5000 -2 * Loglike = 4364.747721 Actual update 2300 of 5000, Stored update 2300 of 5000 -2 * Loglike = 4357.666343 Actual update 2350 of 5000, Stored update 2350 of 5000 -2 * Loglike = 4356.206506 Actual update 2400 of 5000, Stored update 2400 of 5000 -2 * Loglike = 4336.099839 Actual update 2450 of 5000, Stored update 2450 of 5000 -2 * Loglike = 4353.141021 Actual update 2500 of 5000, Stored update 2500 of 5000 -2 * Loglike = 4358.390260 Actual update 2550 of 5000, Stored update 2550 of 5000 -2 * Loglike = 4377.761905 Actual update 2600 of 5000, Stored update 2600 of 5000 -2 * Loglike = 4352.394554 Actual update 2650 of 5000, Stored update 2650 of 5000 -2 * Loglike = 4392.179747 Actual update 2700 of 5000, Stored update 2700 of 5000 -2 * Loglike = 4363.393138 Actual update 2750 of 5000, Stored update 2750 of 5000 -2 * Loglike = 4362.253664 Actual update 2800 of 5000, Stored update 2800 of 5000 -2 * Loglike = 4345.975619 Actual update 2850 of 5000, Stored update 2850 of 5000 -2 * Loglike = 4375.408945 Actual update 2900 of 5000, Stored update 2900 of 5000 -2 * Loglike = 4358.572778 Actual update 2950 of 5000, Stored update 2950 of 5000 -2 * Loglike = 4361.389292 Actual update 3000 of 5000, Stored update 3000 of 5000 -2 * Loglike = 4376.451543 Actual update 3050 of 5000, Stored update 3050 of 5000 -2 * Loglike = 4346.493998 Actual update 3100 of 5000, Stored update 3100 of 5000 -2 * Loglike = 4400.700714 Actual update 3150 of 5000, Stored update 3150 of 5000 -2 * Loglike = 4353.231651 Actual update 3200 of 5000, Stored update 3200 of 5000 -2 * Loglike = 4363.286019 Actual update 3250 of 5000, Stored update 3250 of 5000 -2 * Loglike = 4349.400298 Actual update 3300 of 5000, Stored update 3300 of 5000 -2 * Loglike = 4363.270845 Actual update 3350 of 5000, Stored update 3350 of 5000 -2 * Loglike = 4357.705264 Actual update 3400 of 5000, Stored update 3400 of 5000 -2 * Loglike = 4353.928946 Actual update 3450 of 5000, Stored update 3450 of 5000 -2 * Loglike = 4348.936774 Actual update 3500 of 5000, Stored update 3500 of 5000 -2 * Loglike = 4379.806842 Actual update 3550 of 5000, Stored update 3550 of 5000 -2 * Loglike = 4356.074349 Actual update 3600 of 5000, Stored update 3600 of 5000 -2 * Loglike = 4350.968507 Actual update 3650 of 5000, Stored update 3650 of 5000 -2 * Loglike = 4386.255300 Actual update 3700 of 5000, Stored update 3700 of 5000 -2 * Loglike = 4365.735698 Actual update 3750 of 5000, Stored update 3750 of 5000 -2 * Loglike = 4348.370191 Actual update 3800 of 5000, Stored update 3800 of 5000 -2 * Loglike = 4329.723410 Actual update 3850 of 5000, Stored update 3850 of 5000 -2 * Loglike = 4349.741450 Actual update 3900 of 5000, Stored update 3900 of 5000 -2 * Loglike = 4366.893428 Actual update 3950 of 5000, Stored update 3950 of 5000 -2 * Loglike = 4344.015885 Actual update 4000 of 5000, Stored update 4000 of 5000 -2 * Loglike = 4343.608417 Actual update 4050 of 5000, Stored update 4050 of 5000 -2 * Loglike = 4364.151451 Actual update 4100 of 5000, Stored update 4100 of 5000 -2 * Loglike = 4399.139941 Actual update 4150 of 5000, Stored update 4150 of 5000 -2 * Loglike = 4349.551471 Actual update 4200 of 5000, Stored update 4200 of 5000 -2 * Loglike = 4328.721311 Actual update 4250 of 5000, Stored update 4250 of 5000 -2 * Loglike = 4361.622668 Actual update 4300 of 5000, Stored update 4300 of 5000 -2 * Loglike = 4356.540576 Actual update 4350 of 5000, Stored update 4350 of 5000 -2 * Loglike = 4335.365278 Actual update 4400 of 5000, Stored update 4400 of 5000 -2 * Loglike = 4340.297014 Actual update 4450 of 5000, Stored update 4450 of 5000 -2 * Loglike = 4400.047400 Actual update 4500 of 5000, Stored update 4500 of 5000 -2 * Loglike = 4353.356665 Actual update 4550 of 5000, Stored update 4550 of 5000 -2 * Loglike = 4332.255973 Actual update 4600 of 5000, Stored update 4600 of 5000 -2 * Loglike = 4347.520913 Actual update 4650 of 5000, Stored update 4650 of 5000 -2 * Loglike = 4355.347020 Actual update 4700 of 5000, Stored update 4700 of 5000 -2 * Loglike = 4353.616568 Actual update 4750 of 5000, Stored update 4750 of 5000 -2 * Loglike = 4347.652968 Actual update 4800 of 5000, Stored update 4800 of 5000 -2 * Loglike = 4350.048931 Actual update 4850 of 5000, Stored update 4850 of 5000 -2 * Loglike = 4366.647112 Actual update 4900 of 5000, Stored update 4900 of 5000 -2 * Loglike = 4342.502046 Actual update 4950 of 5000, Stored update 4950 of 5000 -2 * Loglike = 4352.769668 Actual update 5000 of 5000, Stored update 5000 of 5000 -2 * Loglike = 4348.562808 PUPN c1003 c1004 AVER c1091 b99 b100 Count = 5000 Average = 4355.0 S.D. = 17.136 S.E.M. = 0.24235 ECHO 0 Execution completed -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- MLwiN (version: 3.05) 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.12s 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 4355.004 4240.982 114.022 4469.025 --------------------------------------------------------------------------------------------------- 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.04037 0.02438 124.71 0 *** 2.99261 3.08745 488 age_40 0.01138 0.00092 12.35 4.878e-35 *** 0.00961 0.01316 4549 sexfemale -0.21693 0.01898 -11.43 3.001e-30 *** -0.25331 -0.17853 4789 parttimeParttime -0.40369 0.03241 -12.45 1.324e-35 *** -0.46996 -0.33961 4785 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.05857 0.00865 0.04374 0.07740 2325 --------------------------------------------------------------------------------------------------- The random part estimates at the id level: Coef. Std. Err. [95% Cred. Interval] ESS var_Intercept 0.24749 0.00644 0.23523 0.26017 4430 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- > > # 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 Setting up classifications as categorical variables - may take a while 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 for 50 iterations out of 500 -2 * Loglike = 4478.012076 Burning in for 100 iterations out of 500 -2 * Loglike = 4382.632010 Burning in for 150 iterations out of 500 -2 * Loglike = 4366.860385 Burning in for 200 iterations out of 500 -2 * Loglike = 4351.598460 Burning in for 250 iterations out of 500 -2 * Loglike = 4338.828373 Burning in for 300 iterations out of 500 -2 * Loglike = 4352.839227 Burning in for 350 iterations out of 500 -2 * Loglike = 4359.048843 Burning in for 400 iterations out of 500 -2 * Loglike = 4352.429404 Burning in for 450 iterations out of 500 -2 * Loglike = 4363.515613 Burning in for 500 iterations out of 500 -2 * Loglike = 4352.162730 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 = 4342.976803 Actual update 100 of 5000, Stored update 100 of 5000 -2 * Loglike = 4337.316786 Actual update 150 of 5000, Stored update 150 of 5000 -2 * Loglike = 4376.057085 Actual update 200 of 5000, Stored update 200 of 5000 -2 * Loglike = 4366.016315 Actual update 250 of 5000, Stored update 250 of 5000 -2 * Loglike = 4338.189181 Actual update 300 of 5000, Stored update 300 of 5000 -2 * Loglike = 4354.461170 Actual update 350 of 5000, Stored update 350 of 5000 -2 * Loglike = 4353.661142 Actual update 400 of 5000, Stored update 400 of 5000 -2 * Loglike = 4388.398865 Actual update 450 of 5000, Stored update 450 of 5000 -2 * Loglike = 4392.967388 Actual update 500 of 5000, Stored update 500 of 5000 -2 * Loglike = 4340.585503 Actual update 550 of 5000, Stored update 550 of 5000 -2 * Loglike = 4363.445511 Actual update 600 of 5000, Stored update 600 of 5000 -2 * Loglike = 4340.433099 Actual update 650 of 5000, Stored update 650 of 5000 -2 * Loglike = 4328.047090 Actual update 700 of 5000, Stored update 700 of 5000 -2 * Loglike = 4351.730438 Actual update 750 of 5000, Stored update 750 of 5000 -2 * Loglike = 4336.539726 Actual update 800 of 5000, Stored update 800 of 5000 -2 * Loglike = 4364.930372 Actual update 850 of 5000, Stored update 850 of 5000 -2 * Loglike = 4340.576829 Actual update 900 of 5000, Stored update 900 of 5000 -2 * Loglike = 4375.986832 Actual update 950 of 5000, Stored update 950 of 5000 -2 * Loglike = 4335.687991 Actual update 1000 of 5000, Stored update 1000 of 5000 -2 * Loglike = 4369.214065 Actual update 1050 of 5000, Stored update 1050 of 5000 -2 * Loglike = 4375.104779 Actual update 1100 of 5000, Stored update 1100 of 5000 -2 * Loglike = 4354.429719 Actual update 1150 of 5000, Stored update 1150 of 5000 -2 * Loglike = 4357.271978 Actual update 1200 of 5000, Stored update 1200 of 5000 -2 * Loglike = 4357.302829 Actual update 1250 of 5000, Stored update 1250 of 5000 -2 * Loglike = 4372.461456 Actual update 1300 of 5000, Stored update 1300 of 5000 -2 * Loglike = 4378.652724 Actual update 1350 of 5000, Stored update 1350 of 5000 -2 * Loglike = 4341.135254 Actual update 1400 of 5000, Stored update 1400 of 5000 -2 * Loglike = 4379.466132 Actual update 1450 of 5000, Stored update 1450 of 5000 -2 * Loglike = 4378.287127 Actual update 1500 of 5000, Stored update 1500 of 5000 -2 * Loglike = 4352.464572 Actual update 1550 of 5000, Stored update 1550 of 5000 -2 * Loglike = 4368.615552 Actual update 1600 of 5000, Stored update 1600 of 5000 -2 * Loglike = 4370.738666 Actual update 1650 of 5000, Stored update 1650 of 5000 -2 * Loglike = 4328.089086 Actual update 1700 of 5000, Stored update 1700 of 5000 -2 * Loglike = 4339.488492 Actual update 1750 of 5000, Stored update 1750 of 5000 -2 * Loglike = 4360.020270 Actual update 1800 of 5000, Stored update 1800 of 5000 -2 * Loglike = 4368.913734 Actual update 1850 of 5000, Stored update 1850 of 5000 -2 * Loglike = 4352.489492 Actual update 1900 of 5000, Stored update 1900 of 5000 -2 * Loglike = 4365.472507 Actual update 1950 of 5000, Stored update 1950 of 5000 -2 * Loglike = 4360.772656 Actual update 2000 of 5000, Stored update 2000 of 5000 -2 * Loglike = 4350.611560 Actual update 2050 of 5000, Stored update 2050 of 5000 -2 * Loglike = 4338.055154 Actual update 2100 of 5000, Stored update 2100 of 5000 -2 * Loglike = 4339.959115 Actual update 2150 of 5000, Stored update 2150 of 5000 -2 * Loglike = 4392.197093 Actual update 2200 of 5000, Stored update 2200 of 5000 -2 * Loglike = 4335.398495 Actual update 2250 of 5000, Stored update 2250 of 5000 -2 * Loglike = 4361.906652 Actual update 2300 of 5000, Stored update 2300 of 5000 -2 * Loglike = 4346.931133 Actual update 2350 of 5000, Stored update 2350 of 5000 -2 * Loglike = 4355.024114 Actual update 2400 of 5000, Stored update 2400 of 5000 -2 * Loglike = 4359.088760 Actual update 2450 of 5000, Stored update 2450 of 5000 -2 * Loglike = 4320.723259 Actual update 2500 of 5000, Stored update 2500 of 5000 -2 * Loglike = 4364.447783 Actual update 2550 of 5000, Stored update 2550 of 5000 -2 * Loglike = 4334.869349 Actual update 2600 of 5000, Stored update 2600 of 5000 -2 * Loglike = 4380.739035 Actual update 2650 of 5000, Stored update 2650 of 5000 -2 * Loglike = 4349.037513 Actual update 2700 of 5000, Stored update 2700 of 5000 -2 * Loglike = 4313.866807 Actual update 2750 of 5000, Stored update 2750 of 5000 -2 * Loglike = 4417.676208 Actual update 2800 of 5000, Stored update 2800 of 5000 -2 * Loglike = 4360.504490 Actual update 2850 of 5000, Stored update 2850 of 5000 -2 * Loglike = 4366.668390 Actual update 2900 of 5000, Stored update 2900 of 5000 -2 * Loglike = 4334.414024 Actual update 2950 of 5000, Stored update 2950 of 5000 -2 * Loglike = 4391.617563 Actual update 3000 of 5000, Stored update 3000 of 5000 -2 * Loglike = 4344.577780 Actual update 3050 of 5000, Stored update 3050 of 5000 -2 * Loglike = 4360.056382 Actual update 3100 of 5000, Stored update 3100 of 5000 -2 * Loglike = 4343.332116 Actual update 3150 of 5000, Stored update 3150 of 5000 -2 * Loglike = 4360.919048 Actual update 3200 of 5000, Stored update 3200 of 5000 -2 * Loglike = 4392.814223 Actual update 3250 of 5000, Stored update 3250 of 5000 -2 * Loglike = 4362.468148 Actual update 3300 of 5000, Stored update 3300 of 5000 -2 * Loglike = 4322.581662 Actual update 3350 of 5000, Stored update 3350 of 5000 -2 * Loglike = 4348.635551 Actual update 3400 of 5000, Stored update 3400 of 5000 -2 * Loglike = 4349.718987 Actual update 3450 of 5000, Stored update 3450 of 5000 -2 * Loglike = 4352.928906 Actual update 3500 of 5000, Stored update 3500 of 5000 -2 * Loglike = 4365.883303 Actual update 3550 of 5000, Stored update 3550 of 5000 -2 * Loglike = 4376.935834 Actual update 3600 of 5000, Stored update 3600 of 5000 -2 * Loglike = 4367.119213 Actual update 3650 of 5000, Stored update 3650 of 5000 -2 * Loglike = 4377.713651 Actual update 3700 of 5000, Stored update 3700 of 5000 -2 * Loglike = 4379.368059 Actual update 3750 of 5000, Stored update 3750 of 5000 -2 * Loglike = 4333.625716 Actual update 3800 of 5000, Stored update 3800 of 5000 -2 * Loglike = 4362.260148 Actual update 3850 of 5000, Stored update 3850 of 5000 -2 * Loglike = 4375.211140 Actual update 3900 of 5000, Stored update 3900 of 5000 -2 * Loglike = 4323.899947 Actual update 3950 of 5000, Stored update 3950 of 5000 -2 * Loglike = 4411.338851 Actual update 4000 of 5000, Stored update 4000 of 5000 -2 * Loglike = 4383.631021 Actual update 4050 of 5000, Stored update 4050 of 5000 -2 * Loglike = 4370.374789 Actual update 4100 of 5000, Stored update 4100 of 5000 -2 * Loglike = 4343.644290 Actual update 4150 of 5000, Stored update 4150 of 5000 -2 * Loglike = 4336.379150 Actual update 4200 of 5000, Stored update 4200 of 5000 -2 * Loglike = 4337.110399 Actual update 4250 of 5000, Stored update 4250 of 5000 -2 * Loglike = 4336.340023 Actual update 4300 of 5000, Stored update 4300 of 5000 -2 * Loglike = 4350.488254 Actual update 4350 of 5000, Stored update 4350 of 5000 -2 * Loglike = 4406.891619 Actual update 4400 of 5000, Stored update 4400 of 5000 -2 * Loglike = 4347.308632 Actual update 4450 of 5000, Stored update 4450 of 5000 -2 * Loglike = 4351.362175 Actual update 4500 of 5000, Stored update 4500 of 5000 -2 * Loglike = 4365.195176 Actual update 4550 of 5000, Stored update 4550 of 5000 -2 * Loglike = 4356.226563 Actual update 4600 of 5000, Stored update 4600 of 5000 -2 * Loglike = 4335.913715 Actual update 4650 of 5000, Stored update 4650 of 5000 -2 * Loglike = 4371.227840 Actual update 4700 of 5000, Stored update 4700 of 5000 -2 * Loglike = 4357.068422 Actual update 4750 of 5000, Stored update 4750 of 5000 -2 * Loglike = 4354.550808 Actual update 4800 of 5000, Stored update 4800 of 5000 -2 * Loglike = 4333.470913 Actual update 4850 of 5000, Stored update 4850 of 5000 -2 * Loglike = 4342.971973 Actual update 4900 of 5000, Stored update 4900 of 5000 -2 * Loglike = 4348.587336 Actual update 4950 of 5000, Stored update 4950 of 5000 -2 * Loglike = 4366.010561 Actual update 5000 of 5000, Stored update 5000 of 5000 -2 * Loglike = 4337.180291 PUPN c1003 c1004 AVER c1091 b99 b100 Count = 5000 Average = 4356.8 S.D. = 17.282 S.E.M. = 0.24441 ECHO 0 Execution completed -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- MLwiN (version: 3.05) 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.07s 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.841 4249.252 107.589 4464.430 --------------------------------------------------------------------------------------------------- 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.02750 0.02237 135.32 0 *** 2.98493 3.07176 619 age_40 0.01138 0.00093 12.18 3.752e-34 *** 0.00957 0.01325 4716 sexfemale -0.21762 0.01888 -11.53 9.691e-31 *** -0.25589 -0.18127 5000 parttimeParttime -0.41127 0.03228 -12.74 3.457e-37 *** -0.47419 -0.34807 5000 companyno54 0.75708 0.18852 4.02 5.923e-05 *** 0.38786 1.12948 528 companyno67 0.86967 0.20957 4.15 3.33e-05 *** 0.46352 1.30088 488 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.04439 0.00717 0.03221 0.06033 1919 --------------------------------------------------------------------------------------------------- The random part estimates at the id level: Coef. Std. Err. [95% Cred. Interval] ESS var_Intercept 0.24762 0.00658 0.23501 0.26091 4467 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- > > # 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("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 Setting up classifications as categorical variables - may take a while 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 for 50 iterations out of 500 -2 * Loglike = 4478.012076 Burning in for 100 iterations out of 500 -2 * Loglike = 4382.632010 Burning in for 150 iterations out of 500 -2 * Loglike = 4366.860385 Burning in for 200 iterations out of 500 -2 * Loglike = 4351.598460 Burning in for 250 iterations out of 500 -2 * Loglike = 4338.828373 Burning in for 300 iterations out of 500 -2 * Loglike = 4352.839227 Burning in for 350 iterations out of 500 -2 * Loglike = 4359.048843 Burning in for 400 iterations out of 500 -2 * Loglike = 4352.429404 Burning in for 450 iterations out of 500 -2 * Loglike = 4363.515613 Burning in for 500 iterations out of 500 -2 * Loglike = 4352.162730 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 = 4342.976803 Actual update 100 of 5000, Stored update 100 of 5000 -2 * Loglike = 4337.316786 Actual update 150 of 5000, Stored update 150 of 5000 -2 * Loglike = 4376.057085 Actual update 200 of 5000, Stored update 200 of 5000 -2 * Loglike = 4366.016315 Actual update 250 of 5000, Stored update 250 of 5000 -2 * Loglike = 4338.189181 Actual update 300 of 5000, Stored update 300 of 5000 -2 * Loglike = 4354.461170 Actual update 350 of 5000, Stored update 350 of 5000 -2 * Loglike = 4353.661142 Actual update 400 of 5000, Stored update 400 of 5000 -2 * Loglike = 4388.398865 Actual update 450 of 5000, Stored update 450 of 5000 -2 * Loglike = 4392.967388 Actual update 500 of 5000, Stored update 500 of 5000 -2 * Loglike = 4340.585503 Actual update 550 of 5000, Stored update 550 of 5000 -2 * Loglike = 4363.445511 Actual update 600 of 5000, Stored update 600 of 5000 -2 * Loglike = 4340.433099 Actual update 650 of 5000, Stored update 650 of 5000 -2 * Loglike = 4328.047090 Actual update 700 of 5000, Stored update 700 of 5000 -2 * Loglike = 4351.730438 Actual update 750 of 5000, Stored update 750 of 5000 -2 * Loglike = 4336.539726 Actual update 800 of 5000, Stored update 800 of 5000 -2 * Loglike = 4364.930372 Actual update 850 of 5000, Stored update 850 of 5000 -2 * Loglike = 4340.576829 Actual update 900 of 5000, Stored update 900 of 5000 -2 * Loglike = 4375.986832 Actual update 950 of 5000, Stored update 950 of 5000 -2 * Loglike = 4335.687991 Actual update 1000 of 5000, Stored update 1000 of 5000 -2 * Loglike = 4369.214065 Actual update 1050 of 5000, Stored update 1050 of 5000 -2 * Loglike = 4375.104779 Actual update 1100 of 5000, Stored update 1100 of 5000 -2 * Loglike = 4354.429719 Actual update 1150 of 5000, Stored update 1150 of 5000 -2 * Loglike = 4357.271978 Actual update 1200 of 5000, Stored update 1200 of 5000 -2 * Loglike = 4357.302829 Actual update 1250 of 5000, Stored update 1250 of 5000 -2 * Loglike = 4372.461456 Actual update 1300 of 5000, Stored update 1300 of 5000 -2 * Loglike = 4378.652724 Actual update 1350 of 5000, Stored update 1350 of 5000 -2 * Loglike = 4341.135254 Actual update 1400 of 5000, Stored update 1400 of 5000 -2 * Loglike = 4379.466132 Actual update 1450 of 5000, Stored update 1450 of 5000 -2 * Loglike = 4378.287127 Actual update 1500 of 5000, Stored update 1500 of 5000 -2 * Loglike = 4352.464572 Actual update 1550 of 5000, Stored update 1550 of 5000 -2 * Loglike = 4368.615552 Actual update 1600 of 5000, Stored update 1600 of 5000 -2 * Loglike = 4370.738666 Actual update 1650 of 5000, Stored update 1650 of 5000 -2 * Loglike = 4328.089086 Actual update 1700 of 5000, Stored update 1700 of 5000 -2 * Loglike = 4339.488492 Actual update 1750 of 5000, Stored update 1750 of 5000 -2 * Loglike = 4360.020270 Actual update 1800 of 5000, Stored update 1800 of 5000 -2 * Loglike = 4368.913734 Actual update 1850 of 5000, Stored update 1850 of 5000 -2 * Loglike = 4352.489492 Actual update 1900 of 5000, Stored update 1900 of 5000 -2 * Loglike = 4365.472507 Actual update 1950 of 5000, Stored update 1950 of 5000 -2 * Loglike = 4360.772656 Actual update 2000 of 5000, Stored update 2000 of 5000 -2 * Loglike = 4350.611560 Actual update 2050 of 5000, Stored update 2050 of 5000 -2 * Loglike = 4338.055154 Actual update 2100 of 5000, Stored update 2100 of 5000 -2 * Loglike = 4339.959115 Actual update 2150 of 5000, Stored update 2150 of 5000 -2 * Loglike = 4392.197093 Actual update 2200 of 5000, Stored update 2200 of 5000 -2 * Loglike = 4335.398495 Actual update 2250 of 5000, Stored update 2250 of 5000 -2 * Loglike = 4361.906652 Actual update 2300 of 5000, Stored update 2300 of 5000 -2 * Loglike = 4346.931133 Actual update 2350 of 5000, Stored update 2350 of 5000 -2 * Loglike = 4355.024114 Actual update 2400 of 5000, Stored update 2400 of 5000 -2 * Loglike = 4359.088760 Actual update 2450 of 5000, Stored update 2450 of 5000 -2 * Loglike = 4320.723259 Actual update 2500 of 5000, Stored update 2500 of 5000 -2 * Loglike = 4364.447783 Actual update 2550 of 5000, Stored update 2550 of 5000 -2 * Loglike = 4334.869349 Actual update 2600 of 5000, Stored update 2600 of 5000 -2 * Loglike = 4380.739035 Actual update 2650 of 5000, Stored update 2650 of 5000 -2 * Loglike = 4349.037513 Actual update 2700 of 5000, Stored update 2700 of 5000 -2 * Loglike = 4313.866807 Actual update 2750 of 5000, Stored update 2750 of 5000 -2 * Loglike = 4417.676208 Actual update 2800 of 5000, Stored update 2800 of 5000 -2 * Loglike = 4360.504490 Actual update 2850 of 5000, Stored update 2850 of 5000 -2 * Loglike = 4366.668390 Actual update 2900 of 5000, Stored update 2900 of 5000 -2 * Loglike = 4334.414024 Actual update 2950 of 5000, Stored update 2950 of 5000 -2 * Loglike = 4391.617563 Actual update 3000 of 5000, Stored update 3000 of 5000 -2 * Loglike = 4344.577780 Actual update 3050 of 5000, Stored update 3050 of 5000 -2 * Loglike = 4360.056382 Actual update 3100 of 5000, Stored update 3100 of 5000 -2 * Loglike = 4343.332116 Actual update 3150 of 5000, Stored update 3150 of 5000 -2 * Loglike = 4360.919048 Actual update 3200 of 5000, Stored update 3200 of 5000 -2 * Loglike = 4392.814223 Actual update 3250 of 5000, Stored update 3250 of 5000 -2 * Loglike = 4362.468148 Actual update 3300 of 5000, Stored update 3300 of 5000 -2 * Loglike = 4322.581662 Actual update 3350 of 5000, Stored update 3350 of 5000 -2 * Loglike = 4348.635551 Actual update 3400 of 5000, Stored update 3400 of 5000 -2 * Loglike = 4349.718987 Actual update 3450 of 5000, Stored update 3450 of 5000 -2 * Loglike = 4352.928906 Actual update 3500 of 5000, Stored update 3500 of 5000 -2 * Loglike = 4365.883303 Actual update 3550 of 5000, Stored update 3550 of 5000 -2 * Loglike = 4376.935834 Actual update 3600 of 5000, Stored update 3600 of 5000 -2 * Loglike = 4367.119213 Actual update 3650 of 5000, Stored update 3650 of 5000 -2 * Loglike = 4377.713651 Actual update 3700 of 5000, Stored update 3700 of 5000 -2 * Loglike = 4379.368059 Actual update 3750 of 5000, Stored update 3750 of 5000 -2 * Loglike = 4333.625716 Actual update 3800 of 5000, Stored update 3800 of 5000 -2 * Loglike = 4362.260148 Actual update 3850 of 5000, Stored update 3850 of 5000 -2 * Loglike = 4375.211140 Actual update 3900 of 5000, Stored update 3900 of 5000 -2 * Loglike = 4323.899947 Actual update 3950 of 5000, Stored update 3950 of 5000 -2 * Loglike = 4411.338851 Actual update 4000 of 5000, Stored update 4000 of 5000 -2 * Loglike = 4383.631021 Actual update 4050 of 5000, Stored update 4050 of 5000 -2 * Loglike = 4370.374789 Actual update 4100 of 5000, Stored update 4100 of 5000 -2 * Loglike = 4343.644290 Actual update 4150 of 5000, Stored update 4150 of 5000 -2 * Loglike = 4336.379150 Actual update 4200 of 5000, Stored update 4200 of 5000 -2 * Loglike = 4337.110399 Actual update 4250 of 5000, Stored update 4250 of 5000 -2 * Loglike = 4336.340023 Actual update 4300 of 5000, Stored update 4300 of 5000 -2 * Loglike = 4350.488254 Actual update 4350 of 5000, Stored update 4350 of 5000 -2 * Loglike = 4406.891619 Actual update 4400 of 5000, Stored update 4400 of 5000 -2 * Loglike = 4347.308632 Actual update 4450 of 5000, Stored update 4450 of 5000 -2 * Loglike = 4351.362175 Actual update 4500 of 5000, Stored update 4500 of 5000 -2 * Loglike = 4365.195176 Actual update 4550 of 5000, Stored update 4550 of 5000 -2 * Loglike = 4356.226563 Actual update 4600 of 5000, Stored update 4600 of 5000 -2 * Loglike = 4335.913715 Actual update 4650 of 5000, Stored update 4650 of 5000 -2 * Loglike = 4371.227840 Actual update 4700 of 5000, Stored update 4700 of 5000 -2 * Loglike = 4357.068422 Actual update 4750 of 5000, Stored update 4750 of 5000 -2 * Loglike = 4354.550808 Actual update 4800 of 5000, Stored update 4800 of 5000 -2 * Loglike = 4333.470913 Actual update 4850 of 5000, Stored update 4850 of 5000 -2 * Loglike = 4342.971973 Actual update 4900 of 5000, Stored update 4900 of 5000 -2 * Loglike = 4348.587336 Actual update 4950 of 5000, Stored update 4950 of 5000 -2 * Loglike = 4366.010561 Actual update 5000 of 5000, Stored update 5000 of 5000 -2 * Loglike = 4337.180291 PUPN c1003 c1004 AVER c1091 b99 b100 Count = 5000 Average = 4356.8 S.D. = 17.282 S.E.M. = 0.24441 ECHO 0 Execution completed -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- MLwiN (version: 3.05) 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.07s 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.841 4249.252 107.589 4464.430 --------------------------------------------------------------------------------------------------- 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.02750 0.02237 135.32 0 *** 2.98493 3.07176 619 age_40 0.01138 0.00093 12.18 3.752e-34 *** 0.00957 0.01325 4716 sexfemale -0.21762 0.01888 -11.53 9.691e-31 *** -0.25589 -0.18127 5000 parttimeParttime -0.41127 0.03228 -12.74 3.457e-37 *** -0.47419 -0.34807 5000 companyno54 0.75708 0.18852 4.02 5.923e-05 *** 0.38786 1.12948 528 companyno67 0.86967 0.20957 4.15 3.33e-05 *** 0.46352 1.30088 488 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.04439 0.00717 0.03221 0.06033 1919 --------------------------------------------------------------------------------------------------- The random part estimates at the id level: Coef. Std. Err. [95% Cred. Interval] ESS var_Intercept 0.24762 0.00658 0.23501 0.26091 4467 -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*- > > # 16.7 Multiple membership multiple classification (MMMC) models . . . . 244 > > # Chapter learning outcomes . . . . . . . . . . . . . . . . . . . . . . .128 > > > > > > ############################################################################ > > proc.time() user system elapsed 15.10 1.06 26.78