estimate.ldl: Predict LDL levels

Description Usage Arguments Value Examples

Description

This function uses LASSO to select predictors in order to run linear regression to predict LDL for individuals. Outputs a vector of predicted values of LDL corresponding on input There are no checks for NAs or anythingelse and thus this isa development level function.

Usage

1

Arguments

data

Data.frame or matrix where the first column is what you want to predict, and remaining columns are what you want to consider as possibly covariates. Any factors MUST be set as factors before running. No character vectors allowed.

Value

A vector of length equal to number of rows of input data with predicted values of LDL

Examples

1
2
3
4
response <- rnorm(1000)
goodpredictors <- 0.5*response + rnorm(1000,0.5)
badpredictors <- matrix(rnorm(10000),ncol=10)
estimate.ldl(cbind(response,goodpredictors,badpredictors))

dcries/bhd documentation built on May 14, 2019, 9:42 a.m.