LDL_TGVrnc: Calculate LDL variance when triglyceride variance changes

View source: R/LDLErrorPropagation&bootstrapVariance.R

LDL_TGVrncR Documentation

Calculate LDL variance when triglyceride variance changes

Description

This function calculates the variance of LDL using two methods: Error Propagation and Bootstrap when the triglyceride distribution changes. It uses a data frame where each column contains a different set of triglyceride values of increasing variance as the column index increases.

Usage

LDL_TGVrnc(dfTG, CHOL, HDL, bootStrpReps = 2000)

Arguments

dfTG

A data frame where each column contains a different set of triglyceride values of increasing variance as the column index increases.

CHOL

A vector or data frame column containing the cholesterol values to be used for the calculation of the variance of LDL.

HDL

A vector or data frame column containing the HDL values to be used for the calculation of the variance of LDL.

bootStrpReps

(Default=2000) Number of bootstrap iterations for bootstrap variance calculation.

Value

The function returns a list with the Error Propagation variance (ErrPropVrnc) and the bootstrap variance (BootVrnc). Each list element is a vector of length equal to the number of columns of the triglyceride data frame supplied as argument (dfTG) and each vector value corresponds to the respective variance of the corresponding data frame columns.

Examples

## Not run: 
dfTG = CV_Range(sampleA$TG, 0, 100, maxRandIter = 3000, plot=FALSE)
LDLTGVar=LDL_TGVrnc( sampleA$CHOL,  sampleA$HDL, dfTG, bootStrpReps=2000)

## End(Not run)

LDLcalc documentation built on May 31, 2022, 5:07 p.m.