simeQ | R Documentation |
Required the eigen decomposition of a precision matrix
simeQ(eQ, tol = 1e-09, rank = NULL, k = 1)
eQ |
an eigen decomposition of a symmetric positive semi-definate matrix corresponding to the precision matrix of an inhomogenous GMRF |
tol |
tolerance (relative to largest eigen value) for numerical lack of positive-definiteness in ‘Q’. |
rank |
the rank of the precision matrix. If this is not supplied it it is estimated by comparing the eigen values to tol * largest eigenvalue. |
k |
optional scaling of the precision matrix. This can be used to save recomputing the eigen decomposition for different smoothing parameters. |
Note if rank is suplied and is less than that true rank, the simulation will be from a reduced rank GMRF.
a single draw from with the appropriate conditional covariance structure
## create a rw2 GMRF precision matrix and simulate
Q <- getQrw(100, order = 2)
eQ <- eigen(Q)
x <- simeQ(eQ, k = exp(5))
plot(x, type = "l")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.