Subsample.w_cox {SuRF.vs}R Documentation

Subsample.w_cox

Description

This function is to subsample the data and perform LASSO (single time) on the selected samples for cox proportional model

Usage

Subsample.w_cox(data, fold, Alpha, prop, weights)

Arguments

data

the dataframe should be arranged in the way such that columns are X1,X2,X3....,Xp, status. Where Xi's are variables and status is the outcome(for the logistic regression, the outcome is in terms of 0/1)

fold

fold used in lasso cross validation to select the tuning parameter

Alpha

1 for Lasso,0 for ridgeression

prop

percentage of samples left out for each sub-sampling

weights

= a vector of weights: if weighted version is desired, =FALSE, otherwise

Value

#lambda: the tuning parameter that within 1 sd of the tuning parameter gives the lowest CV error

coef: a table shows the name of the selected variables by LASSO and its coefficients

table: there are a equal proportion of samples from each status left out and we use the model built on the selected subsamples to predict those left out ones. Table contains two columns: column1 is the predicted value and column2 isthe true value of the outcome

error: misclassification error based on the above table

Beta: should be a vector of length p+1 and this is the beta coefficients from the LASSO model.


[Package SuRF.vs version 1.1.0.1 Index]