tsls-methods: ~~ Methods for Function 'tsls' in Package 'momentfit' ~~

tsls-methodsR Documentation

~~ Methods for Function tsls in Package momentfit ~~

Description

It estimates a linear model using two-stage least squares.

Usage

## S4 method for signature 'linearModel'
tsls(model)

## S4 method for signature 'slinearModel'
tsls(model)

Arguments

model

An object of class linearModel or slinearModel.

Methods

signature(model = "linearModel")
signature(model = "slinearModel")

2SLS for equation by equation estimation of a system of equations.

Examples

data(simData)
theta <- c(beta0=1,beta1=2)
model1 <- momentModel(y~x1, ~z1+z2, data=simData)
res <- tsls(model1)
summary(res)

## Econometrics, Fumio Hayashi (2000)
## Empirical exercises (b) and (c)
data(Griliches)
Griliches$YEAR <- as.factor(Griliches$YEAR)
model1  <- momentModel(LW~S+IQ+EXPR+TENURE+RNS+SMSA+YEAR-1,
                   ~S+EXPR+TENURE+RNS+SMSA+YEAR+MED+KWW+MRT+AGE-1,
                   data=Griliches, vcov="MDS")
res <- tsls(model1)
summary(res)

momentfit documentation built on June 7, 2023, 6:30 p.m.