beta_err_gen | R Documentation |
The traditional Fay-Herriot small area model has a Normal latent variable and Normal observed response errors. This method generates data with Normal latent variables and Beta errors on the response. Note that the sampling errors are transformed so their mean and variance match the the first two moments of the traditional model.
beta_err_gen (M, p, D, lambda, a, b)
M |
number of areal units |
p |
dimension of regressors i.e. |
D |
vector of precisions for response, length |
lambda |
value of latent variance |
a |
first shape parameter of Beta distribution |
b |
second shape parameter of Beta distribution |
A list containing
D |
copy of argument 'D' |
beta |
vector of length 'p' latent coefficients |
lambda |
copy of argument 'lambda' |
X |
matrix of independent variables |
theta |
vector of latent effects |
Y |
vector of responses |
err |
vector of sampling errors |
name |
name of sampling error distribution, including shape parameters |
Marten Thompson thom7058@umn.edu
M <- 50
p <- 3
D <- rep(0.1, M)
lamb <- 1/2
dat <- beta_err_gen(M, p, D, lamb, 1/2, 1/4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.