Learn R Programming

Greg (version 1.2)

model.matrix.ols: A fix for the model.matrix

Description

The model.matrix.lm() that the ols falls back upon "forgets" the intercept value and behaves unreliable in the vcovHC() funcitons. I've therefore created this subfunction to generate the actual model.matrix() by just accessing the formula.

Usage

"model.matrix"(object, ...)

Arguments

object
A Model
...
Parameters passed on

Value

matrix