Computes and selects the best-fitting regression model by evaluating a series of models with increasing predictors. It aims to find a parsimonious model that effectively captures the variance in the data. This can be useful in psychometric test construction to smooth out data and reduce noise while retaining key diagnostic information. Model selection can be based on the number of terms or the explained variance (R^2). Setting high values for the number of terms, R^2 cutoff, or `k` may lead to overfitting. Typical recommended starting points are `terms = 5`, `R^2 = .99`, and `k = 4`.
bestModel(
data,
raw = NULL,
R2 = NULL,
k = NULL,
t = NULL,
predictors = NULL,
terms = 0,
weights = NULL,
force.in = NULL,
plot = TRUE
)
The model meeting the R^2 criteria. Further exploration can be done using plotSubset(model)
and plotPercentiles(data, model)
.
Preprocessed dataset with 'raw' scores, powers, interactions, and usually an explanatory variable (like age).
Name of the raw score variable (default: 'raw').
Adjusted R^2 stopping criterion for model building (default: 0.99).
Power constant influencing model complexity (default: 4, max: 6).
Age power parameter. If unset, defaults to `k`.
List of predictors or regression formula for model selection. Overrides 'k' and can include additional variables.
Desired number of terms in the model.
Optional case weights. If set to FALSE, default weights (if any) are ignored.
Variables forcibly included in the regression.
If TRUE (default), displays a percentile plot of the model.
Additional functions like plotSubset(model)
and cnorm.cv
can aid in model evaluation.
plotSubset, plotPercentiles, plotPercentileSeries, checkConsistency
Other model:
checkConsistency()
,
cnorm.cv()
,
derive()
,
modelSummary()
,
print.cnorm()
,
printSubset()
,
rangeCheck()
,
regressionFunction()
,
summary.cnorm()