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

`deamerSE`

performs a deconvolution estimation of the density of a noisy variable (`'y'`

) under
the hypothesis of an unknown density of the noise using an auxiliary sample of pure errors ("SE" for "sample error").
Therefore, `deamerSE`

requires two samples: one with single noisy observations and another with pure errors.

1 |

`y` |
Numeric. The vector of noisy observations. |

`errors` |
Numeric. The vector of the auxiliary sample of errors.
Does not need to be the same length as |

`grid.length` |
Numeric. Optional. The number of points of the grid the estimation is performed on. Defaults to 100. |

`from` |
Numeric. Optional. The lower bound of the grid the estimation is performed on. Defaults to |

`to` |
Numeric. Optional. The upper bound of the grid the estimation is performed on. Defaults to |

`na.rm` |
Logical. Optional. If |

The model is *y = x + e* where *x* and *e* both have unknown densities.
The density of *x* is estimated by using an independant auxiliary sample of
pure errors *eps* (argument '`errors`

') that will be used for computing
the characteristic function of the noise. It is therefore essential to ensure that
*e* and *eps* arise from the same distribution (generally experimentally).

`deamerSE`

will handle non-centered errors. Therefore, the input vector for argument `errors`

does not necessarily need to be centered before estimation.

An object of class `'deamer'`

`deamerSE`

is not implemented for heteroscedastic errors.

Julien Stirnemann <j.stirnemann@gmail.com>

Comte F, Lacour C. Data-driven density estimation in the presence of additive
noise with unknown distribution. Journal of the Royal Statistical Society:
Series B (Statistical Methodology). 2011 Sep 1;73(4):601-27.

`deamer`

,
`deamerKE`

,
`deamerRO`

,
`deamer-class`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | ```
################################################################################
# Example 1: centered errors
set.seed(23456)
n = 1000; M = 500
x <- rchisq(n,3)
b=0.5
e <- rlaplace(n, 0, b)
y <- x + e
eps <- rlaplace(M, 0, b)
est <- deamerSE(y, eps)
est
curve(dchisq(x, 3), 0, 12, lwd=2, lty=3)
lines(est, lwd=2)
lines(density(y), lwd=2, lty=4)
legend("topright", bty="n", lty=c(1,3,4), lwd=2, legend=c("deamerSE", "true density",
"kernel density\nof noisy obs."))
################################################################################
# Example 2: non-centered errors
set.seed(23456)
n = 1000; M = 500
x <- rchisq(n,3)
mu=2; b=0.5
e <- rlaplace(n, mu, b)
y <- x + e
eps <- rlaplace(M, mu, b)
est <- deamerSE(y, eps, from=0, to=12)
est
curve(dchisq(x, 3), 0, 12, lwd=2, lty=3)
lines(est, lwd=2)
lines(density(y), lwd=2, lty=4)
legend("topright", bty="n", lty=c(1,3,4), lwd=2, legend=c("deamerSE", "true density",
"kernel density\nof noisy obs."))
``` |

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.