bootkde {bda} | R Documentation |
Density estimation for data with rounding errors
Description
To estimate density function based on data with rounding errors.
Usage
bootkde(x,freq,a,b,from, to, gridsize=512L,method='boot')
Arguments
x , freq |
raw data if 'freq' missing, otherwise as distinct values with frequencies. |
a , b |
the lower and upper bounds of the rounding error. |
from , to , gridsize |
start point, end point and size of a fine grid where the distribution will be evaluated. |
method |
type estimate: "mle" or "Berkson", or "boot" (default). |
Value
y |
Estimated values of the smooth function over a fine grid. |
x |
grid points where the smoothed function are evaluated. |
pars |
return 'bw' for Berkson method, or return the mean and SD for MLE method |
References
Wang, B and Wertelecki, W, (2013) Computational Statistics and Data Analysis, 65: 4-12.
Examples
#data(ofc)
#x0 = round(ofc$Head)
x0 = round(rnorm(100,34.5,1.6))
fx1 = bootkde(x0,a=-0.5,b=0.5,method="Berkson")
[Package bda version 18.2.2 Index]