if (FALSE) {
# Example with continuous age variable, ranked with sliding window
model.ppvt.sliding <- cnorm(age=ppvt$age, raw=ppvt$raw, width=1)
# Example with age groups; you might first want to experiment with
# the granularity of the groups via the 'getGroups()' function
model.ppvt.group <- cnorm(group=ppvt$group, raw=ppvt$raw) # with predefined groups
model.ppvt.group <- cnorm(group=getGroups(ppvt$age, n=15, equidistant = T),
raw=ppvt$raw) # groups built 'on the fly'
# plot information function
plot(model.ppvt.group, "subset")
# check model consistency
checkConsistency(model.ppvt.group)
# plot percentiles
plot(model.ppvt.group, "percentiles")
}
Run the code above in your browser using DataLab