collectImputationModels: Collect data from a model, needed for multiple imputation...

Description Usage Arguments Value Note Author(s) See Also

View source: R/collectImputationModels.R

Description

Collect data from a model, needed for multiple imputation based on this model

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
  collectImputationModels(model, ds = model$result[[1]]$ds,
    ..., verbosity = 0)

  ## S3 method for class 'EMLassoGLoMo'
collectImputationModels(model,
    ds=model$result[[1]]$ds, useCombinedGLoMo=TRUE, ...,
    verbosity=0)

  ## S3 method for class 'EMLassoGLoMoImputationData'
predict(object,
    newdata, out, wts=rep(1, nrow(newdata)),
    type.measure="auc", actualPredictAndEvaluateFunction,
    unpenalized=FALSE, ..., verbosity=0)

Arguments

model

model fit

ds

dataset for which imputation will need to happen

...

implementation dependent. e.g. for EMLassoGLoMo should be a list containig an item useCombinedGLoMo (will default to TRUE); for predict.EMLassoGLoMoImputationData: passed on to cv.glmnet. Note: the ones implied by object are not supported! e.g. family and standardize cannot be overridden

verbosity

The higher this value, the more levels of progress and debug information is displayed (note: in R for Windows, turn off buffered output)

useCombinedGLoMo

if FALSE (not the default), a distinct GLoMo is used for every lambda. Otherwise, the combined GLoMo (see combineGLoMos) is used for all lambdas.

object

"EMLassoGLoMoImputationData" that holds the information to perform imputations

newdata

dataset for which imputation needs to occur

out

outcomes that will be used for evaluating the models

wts

weights per observation (defaults to equal weights for all observations)

type.measure

see cv.glmnet

actualPredictAndEvaluateFunction

function similar to the nonexported .predAndEvalGLN function. Expected to support parameters: useGLoMo, useReusable, useLambda, newdata, out, weights, type.measure, imputeDs2FitDsProperties, nobs, ..., verbosity=0. Should return a vector twice the length of the number of rows: first all evaluated values, then all their sds. Note: if this is not specified, .predAndEvalGLN is used.

unpenalized

if TRUE (not the default) a simple regression model is fit with the selected variables

Value

collectImputationModels.EMLassoGLoMo will return an object of class "EMLassoGLoMoImputationData". This is a list with items:

imputationParams

the ... passed along

useCombinedGLoMo

as passed along

combinedGLoMo

if relevant (useCombinedGLoMo==TRUE): the combined GLoMo

glomolist

if relevant (useCombinedGLoMo==FALSE): list containing the GLoMo to be used for each lambda

reusableData

either a single object of class "ReusableDataForGLoMoSampling" (see reusableDataForGLoMoSampling), or a list with one of them per lambda

lambda

taken from model

family

taken from model

imputeDs2FitDsProperties

taken from model

Note

aids to generalize crossvalidation

Author(s)

Nick Sabbe nick.sabbe@ugent.be

See Also

EMLasso, cv.glmnet

EMLasso, cv.glmnet


EMLasso documentation built on May 2, 2019, 5:49 p.m.