Learn R Programming

speff2trial (version 1.0.5)

modSearch: Internal function for speff()

Description

modSearch is used internally by speff to construct an optimal model for prediction of the study endpoint or estimation of the missingness mechanism.

Usage

modSearch(formula, x, y, endpoint, method, optimal, force.in,
          nvmax)

Arguments

formula

a formula object with the response on the left of the ~ operator, and the linear predictor on the right.

x

a matrix of at least two predictors

y

a response vector

endpoint

a character string specifying the type of the response variable; possible values are "quantitative" or "dichotomous".

method

a character string specifying the type of search technique used in the model selection procedure; possible values are "exhaustive", "forward", or "backward".

optimal

specifies the optimization criterion for model selection; possible values are "cp" for Mallow's Cp, "bic" for BIC, and "rsq" for R-squared.

force.in

a vector of indices to columns of the design matrix that should be included in each regression model.

nvmax

the maximum number of covariates considered for inclusion in a model.

See Also

speff