powered by
The Fay-Herriot small area model has a Normal latent variable and Normal observed response. This generates data according to that specification.
null_gen (M, p, D, lambda)
A list containing
copy of argument `D`
vector of length `p` latent coefficients
copy of argument `lambda`
matrix of independent variables
vector of latent effects
vector of responses
vector of sampling errors
name of sampling error distribution
number of areal units
dimension of regressors i.e. \(x \in R^p\)
vector of precisions for response, length M
M
value of latent variance
M <- 50 p <- 3 D <- rep(0.1, M) lamb <- 1/2 dat <- null_gen(M, p, D, lamb)
Run the code above in your browser using DataLab