# NOT RUN {
data(hue)
## Second degree polynomial model with random intercept, slope and
## quadratic term
fm1<-lcc(dataset = hue, subject = "Fruit", resp = "H_mean",
method = "Method", time = "Time", qf = 2, qr = 2)
summary(fm1)
summary(fm1, type="model")
lccPlot(fm1)
## Estimating longitudinal Pearson correlation and longitudinal
#accuracy
fm2<-lcc(dataset = hue, subject = "Fruit", resp = "H_mean",
method = "Method", time = "Time", qf = 2, qr = 2,
components = TRUE)
summary(fm2)
lccPlot(fm2)
# }
# NOT RUN {
## A grid of points as the Time variable for prediction
fm3<-lcc(dataset = hue, subject = "Fruit", resp = "H_mean",
method = "Method", time = "Time", qf = 2, qr = 2,
components = TRUE, time_lcc = list(from = min(hue$Time),
to = max(hue$Time), n=40))
summary(fm3)
lccPlot(fm3)
# }
# NOT RUN {
## Including an exponential variance function using time as a
#covariate.
fm4<-lcc(dataset = hue, subject = "Fruit", resp = "H_mean",
method = "Method", time = "Time", qf = 2, qr = 2,
components = TRUE, time_lcc = list(from = min(hue$Time),
to = max(hue$Time), n=40), var.class=varExp,
weights.form="time")
summary(fm4)
lccPlot(fm4)
# }
# NOT RUN {
## Non-parametric confidence interval with 500 bootstrap samples
fm5<-lcc(dataset = hue, subject = "Fruit", resp = "H_mean",
method = "Method", time = "Time", qf = 2, qr = 2,
ci = TRUE, nboot = 500)
summary(fm5)
lccPlot(fm5)
# }
# NOT RUN {
## Considering three methods of color evaluation
# }
# NOT RUN {
data(simulated_hue)
attach(simulated_hue)
fm6<-lcc(dataset = simulated_hue, subject = "Fruit",
resp = "Hue", method = "Method", time = "Time",
qf = 2, qr = 1, components = TRUE,
time_lcc = list(n=50, from=min(Time), to=max(Time)))
summary(fm6)
lccPlot(fm6)
detach(simulated_hue)
# }
# NOT RUN {
## Including an additional covariate in the linear predictor
## (randomized block design)
# }
# NOT RUN {
data(simulated_hue_block)
attach(simulated_hue_block)
fm7<-lcc(dataset = simulated_hue_block, subject = "Fruit",
resp = "Hue", method = "Method",time = "Time",
qf = 2, qr = 1, components = TRUE, covar = c("Block"),
time_lcc = list(n=50, from=min(Time), to=max(Time)))
summary(fm7)
lccPlot(fm7)
detach(simulated_hue_block)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab