Learn R Programming

cNORM (version 3.6.1)

plotPercentileSeries: Generates a series of plots with percentile curves for different models

Description

This function makes use of 'plotPercentiles' to generate a series of plots for models with an increasing number of terms. It draws on the information provided by the model object to determine the bounds of the modeling (age and standard score range). It can be used as an additional model check to determine the best fitting model. Please have a look at the 'plotPercentiles' function for further information.

Usage

plotPercentileSeries(
  model,
  start = 1,
  end = NULL,
  group = NULL,
  percentiles = c(0.025, 0.1, 0.25, 0.5, 0.75, 0.9, 0.975),
  filename = NULL
)

Value

A named list of plots (names indicate the number of terms), returned invisibly

Arguments

model

The Taylor polynomial regression model object or a cnorm object

start

Number of terms to start with (default 1)

end

Number of terms to end with; defaults to the largest available model

group

The name of the grouping variable; the distinct groups are automatically determined

percentiles

Vector with percentile scores, ranging from 0 to 1 (exclusive)

filename

Prefix of the filename. If specified, the plots are saved as png files in the directory of the workspace, instead of only displaying them. The number of terms is appended to the prefix.

Details

Each model of the series is refitted on the complete norm sample (applying case weights, if the norm data were post stratified). Models are identified by their actual number of terms, which - after consistency screening in bestModel - is not necessarily identical to the row number of the model selection table. The subtitle of each plot reports the number of terms, the adjusted R2 and, if available, the result of the consistency check.

See Also

plotPercentiles

Other plot: compare(), plot.cnorm(), plot.cnormBetaBinomial(), plot.cnormBetaBinomial2(), plotDensity(), plotDerivative(), plotNorm(), plotNormCurves(), plotPercentiles(), plotRaw(), plotSubset()

Examples

Run this code
if (FALSE) {
  # Load example data set, compute model and plot results
  result <- cnorm(raw = elfe$raw, group = elfe$group)
  plotPercentileSeries(result, start = 4, end = 6)
}

Run the code above in your browser using DataLab