updateModel.Bin: Update the IDI/NRI-based model using new data or new...

Description Usage Arguments Value Author(s) See Also

View source: R/updateModel.Bin.R

Description

This function will take the frequency-ranked set of variables and will generate a new model with terms that meet either the integrated discrimination improvement (IDI), or the net reclassification improvement (NRI), threshold criteria.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
	updateModel.Bin(Outcome,
	            covariates = "1",
	            pvalue = c(0.025, 0.05),
	            VarFrequencyTable, 
	            variableList,
	            data,
	            type = c("LM", "LOGIT", "COX"), 
	            lastTopVariable = 0,
	            timeOutcome = "Time",
	            selectionType = c("zIDI","zNRI"),
	            maxTrainModelSize = 0,
	            zthrs = NULL
	            )

Arguments

Outcome

The name of the column in data that stores the variable to be predicted by the model

covariates

A string of the type "1 + var1 + var2" that defines which variables will always be included in the models (as covariates)

pvalue

The maximum p-value, associated to either IDI or NRI, allowed for a term in the model

VarFrequencyTable

An array with the ranked frequencies of the features, (e.g. the ranked.var value returned by the ForwardSelection.Model.Bin function)

variableList

A data frame with two columns. The first one must have the names of the candidate variables and the other one the description of such variables

data

A data frame where all variables are stored in different columns

type

Fit type: Logistic ("LOGIT"), linear ("LM"), or Cox proportional hazards ("COX")

lastTopVariable

The maximum number of variables to be tested

timeOutcome

The name of the column in data that stores the time to event (needed only for a Cox proportional hazards regression model fitting)

selectionType

The type of index to be evaluated by the improveProb function (Hmisc package): z-score of IDI or of NRI

maxTrainModelSize

Maximum number of terms that can be included in the model

zthrs

The z-thresholds estimated in forward selection

Value

final.model

An object of class lm, glm, or coxph containing the final model

var.names

A vector with the names of the features that were included in the final model

formula

An object of class formula with the formula used to fit the final model

z.selectionType

A vector in which each term represents the z-score of the index defined in selectionType obtained with the Full model and the model without one term

Author(s)

Jose G. Tamez-Pena and Antonio Martinez-Torteya

See Also

updateModel.Res


FRESA.CAD documentation built on Jan. 13, 2021, 3:39 p.m.