# NOT RUN {
data(rimov)
# }
# NOT RUN {
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))
# }
# NOT RUN {
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 {
data(GDPtax)
factors.df <- data.frame(Group = GDPtax$Group, Tax = GDPtax$Profittax)
res.tax_within_group <- graph.flm(nsim = 999,
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)
# }
Run the code above in your browser using DataLab