R/tsls.wfit.R

Defines functions tsls.wfit

Documented in tsls.wfit

tsls.wfit <- function(X, Y, Z, weights, ...) {
  fs <- lm.wfit(Z, X, weights, ...)
  XZ.hat <- as.matrix(fs$fitted.values)
  rm(fs)
  colnames(XZ.hat) <- colnames(X)
  ss <- lm.wfit(XZ.hat, Y, weights, ...)
  ss
}

Try the icsw package in your browser

Any scripts or data that you put into this service are public.

icsw documentation built on May 1, 2019, 7:29 p.m.