Subsample_B {SuRF.vs}R Documentation

Subsample_B

Description

This function is to run sub-sampling B times

Usage

Subsample_B(B, data, fold, Alpha, prop, weights, ncores, family)

Arguments

B

the number of sub-samplings to run (e.g., B=1000)

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 subsamping

family

The distribution family of the response variable

weights

In a binomial model, weights: =TRUE: if weighted version is desired; =FALSE, otherwise ; In other models,weights: =vector of weights of the same size as the sample size N: if weighted version is desired;=FALSE, otherwise (other generalized model)

ncores

the number of cores to use for parallel computation

Value

Class.Err: mis-classification error on the left out ones over B runs. A vector of length B.

Lambda: tuning parameters selected from B runs. It is a vector of length B

BETA: It is a matrix used to save the beta coefficients from all B runs #' @export


[Package SuRF.vs version 1.1.0.1 Index]