This package enables users to fit monotonic polynomials of varying degree using a reversible jump sampler.
This package is not in CRAN right now. Just install using devtools and github
devtools::install_github('hhau/rjmonopoly')
To fit, simply call the rjmonopoly function:
library(fda) library(rjmonopoly) x <- onechild$day y <- onechild$height fit <- rjmonopoly(x, y)
The help file should be reasonably self-explanatory for the other parameters. At the moment there are only rudamentary plotting functions avaliable.
plotDegreePost(fit) plotFit(fit)
I intend on adding more / some sensible generics, once I figure out what those should be.
This sampler (and code) is currently delicate, and is likely to break, hang, and emit no errors. Sorry about that, it's on my to do list.
c++
, because some chains
need to run for millions of iterations, and no one wants to wait for R
to do
that.Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.