Description Usage Arguments Value Examples
This function is implemented to variable of interest (y) that assumed to be a Hurdle Negative Binomial Distribution. The range of data is (0 < y < ∞). This model can be used to handle overdispersion and excess zero in data.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
formula |
Formula that describe the fitted model |
iter.update |
Number of updates with default |
iter.mcmc |
Number of total iterations per chain with default |
coef.nonzero |
Optional argument for the mean of the prior distribution of the model coefficients for variable of interest (y) which value is zero count |
var.coef.nonzero |
Optional argument of variance of coefficient non-zero |
coef.zero |
Optional argument for the mean of the prior distribution of the model coefficients for variable of interest (y) which value is zero count |
var.coef.zero |
Optional argument for variance of coefficient zero |
thin |
Thinning rate, must be a positive integer with default |
burn.in |
Number of iterations to discard at the beginning with default |
tau.u |
Variance of random effect area for non-zero count of variable interest with default |
tau.v |
Variance of random effect area for zero count of variable interest with default |
data |
The data frame |
This function returns a list of the following objects:
Est |
A vector with the values of Small Area mean Estimates using Hierarchical bayesian method |
refVar |
Estimated random effect variances |
coefficient |
A dataframe with the estimated model coefficient |
plot |
Trace, Density, Autocorrelation Function Plot of MCMC samples |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ##For data without any non-sampled area
data(dataHNB) # Load dataset
result <- HurdleNB(y ~ x1 + x2, data = dataHNB)
result$Est # Small Area mean Estimates
result$refVar # Estimated random effect variances
result$coefficient # Estimated model coefficient
# Load library 'coda' to execute the plot
# autocorr.plot(result$plot[[3]]) # Generate ACF Plot
# plot(result$plot[[3]]) # Generate Density and Trace plot
## For data with non-sampled area use dataHNBNs
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.