get.contr | R Documentation |
Given multivariable predictions and prediction (co)variances, calculate contrasts and their (co)variance
get.contr(data, gstat.object, X, ids = names(gstat.object$data))
data |
data frame, output of predict |
gstat.object |
object of class |
X |
contrast vector or matrix; the number of variables in
|
ids |
character vector with (selection of) id names, present in data |
From data, we can extract the n \times 1
vector with multivariable
predictions, say $y$, and its n \times n
covariance matrix $V$. Given
a contrast matrix in $X$, this function computes the contrast vector
$C=X'y$ and its variance $Var(C)=X'V X$.
a data frame containing for each row in data
the generalized
least squares estimates (named beta.1, beta.2, ...), their
variances (named var.beta.1, var.beta.2, ...) and covariances
(named cov.beta.1.2, cov.beta.1.3, ...)
Edzer Pebesma
predict
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.