Learn R Programming

CARME (version 0.1.1)

sim_car: Simulation of proper CAR random effects

Description

sim_car returns a vector of CAR distributed random effects

Usage

sim_car(W, alpha = 0.5, tau = 5)

Value

a vector of length n

Arguments

W

Symmetric adjacency matrix of size n

alpha

properness parameter between 0 and 1. Defaults to 0.5

tau

marginal precision. Defaults to 5

References

Jin, X., Carlin, B.P. and Banerjee, S. (2005), Generalized Hierarchical Multivariate CAR Models for Areal Data. Biometrics, 61: 950-961. https://doi.org/10.1111/j.1541-0420.2005.00359.x

Examples

Run this code
data(W_sel)
sim_car(W = W_sel, alpha = .9, tau = 5)

Run the code above in your browser using DataLab