Description Usage Arguments Value Functions Examples
Density, distribution function, quantile function, random generation, and
pth derivative for a Bernstein density with parameter vector lambda
.
1 2 3 4 5 | dxbernstein(x, lambda, p = 1, support = c(0, 1), log = FALSE)
dbernstein(x, lambda, p = 1, support = c(0, 1), log = FALSE)
pbernstein(x, lambda, p = 1, support = c(0, 1), log.p = FALSE)
|
x, q |
vector of quantiles. |
lambda |
A vector of positive weights summing to 1. |
p |
vector of probabilities. |
support |
The support of the |
log, log.p |
logical; if |
n |
number of observations. If codelength(n) > 1, the length is taken to be the number required. |
lower.tail |
logical; if |
dbernstein
gives the density, pbernstein
the distribution function, qbernstein
the quantile function, rbeta
generates random deviates, and dxbernstein
gives the pth
derivative of the density function.
dxbernstein
: Calculates pth derivative of a
Bernstein density.
dbernstein
: Calculates a Bernstein
density.
pbernstein
: Calculates the distribution
function of a Bernstein density.
1 2 3 4 5 6 7 8 9 10 11 12 | ## Do a parametric bootstrap.
set.seed(1337)
data = rbeta(200, 2, 7)
polygram_object = polygram(data, s = 3, m = 4)
current_median = qpolygram(0.5, polygram_object)
medians = replicate(100, {
new_data = rpolygram(200, polygram_object)
new_median = qpolygram(0.5, polygram(new_data, s = 3, m = 4))
new_median
})
plot(polygram(sqrt(200)*(current_median - medians), s = 4, m = 4,
support = c(-1,1)))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.