simplyValidate: Validate a model (to its original data)

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/simplyValidate.R

Description

Validate a model (to its original data)

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
  simplyValidate(model, ..., verbosity = 0)

  ## S3 method for class 'EMLassoGLoMo'
simplyValidate(model,
    ds=model$result[[1]]$ds, out=model$result[[1]]$out,
    wts=rep(1, nrow(ds)),
    imputeDs2FitDsProperties=model$imputeDs2FitDsProperties,
    imputations=10, ..., type.measure="auc",
    keepResultPerLambda=FALSE, nobs=1, unpenalized=FALSE,
    verbosity=0)

Arguments

model

model fit

...

for flexibility in 'derived' implementation

verbosity

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

ds

dataset with predictors

out

vector (binary factor) of outcomes

wts

vector of weights (defaults to equal weights for all rows)

imputeDs2FitDsProperties

see imputeDs2FitDs object that will provide the conversion from imputed dataset to one that is ready for fitting the predictor model

imputations

Number of multiple imputations on the complete dataset (defaults to 10)

type.measure

see cv.glmnet

keepResultPerLambda

if TRUE (not the default), the individual results from the simplyValidate.EMLasso1l are also returned in an extra item resultPerLambda

nobs

how many observations are simulated for each row with missing data

unpenalized

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

Value

object that has as class: "sv." pasted before the class of model. Normally, model will will be the return value of EMLasso, so this result is mainly the same as a cv.glmnet. The added/altered items are:

glmnet.fit

is now the model passed in, so has more classes besides "glmnet" (e.g. "EMLasso")

resultPerLambda

matrix with one column per imputation. The top rows are the estimates for the criterion per lambda, below that are their SD estimates. Not present if keepResultPerLambda=FALSE

Note

aids to generalize validation

Author(s)

Nick Sabbe nick.sabbe@ugent.be

See Also

EMLasso, cv.glmnet

Examples

1
2
3
4
5
6
7
y<-rbinom(nrow(iris), 1, 0.5)
iris.cpy<-randomNA(iris, n=0.1)
iris.emlognet<-EMLasso(ds=numdfr(iris.cpy), out=y,
	lambdas=c(0.03,0.002,0.0003), nrOfSamplesPerMDRow=7, verbosity=2,
	convergenceChecker=convergenceCheckCreator(minIt=5, maxIt=10))
sfStop()
iris.sv.emlognet<-simplyValidate(iris.emlognet, verbosity=2)

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