Description Usage Arguments Details Value Author(s) References See Also Examples

To compute the conditional probability density function from data with measurement error. The measurement errors have to be homoscedastic.

1 2 |

`y` |
The observed data. It is a vector of length at least 3. |

`sig` |
The standard deviations |

`y0` |
The given conditional data point in the conditional density f(x|y=y0). |

`error` |
Error distribution types: (1) 'normal' for normal errors; (2) 'laplacian' for Laplacian errors; (3) 'snormal' for a special case of small normal errors. |

`bw1` |
The bandwidth for the deconvolution density |

`bw2` |
The bandwidth for the kernel density |

`adjust` |
adjust the range there the PDF is to be evaluated. By default, |

`fft` |
To specify the method to compute the PDF. 'fft=FALSE' to compute directly; 'fft=TRUE' to compute the PDF by using the Fast Fourier Transformation. |

`n` |
number of points where the conditional PDF is to be evaluated. |

`from` |
the starting point where the conditional PDF is to be evaluated. |

`to` |
the starting point where the conditional PDF is to be evaluated. |

`cut` |
used to adjust the starting end ending points where the conditional PDF is to be evaluated. |

`na.rm` |
is set to FALSE by default: no NA value is allowed. |

`grid` |
the grid number to search the optimal bandwidth when a bandwidth selector was specified in bw. Default value "grid=100". |

`ub` |
the upper boundary to search the optimal bandwidth, default value is "ub=2". |

`tol` |
the parameter to avoid the estimate of f(y|x) too small. The default vaule is 0. It can not exceed 0.05. |

`...` |
control |

If the number of points to be evaluated is too small (less than 32), a direct computing method is preferred. The current version can support up to *2^21* points where the conditional PDF to be computed.

An object of class “Decon”.

X.F. Wang wangx6@ccf.org

B. Wang bwang@jaguar1.usouthal.edu

Fan, J. (1991). On the optimal rates of convergence for nonparametric deconvolution problems. *The Annals of Statistics*, 19, 1257-1272.

Wang XF, Ye D (2010). Conditional density estimation with measurement error. Technical Report.

Wang, X.F. and Wang, B. (2011). Deconvolution estimation in measurement error models: The R package decon. *Journal of Statistical Software*, 39(10), 1-24.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
n <- 1000
x <- c(rnorm(n/2,-2,1),rnorm(n/2,2,1))
sig <- .8
u <- rnorm(n,sd=sig)
w <- x+u
f1 <- DeconCPdf(w,sig, y0=-2.5, error='normal')
f2 <- DeconCPdf(w,sig, y0=0, error='normal')
f3 <- DeconCPdf(w,sig, y0=2.5, error='normal')
par(mfrow=c(2,2))
plot(density(w), main="f_w", xlab="w")
plot(f1, main="f1", xlab="x")
plot(f2, main="f2", xlab="x")
plot(f3, main="f3", xlab="x")
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.