# NOT RUN {
data(rimov)
res <- graph.flm(nsim=19, # Increase the number of simulations for serious analysis!
formula.full = Y~Year,
formula.reduced = Y~1,
curve_sets = list(Y=rimov), factors = data.frame(Year = 1979:2014))
plot(res)
# Test if there is a change in the slope in 1994,
# i.e. the full model is T = a + b*year + c*year:group,
res <- graph.flm(nsim = 19, # Increase the number of simulations for serious analysis!
formula.full = Y ~ Year + Year:Group,
formula.reduced = Y ~ Year,
curve_sets = list(Y=rimov),
factors = data.frame(Year = 1979:2014,
Group = factor(c(rep(1,times=24), rep(2,times=12)),
levels=1:2)),
contrasts = FALSE)
plot(res)
# }
# NOT RUN {
nsim <- 999
# }
# NOT RUN {
data(GDPtax)
factors.df <- data.frame(Group = GDPtax$Group, Tax = GDPtax$Profittax)
res.tax_within_group <- graph.flm(nsim = nsim,
formula.full = Y~Group+Tax+Group:Tax,
formula.reduced = Y~Group+Tax,
curve_sets = list(Y=GDPtax$GDP),
factors = factors.df)
plot(res.tax_within_group)
# Image data examples
data(abide_9002_23)
iset <- abide_9002_23$curve_set
# }
# NOT RUN {
# Figure of an image in the group 1 and group 2
plot(iset, idx=c(1, 27))
# Testing the discrete factor 'group' with contrasts
# (Use contrasts = FALSE for 'means')
res <- graph.flm(nsim = 19, # Increase nsim for serious analysis!
formula.full = Y ~ Group + Sex + Age,
formula.reduced = Y ~ Sex + Age,
curve_sets = list(Y = iset),
factors = abide_9002_23[['factors']],
contrasts = TRUE,
GET.args = list(type = "area"))
plot(res)
# Testing the continuous factor 'age'
res.a <- graph.flm(nsim = 19, # Increase nsim for serious analysis!
formula.full = Y ~ Group + Sex + Age,
formula.reduced = Y ~ Group + Sex,
curve_sets = list(Y = iset),
factors = abide_9002_23[['factors']],
GET.args = list(type = "area"))
plot(res.a)
# }
Run the code above in your browser using DataLab