Page 1 of 1

Residuals command for multivariate

Posted: Mon Feb 08, 2016 4:48 pm
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!

Re: Residuals command for multivariate

Posted: Mon Feb 08, 2016 5:04 pm
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 ///