Learn R Programming

VDSPCalibration (version 1.0)

sampletot: Samples Selection

Description

Selects samples used in a calibration study

Usage

sampletot(x, index, n0, K)

Arguments

x

the old sample measurements needing calibration

index

the ID list of the old sample measurements needing calibration

n0

the required sample size

K

the number of quantiles, it is 4 if we use quartiles (recommended)

Value

x

the selected sample measurements to be used in the calibration study

index

the id list of the selected samples to be used in the calibration study

Details

The function selectes samples used in the calibration study

References

Tian L., Durazo-Arvizu R. A., Myers G., Brooks S., Sarafin K., and Sempos C. T. (2014), The estimation of calibration equations for variables with heteroscedastic measurement errors, Statist. Med., 33, pages 4420-4436

Examples

Run this code
# NOT RUN {
VD.value= 60 + 25*rnorm(1000)
VD.index=1:1000

### x:     the VD value
### index: the index for VD value, it can be 1, 2, 3,....
### n0:    the number of samples we want to select
### K:     the number of quantiles, it is 4 if we use quartiles

sampletot(x=VD.value, index=VD.index, n0=100, K=4)
# }

Run the code above in your browser using DataLab