syntax necessary to constrain a random parameter to zero

Welcome to the forum for R2MLwiN users. Feel free to post your question about R2MLwiN 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 R2MLwiN: Running MLwiN from within R >> http://www.bris.ac.uk/cmm/software/r2mlwin/
Post Reply
rgcarson
Posts: 1
Joined: Thu Jun 25, 2020 7:18 pm

syntax necessary to constrain a random parameter to zero

Post by rgcarson »

Hi,
I am a very new user of R2MLwiN seeking to replicate an analysis model described in Blance et al. (2005, page 558)
https://journals.sagepub.com/doi/pdf/10 ... 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.
Richard
Attachments
0962280205sm418oa.pdf
Blance et al. (2005)
(305.47 KiB) Downloaded 12 times

ChrisCharlton
Posts: 1182
Joined: Mon Oct 19, 2009 10:34 am

Re: syntax necessary to constrain a random parameter to zero

Post 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 (https://www.bristol.ac.uk/cmm/media/r2m ... rGuide07.R) and chapter 9 of the MCMC guide (http://www.bristol.ac.uk/cmm/media/r2ml ... CGuide09.R).

Post Reply