maximizeDV: Estimate the maximum value of a criterion under optimal...

Description Usage Arguments Value Examples

View source: R/maximizeDV.R

Description

Estimate the maximum value of a criterion under optimal selection

Usage

1
2
3
4
5
6
7
maximizeDV(
  formula,
  data,
  method = c("regression", "logistic", "poisson"),
  imputations = 30,
  plot = TRUE
)

Arguments

formula

A equation of the form y~x1 + x2... The Y is the value to be maximized by optimizing selection

data

The dataset

method

One of the following: "regression", "logistic", or "poisson", which specifies the type of model to fit to the criterion

imputations

Number of imputations. Defaults to 30.

plot

Should a plot be returned? Defaults to TRUE.

Value

both a vector and a plot.

For the plot, The plot shows a scatterplot. The horizontal line on the plot is the estimate (e.g., proportion who quit, mean of the criterion) under the current system. Each dot represents the estimate under a different imputation.

The vector returns the current mean (under the current selection system), the mean under the optimal system, and the proportion of individuals the two methods (old versus optimal) agree on. The vector also returns the regression coefficients under a model predicting who was selected based on the predictors.

Examples

1
2
3
4
5
data(selection_data)
maximizeDV(Quit~IQ + Biodata + Conscientiousness + Interview, data=selection_data, method="logistic")
testthat::expect_error(maximizeDV(Absences~IQ + Biodata + Conscientiousness + Interview, data=selection_data, method="logistic"))
maximizeDV(Absences~IQ + Biodata + Conscientiousness + Interview, data=selection_data, method="poisson")
maximizeDV(JP~IQ + Biodata + Conscientiousness + Interview, data=selection_data)

dustinfife/selection documentation built on Aug. 17, 2020, 5:43 a.m.