tsls-methods {momentfit} | R 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 |
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)
[Package momentfit version 0.5 Index]