Description Usage Arguments Details Value Note Author(s) References Examples
View source: R/direct_GCNB_AR1_likelihood.R
Direct Likelihood evaluation Ar1 Requires: mnormt, mvtnorm
1 | direct_GCNB_AR1_likelihood(rho, p, s, data, method="mnormt")
|
rho |
AR(1) dependence structure with parameter rho |
nb.p |
X_t ~ NB (p, s) |
nb.s |
X_t ~ NB (p, s) |
data |
observed data |
method |
a string of value "mnormt" or "mvtnorm" only |
Evaluated likelihood function directly
A numeric value of the evaluated likelihood function given the observed data and parameters rho, nb.p and nb.s.
Only AR(1) dependence structure is used, it is not generalisd to ARMA(p,q)
Hannah Lennon <drhannahlennon@gmail.com>
Shi and Valdez, (2012), Longitudinal Modelling of Insurance Claims using Jittering.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | library(mnormt)
library(mvtnorm)
n <- 4
set.seed(n)
simdata <- arima.sim(n, model=list(ar=0.7))
data <- qnbinom(pnorm(simdata), prob=0.3, size=3)
cov <- ARMAacf(ar=0.7, lag.max=n-1, pacf=FALSE)
direct_GCNB_ARMA_likelihood(cov, 0.3, 3, data, method="mnormt")
direct_GCNB_AR1_likelihood(0.7, 0.3, 3, data, method="mnormt")
direct_GCNB_ARMA_likelihood(cov, 0.3, 3, data, method="mvtnorm")
direct_GCNB_AR1_likelihood(0.7, 0.3, 3, data, method="mvtnorm")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.