The summary currently doesn't provide this feature. But you can use
something like coeftest(obj)[1:3,] or coeftest(obj)["myreg",] or
something like that...
(sent from mobile phone)
-------- Original message --------
From: Ignacio Martinez <ignacio82@gmail.com>
Date:
To: Achim Zeileis <Achim.Zeileis@uibk.ac.at>
Cc: r-help <r-help@r-project.org>
Subject: Re: [R] ivreg with fixed effect in R?
Thanks.
One more question. When I do summary to see the coefficients how can i tell R to
print just some of the coefficients?
Thanks again
On Sat, Oct 19, 2013 at 7:29 AM, Achim Zeileis <Achim.Zeileis@uibk.ac.at>
wrote:
On Sat, 19 Oct 2013, Ignacio Martinez wrote:
I want to estimate the following fixed effect model:
y_i,t = alpha_i + beta_1 x1_t + beta_2 x2_i,tx2_i,t = gamma_i + gamma_1
x1_t + gamma_2 Z1_i + gamma_3 Z2_i
I can use ivreg from AER to do the iv regression.
fm <- ivreg(y_i,t ~ x1_t + x2_i,t | x1_t + Z1_i + Z2_i,
data = DataSet)
But, I'm not sure how can I add the fixed effects.
You can simply add a factor coding the variable with respect to which you want
to compute fixed effects. In help("Fatalities", package =
"AER") there is an example (starting with "pp. 360") that
shows how to do this for OLS. In principle, the same approach can be used for
IV.
Thanks!
[[alternative HTML version deleted]]
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]