[R-sig-ME] novel correlation structure for nlme package, lme function
th|erry@onke||nx @end|ng |rom |nbo@be
Thu Jul 16 20:53:10 CEST 2020
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.
ir. Thierry Onkelinx
Statisticus / Statistician
Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND
Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
thierry.onkelinx using inbo.be
Havenlaan 88 bus 73, 1000 Brussel
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
Op do 16 jul. 2020 om 20:35 schreef Edland, Steven <sedland using health.ucsd.edu
> Hello my programmer friends. I am wondering if anyone has written a
> corStruct for this lme call:
> lme(y~time*group, random= ~time|id)
> In this call, the covariance structure implied by (time|id) is assumed
> constant across groups. We would like to model these random effects
> separately in the two groups.
> Motivation: In a clinical trail with an _effective_ treatment, response
> to treatment will be variable (variance of the random slopes will be
> greater in the treatment arm).
> Thank you in advance for any thoughts where I might find such a corStruct.
> Steve Edland & Yu Zhao
> Steve Edland
> Steven D. Edland, Ph.D.
> Dept. of Family Medicine & Public Health
> Dept. of Neurosciences
> University of California, San Diego
> 9500 Gilman Dr. M/C 0948
> La Jolla, CA 92093-0948
> [[alternative HTML version deleted]]
> R-sig-mixed-models using r-project.org mailing list
[[alternative HTML version deleted]]
More information about the R-sig-mixed-models