pcv: Cross-Validation for Profile Analysis

Description Usage Arguments Details Value References See Also

View source: R/pcv.R

Description

Implements the cross-validation described in Davison & Davenport (2002).

Usage

1
2
pcv(formula, data, seed = NULL, na.action = "na.fail",
  family = "gaussian", weights = NULL)

Arguments

formula

An object of class formula of the form response ~ terms.

data

An optional data frame, list or environment containing the variables in the model.

seed

Should a seed be set? Function defaults to a random seed.

na.action

How should missing data be handled? Function defaults to failing if missing data are present.

family

A description of the error distribution and link function to be used in the model. See family.

weights

An option vector of weights to be used in the fitting process.

Details

The pcv function requires two arguments: criterion and predictor. The criterion corresonds to the dependent variable and the predictor corresponds to the matrix of predictor variables. The function performs the cross-validation technique described in Davison & Davenport (2002) and an object of class critpat is returned. There the following s3 generic functions are available: summary(),anova(), print(), and plot(). These functions provide a summary of the cross-validation (namely, R2); performs ANOVA of the R2 based on the split for the level, pattern, and overall; provide output similar to lm(); and plot the estimated parameters for the random split. Missing data are presently handled by specifying na.action = "na.omit", which performs listwise deletion and na.action = "na.fail", the default, which causes the function to fail. A seed may also be set for reproducibility by setting the seed.

Value

An object of class critpat is returned, listing the f ollowing components:

References

Davison, M., & Davenport, E. (2002). Identifying criterion-related patterns of predictor scores using multiple regression. Psychological Methods, 7(4), 468-484. DOI: 10.1037/1082-989X.7.4.468.

See Also

cpa,print.critpat,summary.critpat,anova.critpat,plot.critpat


cddesja/profileR documentation built on April 18, 2018, 9:22 p.m.