plotBoxCox {cNORM}R Documentation

Plot regression model versus box cox for a specific age

Description

This plot can be used to compare, how well the regression data can be modeled via a Box Cox power transformation.

Usage

plotBoxCox(regressionModel, boxcoxParameters, minRaw = NULL,
  maxRaw = NULL, type = 0)

Arguments

regressionModel

The regression model from the 'bestModel' function

boxcoxParameters

The parameters from the box cox power transformation

minRaw

The lower bound of raw scores; must not fall below 0 due to restrictions of the box cox function

maxRaw

The upper bound of raw scores

type

Type of plot; 0 = Show percentiles as function of raw scores, 1 = Show raw scores as function of norm scores, 2 = Density plot

Value

data frame with fitted box cox and regression scores

See Also

boxcox

Examples


# Calculate model based on PPVT4 data
data <- prepareData(ppvt)
model <- bestModel(data)

# compute power function for a specific age, e. g. 9.2
bc <- boxcox(model, 9.2)

# plot results as a function of norm scores
plotBoxCox(model, bc, minRaw=0, maxRaw=228, type=1)

# plot density
plotBoxCox(model, bc, minRaw=0, maxRaw=228, type=2)

[Package cNORM version 1.2.0 Index]