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
Run the code above in your browser using DataLab