Description Usage Arguments Details Value See Also Examples
This function uses the same arguments as ivreg
and additionally
outputs the EX analysis.
1 2 |
formula, instruments |
formula specification(s) of the regression
relationship and the instruments. Either |
data |
an optional data frame containing the variables in the model.
By default the variables are taken from the environment of the |
subset |
an optional vector specifying a subset of observations to be used in fitting the model. |
na.action |
a function that indicates what should happen when the
data contain |
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. |
contrasts |
an optional list. See the |
model |
logicals. If |
... |
further arguments passed to |
See Details on the arguments and others see ivreg
of AER
package.
Statistical analysis and sensitivity analysis based on the output of ivreg.EX
is performed in coeftestIV
and sensIvreg
functions.
ivreg.EX
returns an object of class "ivregEX"
(also of class
"ivreg"
), 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 |
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. |
call |
the original function call. |
formula |
the model formula. |
terms |
a list with elements |
levels |
levels of the categorical regressors. |
contrasts |
the contrasts used for categorical regressors. |
model |
the full model frame (if |
y |
the response vector. |
x |
a list with elements |
1 2 3 4 5 6 7 8 9 10 | data("CigarettesSW", package = "AER")
CigarettesSW$rprice <- with(CigarettesSW, price/cpi)
CigarettesSW$rincome <- with(CigarettesSW, income/population/cpi)
CigarettesSW$tdiff <- with(CigarettesSW, (taxs - tax)/cpi)
fm2 <- ivreg.EX(log(packs) ~ log(rprice) + log(rincome) | tdiff + log(rincome),
data = CigarettesSW, subset = year == "1995")
lmfit <- lm(log(packs) ~ log(rprice) + log(rincome), data = CigarettesSW, subset = year == "1995")
coeftestIV(fm2, lmfit, 'log(rprice)')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.