Title: | Maximum Likelihood Inference for the Pearson VII Distribution with Shape Parameter 3/2 |
---|---|
Description: | Supports maximum likelihood inference for the Pearson VII distribution with shape parameter 3/2 and free location and scale parameters. This distribution is relevant when estimating the velocity of processive motor proteins with random detachment. |
Authors: | John Hughes |
Maintainer: | John Hughes <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.0-3 |
Built: | 2025-01-07 03:27:44 UTC |
Source: | https://github.com/cran/pearson7 |
Evaluate the density for the Pearson VII distribution with shape parameter 3/2.
dpearson7(x, mu = 0, sigma = 1, log = FALSE)
dpearson7(x, mu = 0, sigma = 1, log = FALSE)
x |
vector of quantiles. |
mu |
vector of means. |
sigma |
vector of scales. |
log |
logical; if |
If mu
is not specified, it assumes the default value of 0. If sigma
is not specified, it assumes the default value of 1.
The Pearson VII distribution with location , scale
, and shape 3/2 has density
the density.
Hughes, J., Shastry, S., Hancock, W. O., and Fricks, J. (2013) Estimating velocity for processive motor proteins with random detachment. Journal of Agricultural, Biological, and Environmental Statistics, in press.
Pearson, K. (1916) Mathematical contributions to the theory of evolution. xix. second supplement to a memoir on skew variation. Philosophical Transactions of the Royal Society of London. Series A, Containing Papers of a Mathematical or Physical Character, 216, 429–457.
ppearson7
, qpearson7
, rpearson7
curve(dpearson7(x), -5, 5, lwd = 2, n = 500, ylab = "f(x)") curve(dnorm(x), lwd = 2, lty = 2, n = 500, add = TRUE)
curve(dpearson7(x), -5, 5, lwd = 2, n = 500, ylab = "f(x)") curve(dnorm(x), lwd = 2, lty = 2, n = 500, add = TRUE)
Find the MLE for a sample from the Pearson VII distribution with shape parameter 3/2.
pearson7.fit(y, mu0 = median(y), sigma0 = sqrt(3) * median(abs(y - median(y))), tol = 1e-08)
pearson7.fit(y, mu0 = median(y), sigma0 = sqrt(3) * median(abs(y - median(y))), tol = 1e-08)
y |
a vector of observations. |
mu0 |
an initial value for |
sigma0 |
an initial value for |
tol |
the convergence tolerance. |
This function uses a Newton-Raphson algorithm to find the MLE. The starting values for and
are the sample median and
times the sample MAD, respectively. See the reference for details.
pearson7.fit
returns an object of class “pearson7
”, which is a list containing the following components.
theta.hat |
the estimates of |
hessian |
the Hessian matrix evaluated at |
iterations |
the number of iterations required to attain convergence. |
value |
the value of the log likelihood at |
Hughes, J., Shastry, S., Hancock, W. O., and Fricks, J. (2013) Estimating velocity for processive motor proteins with random detachment. Journal of Agricultural, Biological, and Environmental Statistics, in press.
y = rpearson7(100, 100, 10) fit = pearson7.fit(y) fit summary(fit)
y = rpearson7(100, 100, 10) fit = pearson7.fit(y) fit summary(fit)
Compute the negative log likelihood for a sample.
pearson7.objective(params, y)
pearson7.objective(params, y)
params |
a vector of parameter values. |
y |
a vector of observations. |
This function computes the negative log likelihood for given a sample. This function can be optimized using
optim
, but it is better to use pearson7.fit
.
the negative log likelihood.
Evaluate the distribution function for the Pearson VII distribution with shape parameter 3/2.
ppearson7(q, mu = 0, sigma = 1, lower.tail = TRUE, log.p = FALSE)
ppearson7(q, mu = 0, sigma = 1, lower.tail = TRUE, log.p = FALSE)
q |
vector of quantiles. |
mu |
vector of means. |
sigma |
vector of scales. |
lower.tail |
logical; if |
log.p |
logical; if |
If mu
is not specified, it assumes the default value of 0. If sigma
is not specified, it assumes the default value of 1.
The Pearson VII distribution with location , scale
, and shape 3/2 has cdf
the probability.
Hughes, J., Shastry, S., Hancock, W. O., and Fricks, J. (2013) Estimating velocity for processive motor proteins with random detachment. Journal of Agricultural, Biological, and Environmental Statistics, in press.
dpearson7
, qpearson7
, rpearson7
curve(ppearson7(x), 0, 5, lwd = 2, ylim = c(0.8, 1), ylab = "F(x)") curve(pnorm(x), lwd = 2, lty = 2, add = TRUE)
curve(ppearson7(x), 0, 5, lwd = 2, ylim = c(0.8, 1), ylab = "F(x)") curve(pnorm(x), lwd = 2, lty = 2, add = TRUE)
Evaluate the quantile function for the Pearson VII distribution with shape parameter 3/2.
qpearson7(p, mu = 0, sigma = 1, lower.tail = TRUE, log.p = FALSE)
qpearson7(p, mu = 0, sigma = 1, lower.tail = TRUE, log.p = FALSE)
p |
vector of probabilities. |
mu |
vector of means. |
sigma |
vector of scales. |
lower.tail |
logical; if |
log.p |
logical; if |
If mu
is not specified, it assumes the default value of 0. If sigma
is not specified, it assumes the default value of 1.
The Pearson VII distribution with location , scale
, and shape 3/2 has quantile function
the quantile.
Hughes, J., Shastry, S., Hancock, W. O., and Fricks, J. (2013) Estimating velocity for processive motor proteins with random detachment. Journal of Agricultural, Biological, and Environmental Statistics, in press.
dpearson7
, ppearson7
, rpearson7
curve(qpearson7(x), 0, 1, lwd = 2, ylab = expression(F^{-1}*(x))) curve(qnorm(x), lwd = 2, lty = 2, n = 500, add = TRUE)
curve(qpearson7(x), 0, 1, lwd = 2, ylab = expression(F^{-1}*(x))) curve(qnorm(x), lwd = 2, lty = 2, n = 500, add = TRUE)
Generate random deviates from a Pearson VII distribution with shape parameter 3/2.
rpearson7(n, mu = 0, sigma = 1)
rpearson7(n, mu = 0, sigma = 1)
n |
number of observations. |
mu |
vector of means. |
sigma |
vector of scales. |
If mu
is not specified, it assumes the default value of 0. If sigma
is not specified, it assumes the default value of 1.
random deviates.
Hughes, J., Shastry, S., Hancock, W. O., and Fricks, J. (2013) Estimating velocity for processive motor proteins with random detachment. Journal of Agricultural, Biological, and Environmental Statistics, in press.
Devroye, L. (1986) Non-Uniform Random Variate Generation. New York: Springer-Verlag.
dpearson7
, ppearson7
, qpearson7
y = rpearson7(1000) hist(y, prob = TRUE, breaks = 100, col = "gray") curve(dpearson7(x), lwd = 2, col = "blue", add = TRUE)
y = rpearson7(1000) hist(y, prob = TRUE, breaks = 100, col = "gray") curve(dpearson7(x), lwd = 2, col = "blue", add = TRUE)
Print a summary of a Pearson VII fit.
## S3 method for class 'pearson7' summary(object, alpha = 0.05, digits = 4, ...)
## S3 method for class 'pearson7' summary(object, alpha = 0.05, digits = 4, ...)
object |
an object of class “ |
alpha |
the significance level used to compute the confidence intervals. The default is 0.05. |
digits |
the number of significant digits to display. The default is 4. |
... |
additional arguments. |
This function displays (1) a table of estimates, (2) the value of the log likelihood, and (3) the number of Newton-Raphson iterations. Each row of the table of estimates shows the parameter estimate and the approximate confidence interval for the parameter.