[R-sig-ME] pcmid of OSWALD in R

Dimitris Rizopoulos d.rizopoulos at erasmusmc.nl
Mon Mar 14 08:28:56 CET 2011

On 3/13/2011 11:27 PM, David Duffy wrote:
> On Sun, 13 Mar 2011, rajibul islam wrote:
>> I am just wondering about any functions available in R that can work
>> like pcmid
>> of OSWALD in S-plus. I tried to find but I didn't find any package
>> like that. I
>> need to work with MNAR (Missing not at random) pattern of missing
>> data. Any
>> related idea would be highly appreciable. Thank you.
> Hi.
> pcmid seems to use the Diggle and Kenward (1994) model, and I don't
> think this exact model is any R packages. There are a number of
> alternative approaches implemented in R, check the Social Sciences
> Taskview, and there are also the drm and experiment packages, which
> apparently deal with informative missingness for longitudinal experiments.

you may also have a look at the JM package that deals with MNAR missing 
data mechanisms under the Shared Parameter Models framework. For more 
info check:

* http://cran.r-project.org/package=JM
* http://www.jstatsoft.org/v35/i09/
* http://rwiki.sciviews.org/doku.php?id=packages:cran:jm


> Finally, if no alternatives are available, you can get pcmid() running
> in R, if not the whole Oswald package. This may require a bit of
> fiddling, and expertise in R.
> a) compile Oswald/Routines/dropout/inform.f using R CMD COMPILE inform.f.
> This is the only external code that mlid needs. This bit works ;)
> If you then read the document Oswald/Routines/dropout/dropout.ps and
> Oswald/Doc/Oswald.ps, you can probably write your own pcmid routine for
> your particular problem. Otherwise...
> b) in the Oswald directory, copy oswald.q to oswald.R. You then need to
> fix things that work in S, but not in R. The authors have their own type
> of data frame for longitudinal data: ldframe. The first hurdle (I
> haven't gone any further) is that the R rle() only accepts atomic
> vectors, but as.ldframe() gives rle() a factor. So we would change
> rl <- rle(obj$Subject) to
> rl <- rle(as.integer(obj$Subject)) and so on, load("oswald.R") ; run one
> of the examples; debug() to find incompatibilities. I suspect this won't
> take too long.
> Cheers, David Duffy.

Dimitris Rizopoulos
Assistant Professor
Department of Biostatistics
Erasmus University Medical Center

Address: PO Box 2040, 3000 CA Rotterdam, the Netherlands
Tel: +31/(0)10/7043478
Fax: +31/(0)10/7043014
Web: http://www.erasmusmc.nl/biostatistiek/

More information about the R-sig-mixed-models mailing list