Page 1 of 1

syntax necessary to constrain a random parameter to zero

Posted: Thu Jun 25, 2020 8:15 pm
by rgcarson
I am a very new user of R2MLwiN seeking to replicate an analysis model described in Blance et al. (2005, page 558) ... j92HfejdAw
(and attached).

The data consist of a single outcome variable (e.g. PPD) measured on two occasions (occ0 and occ1) in n patients.
The measurement occasion is dummy coded (e.g. -0.05 and +0.05).

The model comprises both random slopes and random intercepts.
The problem I have encountered is in specifying the model in such a manner that one of the four random parameters (i.e. σ2e0) is constrained to be zero.

Having corresponded with Dr. Blance I gather that the necessary constraint is straightforward to implement in MLwiN model code, and even easier for a single model when using the MLwiN user interface.

As in my application the model will be imbedded in an R script that processes a large number of data sets (on OSX and Linux platforms), MLwiN is not a viable option.

Using R2MLwiN I have been able to run basic random intercept and random slope models – for data with more than two levels of measurement occasion. In spite of combing through the documentation however, I am struggling to identify the appropriate R syntax to use in specifying this constraint (necessary when there are only two levels of occasion).

Any help would be much appreciated.

Re: syntax necessary to constrain a random parameter to zero

Posted: Mon Jun 29, 2020 10:10 am
by ChrisCharlton
If you were using the MLwiN GUI you could constrain the parameter value to zero by removing the term from the model (clicking it in the equations window and choosing "Yes" to the remove from model question). The equivalent of this in R2MLwiN is to use the clre option, you can find examples of this in the replication materials for chapter 7 of the User Guide ( ... rGuide07.R) and chapter 9 of the MCMC guide ( ... CGuide09.R).