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

Given a vector of data, find the marginal maximum likelihood choice of both weight and scale factor under the Laplace prior.

1 | ```
wandafromx(x)
``` |

`x` |
a vector of data |

The parameters are found by marginal maximum likelihood.
The search is over weights corresponding to thresholds in the range *[0, sqrt(2 log n)]*,
where *n* is the length of the data vector.
The search uses a nonlinear optimization routine (`optim`

in **R**)
to minimize the negative log likelihood function `negloglik.laplace`

.
The range over which the scale factor is searched is (0.04, 3).
For reasons of numerical stability within the optimization, the prior is parametrized
internally by the
threshold and the scale parameter.

A list with values

`w` |
The estimated weight |

`a` |
The estimated scale factor |

Bernard Silverman

See `ebayesthresh`

and http://www.bernardsilverman.com

1 | ```
wandafromx(rnorm(100, c( rep(0,90), rep(5,10))))
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

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.