Skip to content
Prev 18621 / 20628 Next

novel correlation structure for nlme package, lme function

Dear Steve,

I'd create two variables
time_treatment <- ifelse(group == "treatment", time, 0)
time_placebo <- ifelse(group != "treatment", time, 0)

And then use ~ time_treatment + time_placebo | id as random effect.

This should give you the two random slope, each with it own variance.

Best regards,

ir. Thierry Onkelinx
Statisticus / Statistician

Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND
FOREST
Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
thierry.onkelinx at inbo.be
Havenlaan 88 bus 73, 1000 Brussel
www.inbo.be

///////////////////////////////////////////////////////////////////////////////////////////
To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to say
what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey
///////////////////////////////////////////////////////////////////////////////////////////

<https://www.inbo.be>


Op do 16 jul. 2020 om 20:35 schreef Edland, Steven <sedland at health.ucsd.edu

  
  
Message-ID: <CAJuCY5y5PuOPCYHCv7-vrsHX+F0+m17BobjzSFJSWZ=7jK26vA@mail.gmail.com>
In-Reply-To: <BYAPR19MB24705E70926087A1554A571DE67F0@BYAPR19MB2470.namprd19.prod.outlook.com>