GPois | R Documentation |
This function is implemented to variable of interest (y) that assumed to be a Generalized Poisson Distribution. The range of data is 0 < y < ∞. Generalized Distribution model can be used to handle underdispersion and overdispersion in count data.
GPois( formula, iter.update = 3, iter.mcmc = 2000, coef, var.coef, thin = 1, burn.in = 1000, tau.u = 1, data )
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 |
Regression coefficient for variable of interest (y) |
var.coef |
Variance of coefficient |
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 |
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 contains the estimated model coefficient |
plot |
Trace, Density, Autocorrelation Function Plot of MCMC samples |
##For data without any non-sampled area data(dataGPois) # Load dataset result <- GPois(y ~ x1 + x2, data = dataGPois) 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 dataGPoisNs
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.