# NOT RUN {
if(require(fda, quietly=TRUE)) {
# Heights of boys and girls at age 10
f.a <- growth$hgtf["10",] # girls at age 10
m.a <- growth$hgtm["10",] # boys at age 10
# Empirical cumulative distribution functions
plot(ecdf(f.a))
plot(ecdf(m.a), col=grey(0.7), add=TRUE)
# Create a list of the data
fm.list <- list(Girls=f.a, Boys=m.a)
# }
# NOT RUN {
res_m <- GET.necdf(fm.list, summaryfun="means")
plot(res_m)
res_c <- GET.necdf(fm.list, summaryfun="contrasts")
plot(res_c)
# }
# NOT RUN {
# }
# NOT RUN {
# Heights of boys and girls at age 14
f.a <- growth$hgtf["14",] # girls at age 14
m.a <- growth$hgtm["14",] # boys at age 14
# Empirical cumulative distribution functions
plot(ecdf(f.a))
plot(ecdf(m.a), col=grey(0.7), add=TRUE)
# Create a list of the data
fm.list <- list(Girls=f.a, Boys=m.a)
# }
# NOT RUN {
res_m <- GET.necdf(fm.list, summaryfun="means")
plot(res_m)
res_c <- GET.necdf(fm.list, summaryfun="contrasts")
plot(res_c)
# }
# NOT RUN {
# }
# NOT RUN {
}
# }
Run the code above in your browser using DataLab