Learn R Programming

spBayes (version 0.0-2)

mk.mv.X: Make a multivariate design matrix

Description

Given $m$ univariate design matrices, the function mk.mv.X creates a multivariate design matrix suitable for use in sp.predict.

Usage

mk.mv.X(X)

Arguments

X
a list of $m$ univariate design matrices. The matrices must have the same number of rows (i.e., observations) but may have different number of columns (i.e., regressors).

Value

  • A multivariate design matrix suitable for use in sp.predict.

See Also

sp.predict

Examples

Run this code
##Define some univariate model design matrices
##with intercepts.
X.1 <- cbind(rep(1, 10), matrix(rnorm(50), nrow=10))
X.2 <- cbind(rep(1, 10), matrix(rnorm(20), nrow=10))
X.3 <- cbind(rep(1, 10), matrix(rnorm(30), nrow=10))

##Make a multivariate design matrix suitable
##for use in sp.predict.
X.mv <- mk.mv.X(list(X.1, X.2, X.3))

Run the code above in your browser using DataLab