# KRKM: Calculate the exposure distribution in the presence of... In KENDL: Kernel-Smoothed Nonparametric Methods for Environmental Exposure Data Subject to Detection Limits

## Description

Calculate the exposure distribution based on the kernel reverse Kaplan-Meier(KRKM) estimator proposed by Yang et al. (2017).

## Usage

 `1` ```KRKM(obs, bdl, lod, method='formula', b=1000) ```

## Arguments

 `obs` A vector of observations which are the exposure levels if the subject's exposure level can be detected, and the detection limits otherwise. `bdl` A logical vector indicating TRUE if the subject's exposure level is below the detection limit, and FALSE otherwise. `lod` A vector of detection limits. `method` The method of variance estimation. Either ‘formula’ or ‘bootstrap’ can be used. The default value is ‘formula’. `b` The number of bootstrap replicates for the bootstrap-based variance estimation method. The default value is 1000.

## Details

The KRKM estimator is a nonparametric estimator for the exposure distribution. It is valid regardless of whether the exposure level and detection limit are independent or not. This method requires the data come from simple random sampling and the detection limit is available for each subject. This function provides either formula-based or bootstrap-based variance estimation. The formula-based variance estimation method is computationally faster than the bootstrap-based method, but may underestimate the variance and thus yield poor coverage probabilities at the points below which there are few observations.

## Value

 `unique.obs` A vector of unique observations in the argument `obs`. `cdf` A vector of estimates for the cumulative distribution function (cdf) at the points given by `unique.obs`. `se` A vector of standard error estimates for the cdf estimates `lower` A vector of 95% lower confidence limits of the cdf values `upper` A vector of 95% upper confidence limits of the cdf values

## Author(s)

Yuchen Yang, Li Chen

## References

Yang Y, Shelton BJ, Tucker TC, Li L, Kryscio RJ, Chen L. (2017). Estimation of Exposure Distribution Adjusting for Association between Exposure Level and Detection Limit. Statistics in Medicine. Provisionally Accepted.

 ```1 2 3 4 5 6 7 8``` ```# simulated data set from a lognormal regression model lod <- exp(rnorm(200, -2.79, 1.12)) e <- rnorm(200, 0 , 1.21 ) t <- exp(-3.05+0.42*lod+e) obs <- pmax(t, lod) bdl <- t