| Var {car} | R Documentation |
Computes variance-covariance matrices or variances for model objects or data.
The default methods uses the function var.
Var(object, ...) Var.default(object, diagonal=F, ...) Var.lm(object, diagonal=F) Var.glm(object, diagonal=F)
object |
an object for which the covariance matrix is desired. |
... |
arguments to be passed to var (e.g., na.rm). |
diagonal |
if TRUE, return only the variances. |
A variance-covariance matrix or a vector of variances.
John Fox jfox@mcmaster.ca
data(Davis) attach(Davis) Var(cbind(weight, repwt), na.rm=T) ## weight repwt ## weight 233.8781 176.1014 ## repwt 176.1014 189.7966 Var(lm(weight~repwt)) ## (Intercept) repwt ## (Intercept) 9.2228211 -0.134640952 ## repwt -0.1346410 0.002051736