empisoz posted on Tuesday, June 02, 2020 - 9:04 am
Dear all, I am wondering how to model the residual within-group variance of a twolevel model usign within-group covariates. The between-group part is readily available from ex9.28 (the random residual variance). However, it is not clear to me how to model the within-group part per se. I think one would need (a) to transform the residual within-group variance using the log of the within-grouup residual variance and then (b) to relate this tranformed residual variance to the covariates of interest. (a) might be done using model constraint - but such a quantity can't be used in the %within%-part of the model...any suggestions for code?
You can use the Constraint=x option in the Variable command to provide a variable that can be used in Model Constraint to model the variance using e.g. resvar = exp(a+b*x), where a and b are New parameters and resvar is a parameter labe given in the Model command. We show how to do this in our RMA book.
empisoz posted on Wednesday, June 03, 2020 - 12:22 pm
thanks a lot, however, it seems that the constraint = X option is not available for TYPE = TWOLEVEL:
*** ERROR in VARIABLE command Specific constraints for MODEL CONSTRAINT may not be used with TYPE=TWOLEVEL.
First note that there is a substantial difference between modeling random residual variance on the between level and doing the same on the within level. For the between level you have multiple observations (i.e. actual sample cluster specific variance can be computed and can be modeled). On the within level you have just one observation that you want to have a subject specific variance. There is no sample quantity that can be computed from just one observation that can then be modeled. Thus - this is much more advanced modeling technique, usually also requiring a large sample.
Hi. Bengt mentions that "We show how to do this in our RMA book." unfortunately, I cannot figure where in the book this topic is discussed. can you give me a page number or the title/number of the chapter?