RMfixcov
is a userdefined covariance according to
the given covariance matrix.
It extends to the space through a Voronoi tesselation.
1 2 
scale, Aniso, proj,var 
optional arguments; same meaning for any

M 
a numerical matrix defining the userdefined covariance for a random field; The matrix should be positive definite, symmetric and its dimension should be equal to the length of observation or simulation vector. 
x,y,z,T,grid 
optional.
The usual arguments as in 
raw 
logical. If If Default: FALSE (outside mixed models) 
norm 
optional model that gives the norm between locations 
The covariances passed are implemented for the given locations. Within any Voronoi cell (around a given location) the correlation is assumed to be one.
In particular, it is used in RFfit
to define neighbour or network structure in the data.
RMfixcov
returns an object of class RMmodel
Starting with version 3.0.64, the former argument element
is replaced by the general
option set
in
RFoptions
.
Martin Schlather, schlather@math.unimannheim.de
Ober, U., Ayroles, J.F., Stone, E.A., Richards, S., Zhu, D., Gibbs, R.A., Stricker, C., Gianola, D., Schlather, M., Mackay, T.F.C., Simianer, H. (2012): Using Whole Genome Sequence Data to Predict Quantitative Trait Phenotypes in Drosophila melanogaster. PLoS Genet 8(5): e1002685.
RMcovariate
,
RMmodel
,
RFsimulate
,
RFfit
,
RMuser
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19  RFoptions(seed=0) ## *ANY* simulation will have the random seed 0; set
## RFoptions(seed=NA) to make them all random again
## Example 1 showing that the covariance structure is correctly implemented
n < 10
z < matrix(runif(n^2), nc=n)
(z < z %*% t(z))
RFcovmatrix(RMfixcov(z), 1:n)
## Example 2 showing that the covariance structure is interpolated
RFcovmatrix(RMfixcov(z, 1:n), c(2, 2.1, 2.5, 3))
## Example 3 showing the use in a separable spacetime model
model < RMfixcov(z, 1:n, proj="space") * RMexp(s=40, proj="time")
(z < RFsimulate(model, x = seq(0,12, 0.5), T=1:100))
plot(z)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.