fitdstn: Maximum-likelihood Fitting of Univariate Distributions

View source: R/fitdstn.q

fitdstnR Documentation

Maximum-likelihood Fitting of Univariate Distributions

Description

Maximum-likelihood fitting of univariate distributions.

Usage

fitdstn(x, densfun, ...)

Arguments

x

a numeric vector containing the sample.

densfun

a character string naming the distribution. Distributions ‘gamma’, ‘lognormal’, and ‘weibull’ are supported.

...

additional arguments are ignored.

Details

This function relies on the fitdistr function for the computations. The returned object is modified to support plotting and comparison.

Value

a list with class “fitdstn” containing the following elements:

estimate

a named numeric vector containing the parameter estimates.

sd

a named numeric vector containing the standard deviations of the parameter estimates.

vcov

a numeric matrix containing the variance-covariance matrix of the estimated parameter vector.

n

a single numeric value indicating the number of sample points in x.

loglik

a single numeric value giving the maxized the log-likelihood.

call

the matched call.

densfun

the character string densfun provided in the arguments.

x

the data provided in x.

Note

The print method displays the estimated parameters and their standard errors (in parentheses).

See Also

An important goal here is the comparison with robust fits to the same distributions, see fitdstnRob.

fitdistr which provides many more choices for densfun.


robust documentation built on July 9, 2023, 6:14 p.m.