Description Usage Arguments Value Examples
View source: R/define_interaction.R
The output of this function is often used as an input for the function control.interaction().
1 |
x |
vector of covariate values; it can be either a vector of the same length of the data or a vector containing the unique covariate values; typically, it is a vector of increasing integers indexing time points or spatial locations (for time main effect, it can also be a vector of not equally spaced time locations) |
igmrf.type |
the main effect model, e.g. "rw2", "besag" |
R |
optional; an obj of class 'Cmatrix' with the structure matrix |
g |
only for gmrf.type='besag'; the structure matrix defined through obj 'inla.graph' |
p.spline |
experimental; TRUE of FALSE, whether we want or not to define a P-spline (default FALSE) |
n.bsplines |
experimental; only for p.spline=TRUE, number of b-spline basis function (default is 20) |
deg.bsplines |
experimental; only for p.spline=TRUE, degree of the b-splines (default is 3, cubic b-splines) |
A list of several objects
R |
the structure matrix of the IGMRF |
rankdef |
rank deficiency of the structure matrix |
idx |
a vector of length(x) indicating the ordering of the covariate vector x (OBSOLETE; when the dataset is properly ordered - as it has to be for the package to work fine - idx is not needed) |
A |
experimental; the B-spline desgin amtrix (need to check if this works) |
cc.id |
a vector indicating which cc a node belongs to (if igmrf.type="besag"); NULL id igmrf.type="rw1" or "rw2" |
1 2 | x <- 1:50
m1 <- m(x, igmrf.type='rw1')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.