Description Usage Format Examples
This example is an artificial data.
1 |
A data frame with 390 observations on the following 4 variables.
Subject
identifies de number of the individual profile. This vector contains observations of 30 individual profiles.
Treatment
a factor with levels 0
and 1
.
Time
a numeric vector that identifies the number of the time points observed.
z
a numeric vector representing the response variable.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | data(datacold)
mod0<- cold(z~Time*Treatment, data=datacold, time="Time",
id="Subject", dependence="ind")
summary (mod0)
modI<- cold(z~Time*Treatment, data=datacold, time="Time",
id="Subject", dependence="AR1")
summary (modI)
anova(mod0,modI)
plot(modI,which=1,factor=Treatment,xlab="Time (weeks)",
ylab="Count", main="Model AR1")
### independent with random intercept
mod0R <- cold(z ~ Time * Treatment, random = ~ 1, data = datacold,
time = "Time", id = "Subject", dependence = "indR")
summary(mod0R)
### independent with random intercept (dependence="indR")
### using cubature (integration = "cubature")
mod0R.C <- cold(z ~ Time * Treatment, random = ~ 1, data = datacold,
time = "Time", id = "Subject", dependence = "indR", integration = "cubature")
summary(mod0R.C)
randeff(mod0R.C)
### dependence="indR2"
## It takes a long time to run
## Using Monte Carlo method (integration = "MC")
mod0R2MC <- cold(z ~ Time * Treatment, ~ 1 + Time, datacold, time = "Time",
id = "Subject", dependence = "indR2", integration = "MC")
summary (mod0R2MC)
randeff(mod0R2MC)
## Using cubature (integration = "cubature")
mod0R2C<-cold(z ~ Time * Treatment, random = ~ 1 + Time, data = datacold,
time = "Time", id = "Subject", dependence = "indR2", integration = "cubature")
summary (mod0R2C)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.