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)
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.
a numeric vector of non-negative values; weights to be applied to the elements (univariate) or rows (multivariate) of
maximum iterations for the “internal” EM algorithm used in estimation of parameters for these distributions. If
optional list containing initial guesses for parameters. If not
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.
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).
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.
Exponential in package
fitdistr in package
MASS which performs parameter estimation using different numerical optimization functions.
1 2 3 4 5