LDL_CHOLVrnc {LDLcalc} | R Documentation |
Calculate LDL variance when cholesterol variance changes
Description
This function calculates the variance of LDL using two methods: Error Propagation and Bootstrap when the cholesterol distribution changes. It uses a data frame where each column contains a different set of cholesterol values of increasing variance as the column index increases.
Usage
LDL_CHOLVrnc(dfCHOL, HDL, TG, bootStrpReps = 2000)
Arguments
dfCHOL |
A data frame where each column contains a different set of cholesterol values of increasing variance as the column index increases. |
HDL |
A vector or data frame column containing the HDL values to be used for the calculation of the variance of LDL. |
TG |
A vector or data frame column containing the triglyceride 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 cholesterol data frame supplied as argument (dfCHOL) and each vector value corresponds to the respective variance of the corresponding data frame columns.
Examples
## Not run:
dfCHOL = CV_Range(sampleA$CHOL, 0, 100, maxRandIter = 3000, plot=FALSE)
LDLCHOLVar = LDL_CHOLVrnc(dfCHOL, sampleA$HDL, sampleA$TG, bootStrpReps=200)
## End(Not run)