Learn R Programming

TwoPhaseInd (version 1.1.2)

remove_rarevariants: A function used in spmle and acoarm to remove rare-variant covariates

Description

It is used to remove rare-variant covariates, which can cause divergence problem.

Usage

remove_rarevariants(data, cutoff = 0.02)

Arguments

data

A dataframe composed of covariates.

cutoff

Proportion cutoff. If data composed of more than (1-cutoff) proportion of a constant value, we call it rare-variant.

Value

A logical vector composed of True or False. True means a covariate is rare-variant.

Details

The function removes rare-variant covariates.

Examples

Run this code
# NOT RUN {
## Load the example data
data(acodata)
result <- remove_rarevariants(acodata[, c("vacc1_evinf","fcgr2a.3")])
# }

Run the code above in your browser using DataLab