Description Usage Arguments Details Value Author(s) See Also Examples
Calculates the instrumental variables model when the output, regressors and instrument matrices are explicitly provided.
1 | ivreg.fit.EX(x, y, z, weights, offset, ...)
|
x |
regressor matrix. |
y |
vector with dependent variable. |
z |
instruments matrix. |
weights |
an optional vector of weights to be used in the fitting process. |
offset |
an optional offset that can be used to specify an a priori known component to be included during fitting. |
... |
further arguments passed to |
See documentation of ivreg.fit
for further operational
details.
Statistical inference and sensitivity analysis based on the output of
ivreg.fit.Ex
can be performed using coeftestIV
and sensIvreg
functions.
ivreg.fit.EX
returns an object of class ivregEX
list with the following components:
coefficients |
parameter estimates. |
residuals |
a vector of residuals. |
fitted.values |
a vector of predicted means. |
weights |
either the vector of weights used (if any) or |
offset |
either the offset used (if any) or |
estfun |
a matrix containing the empirical estimating functions. |
n |
number of observations. |
nobs |
number of observations with non-zero weights. |
rank |
the numeric rank of the fitted linear model. |
df.residual |
residual degrees of freedom for fitted model. |
cov.unscaled |
unscaled covariance matrix for the coefficients. |
sigma |
residual standard error. |
y |
the response vector. |
x |
a list with elements |
coefficientsEX |
parameter estimates of the EX analysis |
residualsEX |
vector of residuals in EX regression |
fitted.valuesEX |
vector of fitted values in EX regression |
vhat |
residuals of first stage of two stage least squared analysis |
vars |
A list of variable names. List has three vectors for three kinds of variables: 'exogenous', 'endogenous' and 'instruments'. |
Bikram Karmakar
ivreg.EX
, coeftestIV
, sensIvreg
,
ivreg.fit
1 2 3 4 5 6 7 8 9 10 11 | data("CigarettesSW", package = "AER")
CigarettesSW$rprice <- with(CigarettesSW, price/cpi)
CigarettesSW$rincome <- with(CigarettesSW, income/population/cpi)
CigarettesSW$tdiff <- with(CigarettesSW, (taxs - tax)/cpi)
x = CigarettesSW[CigarettesSW[,'year'] == "1995", c('rprice', 'rincome')]
y = CigarettesSW[CigarettesSW[,'year'] == "1995", c('packs')]
z = CigarettesSW[CigarettesSW[,'year'] == "1995", c('tdiff', 'rincome')]
fm3 <- ivreg.fit.EX(as.matrix(x), y, z)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.