[R] Translating NLMIXED in nlme

From: giovanni parrinello <gpbaitelli46_at_gmail.com>
Date: Mon, 07 Apr 2008 18:14:28 +0200


Dear All,
reading an article by Rodolphe Thiebaut and Helene Jacqmin-Gadda ("Mixed models for longitudinal
left-censored repeated measures") I have found this program in SAS

proc nlmixed data=TEST QTOL=1E-6;
parms sigsq1=0.44 ro=0.09 sigsq2=0.07 sigsqe=0.18 alpha=3.08 beta=0.43; bounds $B!](B1< ro < 1, sigsq1 sigsq2 sigsqe >= 0; pi=2*arsin(1);
mu=alpha+beta*TIME+a i+b i*TIME;
if OBS=1 then ll=(1/(sqrt(2*pi*sigsqe)))*exp(-(RESPONSE-mu)**2/(2*sigsqe)); if OBS=0 then ll=probnorm((RESPONSE-mu)/sqrt(sigsqe)); L=log(ll);
.......

I haven't found a simple solution for the conditional LL: if OBS=1 then ll=(1/(sqrt(2*pi*sigsqe)))*exp(-(RESPONSE-mu)**2/(2*sigsqe)); if OBS=0 then ll=probnorm((RESPONSE-mu)/sqrt(sigsqe)); using nlme.

Any suggestion will be appreciated.

Giovanni

 sessionInfo()
R version 2.6.2 (2008-02-08)
i386-pc-mingw32

locale:
LC_COLLATE=Italian_Italy.1252;LC_CTYPE=Italian_Italy.1252;LC_MONETARY=Italian_Italy.1252;LC_NUMERIC=C;LC_TIME=Italian_Italy.1252

attached base packages:
[1] splines tools stats graphics grDevices utils datasets
methods base

other attached packages:
[1] JM_0.1-0 MASS_7.2-41 Design_2.1-1 survival_2.34-1
nlme_3.1-88
[6] Hmisc_3.4-3

loaded via a namespace (and not attached):
[1] cluster_1.11.10 grid_2.6.2 lattice_0.17-6

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 07 Apr 2008 - 16:17:23 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 07 Apr 2008 - 17:30:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive