Description Usage Arguments Value Author(s) See Also Examples
Provides a formula-based interface for 2SLS estimation of
a linear model. Computations are done by fit2sls
. The returned object has
the necessary information for computing a variety of
regression diagnostics.
1 2 3 4 |
formula |
A model formula, as for |
instruments |
A one-sided formula, specifying the instrumental variables. |
data |
An optional data frame, list, or environment containing the variables in the model formula and instrumental-variables formula. |
subset |
See |
weights |
An optional vector of inverse-variance weights; if absent the weights are set to 1 for all cases. |
na.action |
See |
contrasts |
See |
singular.ok |
If |
model |
Include the model frame in the returned object. |
x |
Include the model matrices for the two stages in the returned object. |
y |
Include the response vector in the returned object. |
qr |
Include the QR decompositions for the two stages in the returned object. |
... |
Not used. |
An object of class "2sls"
, with the following elements in addition to
those returned by fit2sls
:
response.name
a character string with the name of the response variable or possibly the character representation of an expression evaluating to the response.
formula
the model formula.
intruments
the one-sided formula specifying the instrumental variables.
model.matrix
the model matrix corresponding to the right-hand side of the model formula.
y
the response-variable vector.
model.matrix.instruments
the model matrix for the first-stage regression.
wt.var
the name of the weight variable (for a weighted fit).
na.action
the na.action argument.
call
the function call.
contasts
contrasts for the model matrix.
contrasts.instruments
contrasts for the instrumental-variables model matrix.
xlevels
factor levels (if any) for the model matrix.
xlevels.instruments
factor levels (if any) for the instrumental variables model matrix.
terms
the terms object for the model matrix.
terms.instruments
the terms object for the instrumental variables model matrix.
model
the model frame.
John Fox jfox@mcmaster.ca
fit2sls
, lm
, formula
, 2SLS_Methods
,
2SLS_Diagnostics
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.