View source: R/LDLErrorPropagation&bootstrapVariance.R
LDLbootVrnc | R Documentation |
Function to calculate the variance of LDL using Bootstrapping.
LDLbootVrnc(CHOL, HDL, TG, sampleSize = length(CHOL), noOfReps = 1000, pb = F)
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) |
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.
## Not run:
LDLboostrpVar = LDLbootVrnc(sampleA$CHOL, sampleA$HDL, sampleA$TG)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.