tsal.fit {tsallisqexp}R Documentation

Fitting Tsallis Distributions

Description

Loglikelihood and fit functions.

Usage

tsal.loglik(x, shape, scale, q=tsal.q.from.shape(shape),
kappa=tsal.kappa.from.ss(shape,scale), xmin=0)

tsal.fit(x, xmin=0, method=c("mle.equation", "mle.direct", "leastsquares"), ...)

#
# Note that this function ONLY works with the shape-scale parameterization
# Inputs: shape, scale, left-censoring threshold

tsal.fisher(shape, scale, xmin=0)

Arguments

x

vector of quantiles.

shape, q

shape parameters.

scale, kappa

scale parameters.

xmin

minimum x-value.

method

A character string for the estimation method: "mle.equation" (default), "mle.direct", "leastsquares".

...

further arguments to be passed to the estimation method.

Details

tsal.loglik computes the loglikelihood of a sample x.

tsal.fisher calculates the Fisher information matrix, for asymptotic variances and covariances of the maximum likelihood estimates of shape and scale First row/column corresponds to shape, second to scale Convergence to the asymptotic normal distribution can be slow, so for limited data you should bootstrap.

tsal.fit estimates parameters by solving maximum likelihood equations when method="mle.equation", by minimizing the log-likelihood (directly) when method="mle.direct", by minimizing the square difference between the empirical and theoretical distribution functions. This function is a wrapper for the actual methods: tsal.fit.mle.equation (solve maximum likelihood estimating equations); tsal.fit.mle.direct (numerical likelihood maximization); and tsal.fit.leastsquares (least-squares curve-fitting to the empirical distribution); prettying up the results in all cases.

Value

tsal.loglik returns the loglikelihood as a numeric.

tsal.fit returns NA when estimation aborts or a list with components (type, q, kappa, shape, scale, loglik, n, xmin, method) when estimation succeeds.

Author(s)

Cosma Shalizi (original R code), Christophe Dutang (R packaging)

References

Maximum Likelihood Estimation for q-Exponential (Tsallis) Distributions, http://bactra.org/research/tsallis-MLE/ and https://arxiv.org/abs/math/0701854.

Examples


#####
# (1) fit
x <- rtsal(20, 1/2, 1/4)
tsal.loglik(x, 1/2, 1/4)

tsal.fit(x, method="mle.equation")
tsal.fit(x, method="mle.direct")
tsal.fit(x, method="leastsquares")



		

[Package tsallisqexp version 0.9-4 Index]