Var

0th

Percentile

Variance-Covariance Matrices (deprecated)

Computes variance-covariance matrices or variances for model objects or data. The default method uses the function var. These functions are now deprecated; instead, use the vcov function, now in the base package. Note that vcov has no diagonal argument and no default method.

Keywords
misc
Usage
Var(object, ...)

## S3 method for class 'default':
Var(object, diagonal=FALSE, ...)

## S3 method for class 'lm':
Var(object, diagonal=FALSE, ...)

## S3 method for class 'glm':
Var(object, diagonal=FALSE, ...)
Arguments
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.
Value

  • A variance-covariance matrix or a vector of variances.

See Also

var

Aliases
  • Var
  • Var.default
  • Var.lm
  • Var.glm
Examples
data(Davis)
attach(Davis)
Var(cbind(weight, repwt), na.rm=TRUE)
##          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
Documentation reproduced from package car, version 1.0-18, License: GPL version 2 or newer

Community examples

Looks like there are no examples yet.