Residuals command for multivariate

Welcome to the forum for runmlwin users. Feel free to post your question about runmlwin here. The Centre for Multilevel Modelling take no responsibility for the accuracy of these posts, we are unable to monitor them closely. Do go ahead and post your question and thank you in advance if you find the time to post any answers!

Go to runmlwin: Running MLwiN from within Stata >> http://www.bristol.ac.uk/cmm/software/runmlwin/
Post Reply
francescomolteni
Posts: 7
Joined: Mon Oct 19, 2015 3:11 pm

Residuals command for multivariate

Post by francescomolteni »

hi all,
someone can please give an example of sintax for asking residuals in multivariate multilevel models? The command residuals(u) seems not working..

here my sintax...

runmlwin ///
(Practice cons, equation(1)) ///
(BeliefGHH cons, equation(2)) ///
(Definition cons, equation(3)) ///
, ///
level2(S003: (cons, residuals(u) eq(1)) (cons, residuals(e) eq(2)) (cons, residuals(i) eq(3)) ) ///
level1(id: (cons, eq(1)) (cons, eq(2)) (cons, eq(3)) ) ///
discrete(distribution(binomial binomial binomial) link(logit) denominator(cons cons cons) pql1 ) ///
mlwinsettings(size(200000) optimat) rigls ///


and asking for

qnorm u0 if pickone_S003==1, aspectratio(1)

gives me

variable u0 not found

...seems no residuals are stored


thanks in advance!
ChrisCharlton
Posts: 1384
Joined: Mon Oct 19, 2009 10:34 am

Re: Residuals command for multivariate

Post by ChrisCharlton »

There is an example of this in section 14.4 in the replication materials for the MLwiN User Manuals (http://www.bristol.ac.uk/cmm/software/r ... /examples/).
In your case I think that you would need to update your command as follows:

Code: Select all

runmlwin ///
(Practice cons, equation(1)) ///
(BeliefGHH cons, equation(2)) ///
(Definition cons, equation(3)) ///
, ///
level2(S003: (cons, eq(1)) (cons, eq(2)) (cons, eq(3)), residuals(u) ) ///
level1(id: (cons, eq(1)) (cons, eq(2)) (cons, eq(3)) ) ///
discrete(distribution(binomial binomial binomial) link(logit) denominator(cons cons cons) pql1 ) ///
mlwinsettings(size(200000) optimat) rigls ///
Post Reply