propest.wav {binhf} | R Documentation |

Proportion estimation procedure for simulations.

```
propest.wav(proportion = P2, binsize=1,length = 256, times = 100, meth = "u", van = 6,
fam = "DaubLeAsymm", min.level = 3)
```

`proportion` |
A Bernoulli proportion/binomial mean function. Examples are P2, P4 and sinlog. |

`binsize` |
The binomial size corresponding to the mean function proportion. |

`length` |
Length of vector to be produced. Must be a power of two. |

`times` |
The number of times to sample the proportion. |

`meth` |
A wavelet thresholding method. Possible values are "u" for universal thresholding, or "c" for cross-validation. |

`van` |
the number of vanishing moments of the wavelet used in the wavelet denoiser. |

`fam` |
the wavelet family used in the wavelet denoiser. Possible values are "DaubLeAsymm" and "DaubExPhase". |

`min.level` |
the primary resolution level for the wavelet transform denoiser. |

This function creates a regularly-spaced vector on the unit interval of length length, and uses these values to create corresponding values using the proportion function. These values are then used as binomial probabilities to sample "observed" binomial random variables. The observation vector is then denoised using a wavelet transform defined by the arguments van, fam, min.level with thresholding method meth. This denoising is done for both Anscombe and the Haar-Fisz method for binomial random variables. The procedure is repeated times times, and the resulting proportion estimates averaged.

`x` |
regular grid on which the proportion function is evaluated. |

`y` |
vector corresponding to x of proportion function values. |

`b` |
matrix of dimensions timesxlength of sampled binomial variables. |

`e` |
matrix of dimensions timesxlength of estimated values of the proportion function, for the binomial Haar-Fisz transform. |

`ea` |
matrix of dimensions timesxlength of estimated values of the proportion function, for Anscombe's transform. |

`meanfhat` |
averaged proportion estimate for the binomial Haar-Fisz transform. |

`meanfhata` |
averaged proportion estimate for Anscombe's transform. |

`amse` |
average mean square error for the binomial Haar-Fisz transform. |

`amsea` |
average mean square error for Anscombe's transform. |

Matt Nunes (m.nunes@ucl.ac.uk)

```
## Not run:
sim<-propest.wav(proportion = P2, binsize=1,length = 256, times = 1000, meth = "u",
van = 6, fam = "DaubLeAsymm", min.level = 4)
plot(sim$x,sim$y,type="l",xlab="",ylab="Binomial mean function")
##^^ shows original proportion to estimate.
lines(sim$x,sim$meanfhat,col=2)
lines(sim$x,sim$meanfhata,col=3)
##^^shows the estimates of the proportion from the two transforms.
## End(Not run)
```

[Package *binhf* version 1.0-3 Index]