LDLbootVrnc: Calculate variance of LDL using bootstrapping.

View source: R/LDLErrorPropagation&bootstrapVariance.R

LDLbootVrncR Documentation

Calculate variance of LDL using bootstrapping.

Description

Function to calculate the variance of LDL using Bootstrapping.

Usage

LDLbootVrnc(CHOL, HDL, TG, sampleSize = length(CHOL), noOfReps = 1000, pb = F)

Arguments

CHOL

A vector containing the cholesterol values to be used for LDL calculation.

HDL

A vector containing the HDL values to be used for LDL calculation.

TG

A vector containing the triglyceride values to be used for LDL calculation. The three vectors (vecCHOL, vecHDL and vecG) must contain the same number of values

sampleSize

Number of samples drawn uniformly and with replacement from the three vectors. It cannot be larger than the sample size (default=sample size).

noOfReps

Number of bootstrap iterations.

pb

Draw a text progress bar (defaut=FALSE)

Value

It returns a data table with four columns. The first column contains the mean of the LDL values for each iteration. The second column contains the median of each iteration.The third column contains the variance and the fourth column contains the CV of each iteration. It also returns the median of the "Mean", "Var" and "CV" columns of the data table.

Examples

## Not run: 
LDLboostrpVar = LDLbootVrnc(sampleA$CHOL, sampleA$HDL, sampleA$TG)

## End(Not run)

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