tsal.test | R Documentation |
Test functions.
test.tsal.quantile.transform(from=0, to=1e6, shape=1, scale=1,
q=tsal.q.from.shape(shape), kappa=tsal.kappa.from.ss(shape,scale),
n=1e5, lwd=0.01, xmin=0, ...)
test.tsal.LR.distribution(n=100, reps=100, shape=1, scale=1,
q=tsal.q.from.shape(shape), kappa=tsal.kappa.from.ss(shape,scale),
xmin=0,method="mle.equation",...)
from |
lower limit for |
to |
upper limit for |
shape , q |
shape parameters. |
scale , kappa |
scale parameters. If we have both shape/scale and q/kappa parameters, the latter over-ride. |
n |
number of points at which to evaluate the function over the domain or number of sample points. |
lwd |
line width. |
xmin |
minimum x-value (left-censoring threshold). |
... |
further arguments to be passed to |
reps |
number of replicates. |
method |
estimation method, see |
plot.tsal.quantile.transform
check the accuracy of quantile/inverse quantile transformations
For all parameter values and all x
, qtsal(ptsal(x))
should = x
.
This function displays the relative error in the transformation, which is due
to numerical imprecision. This indicates roughly how far off random variates
generated by the transformation method will be.
If everything is going according to plan, the curve plotted should oscillate
extremely rapidly between positive and negative limits which, while growing,
stay quite small in absolute terms, e.g., on the order of 1e-5 when
x
is on the order of 1e9.
plot.tsal.LR.distribution
checks likelihood ratio estimation accuracy :
2*[(Likelihood at estimated parameters) - (likelihood at true parameters)]
should have a chi square distribution with 2 degrees of freedom, at least
asymptotically for large samples.
plot.tsal.quantile.transform
plots the relative error in the transformation.
plot.tsal.LR.distribution
plots the likelihood ratio against a
chi-square distribution and returns the result of Kolmgorov-Smirnov
test against theoretical distribution.
Cosma Shalizi (original R code), Christophe Dutang (R packaging)
Maximum Likelihood Estimation for q-Exponential (Tsallis) Distributions, http://bactra.org/research/tsallis-MLE/ and https://arxiv.org/abs/math/0701854.
#####
# (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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.