Description Usage Arguments Details Value Note Author(s) References See Also Examples
Functions to estimate the parameters of distributions used in the lcmix
package by maximum likelihood estimation.
1 2 3 4 5 6 7 8 9 10 | thetahat.norm(x, w=1, aslist=TRUE)
thetahat.mvnorm(x, w=1, aslist=TRUE)
thetahat.pvii(x, w=1, aslist=TRUE, iter.max=LC_ITER_MAX, theta=NULL)
thetahat.mvpvii(x, w=1, aslist=TRUE, iter.max=LC_ITER_MAX, theta=NULL)
thetahat.weisd(x, w=1, aslist=TRUE, shape.guess=NULL)
thetahat.mvweisd(x, w=1, aslist=TRUE, shape.guess=NULL)
thetahat.gamma(x, w=1, aslist=TRUE, shape.guess=NULL)
thetahat.mvgamma(x, w=1, aslist=TRUE, shape.guess=NULL)
thetahat.exp(x, w=1, aslist=TRUE)
thetahat.mvexp(x, w=1, aslist=TRUE)
|
x |
for univariate, a numeric vector, with each element representing an observation; for multivariate, a numeric matrix or data frame, with each row representing an observation. |
w |
a numeric vector of non-negative values; weights to be applied to the elements (univariate) or rows (multivariate) of |
aslist |
logical; if |
iter.max |
maximum iterations for the “internal” EM algorithm used in estimation of parameters for these distributions. If |
theta |
optional list containing initial guesses for parameters. If not |
shape.guess |
optional initial guess at the shape parameter: a scalar for univariate, a vector of the appropriate length for multivariate. |
By default, estimation is unweighted. If weights are given, the length of the weights should generally be the same as the length of the data, that is, length(w) = length(x)
(univariate) or length(w) = nrow(x)
(multivariate). If weights are shorter than the data, they will be recycled. If longer than the data, weights will be truncated and a warning will be given.
If aslist
is FALSE
, parameters will be returned as a vector with named elements if possible. However, multivariate distributions generally have matrix parameters and using aslist=FALSE
for these distributions may produce results which are difficult to interpret.
A named list, a vector, or a matrix, depending on the distribution and options used, of estimated parameters.
For distributions without closed-form MLEs, a method-of-moments approach is used to obtain initial parameter estimates and then numerical optimization of the likelihood function is performed using nlminb
in package stats
. See Lawless (1982) for issues in parameter estimation for the Weibull and gamma distributions.
For multivariate distributions other than the normal and PVII, the correlation matrix for the copula is estimated using the inference function for margins procedure of Joe and Xu (1996).
Daniel Dvorkin
Lawless, J.F. (1982) Statistical Models and Methods for Lifetime Data, John Wiley & Sons.
Joe, H. and Xu, J. (1996) The estimation method of inference functions for margins for multivariate models. Technical Report 166, University of British Columbia, Department of Statistics.
mvnorm
, pvii
, mvpvii
, weisd
, mvweisd
, mvgamma
, mvexp
; nlminb
, Normal
, Weibull
, Gamma
, Exponential
in package stats
; fitdistr
in package MASS
which performs parameter estimation using different numerical optimization functions.
1 2 3 4 5 | set.seed(123)
x <- rweisd(1000, 2, 3)
thetahat.weisd(x, aslist=FALSE)
# shape decay
# 2.015511 2.996586
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.