Description Usage Arguments Details Value Author(s) Examples
hurdle
is used to fit single or
double-hurdle regression models to count data via Bayesian inference.
1 2 3 4 |
y |
numeric response vector. |
x |
numeric predictor matrix. |
hurd |
numeric threshold for 'extreme' observations of two-hurdle models.
|
dist |
character specification of response distribution. |
dist.2 |
character specification of response distribution for 'extreme' observations of two-hurdle models. |
control |
list of parameters for controlling the fitting process,
specified by |
iters |
number of iterations for the Markov chain to run. |
burn |
numeric burn-in length. |
nthin |
numeric thinning rate. |
plots |
logical operator. |
progress.bar |
logical operator. |
Setting dist
and dist.2
to be the same distribution creates a
single dist
-hurdle model, not a double-hurdle model. However, this
is being considered in future package updates.
hurdle
returns a list which includes the items
measure of model dimensionality p_D where p_D = \bar{D} - D(\bar{θ}) is the "mean posterior deviance - deviance of posterior means"
Deviance Information Criterion where DIC = \bar{D} - p_D
Posterior Predictive Ordinate (PPO) measure of fit
Conditional Predictive Ordinate (CPO) measure of fit
posterior mean(s) of third-component parameter(s) if
hurd != Inf
posterior means of the log-likelihood distributions of all model components
posterior means regression coefficients
posterior deviation where D = -2LogL
posterior distributions of regression coefficients
posterior distribution(s) of third-component parameter(s) if
hurd != Inf
Taylor Trippe <ttrippe@luc.edu>
Earvin Balderama <ebalderama@luc.edu>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #Generate some data:
p=0.5; q=0.25; lam=3;
mu=10; sigma=7; xi=0.75;
n=200
set.seed(2016)
y <- rbinom(n,1,p)
nz <- sum(1-y)
extremes <- rbinom(sum(y),1,q)
ne <- sum(extremes)
nt <- n-nz-ne
yt <- sample(mu-1,nt,replace=TRUE,prob=dpois(1:(mu-1),3)/(ppois(mu-1,lam)-ppois(0,lam)))
yz <- round(rgpd(nz,mu,sigma,xi))
y[y==1] <- c(yt,yz)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.