Description Usage Arguments Details Value Author(s) References See Also Examples
Maximum-likelihood and method-of-moments estimation of the Touchard model.
1 2 |
x |
either an object of class |
freq |
unnecessary (and ignored) if |
start |
starting values to be used by optimization/nonlinear solving algorithms. If missing, the default value is explained in the reference below. |
method |
one of |
rc |
TRUE for right-censored data. Not implemented for methods |
trunc.at.zero |
TRUE for model truncated at zero. Not implemented for methods |
For method 'ml'
the Touchard
likelihood is numerically maximized via optim()
with 'method=L-BFGS-B'
. For methods 'mm'
and 'gmm'
, the system of moment conditions
is solved by calling nleqslv
and numDeriv
.
A list with the following:
fit |
a list with point estimates, standard errors and variance matrix of estimates |
aic |
Akaike's information criterion, -2*log-likelihood + 2*p |
bic |
Schwarz's Bayesian criterion, -2*log-likelihood + log(n)*p |
test |
a data frame with likelihood ratio and Wald test results for the Null: delta = 0 (Poisson) |
method |
estimation method used ( |
data |
a list with elements |
Bernardo Andrade and Sandro Oliveira
Matsushita RY, Pianto D, Andrade BB, Cancado A, Silva S (2018) The Touchard distribution, Communications in Statistics - Theory and Methods, <doi:10.1080/03610926.2018.1444177>
Andrade, BB; Matsushita, RY; Oliveira, SB (submitted) Analyzing Count Data with the Touchard Model. available upon request.
optim
, rgram
, Touchard
, touplot
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | data(Epilepsy)
# 'seizures' is vector of raw data (351 counts)
toufit( x = seizures, method = 'ml' )
toufit( x = seizures, method = 'mm' )
toufit( x = seizures, method = 'gmm' )
# suppose data were recorded as table object
TAB <- table(seizures)
TAB
toufit(TAB) # same as above (method = 'ml')
# suppose data were recorded as data.frame
DF <- data.frame( y = as.numeric(names(TAB)), fr = as.numeric(TAB) )
DF
toufit(x = DF$y, freq = DF$fr) # same as above (method = 'ml')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.