[R] Are fitted.values available in pglm?
bgunter@4567 @end|ng |rom gm@||@com
Fri Apr 12 16:44:36 CEST 2019
## This is what one usually does, but I have not checked pglm.
You also need to get friendly with ?str
... and probably also spend time with an R tutorial or two to become
familiar with R modeling conventions.
"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Fri, Apr 12, 2019 at 7:35 AM Simon Berrebi <simon using berrebi.net> wrote:
> Hello everyone,
> I am using the pglm function in R to fit a Poisson fixed-effects model.
> According to the documentation <
> https://cran.r-project.org/web/packages/pglm/pglm.pdf>, the pglm object
> should have fitted.values. However, fitted.values(mymodel) returns "NULL".
> When I run AIC(mymodel) the AIC is followed by "attr(,"fitted.values")"
> and a long list of number. I have included an example below and attached a
> text file with the output.
> Are these fitted values? If so, is there a way to obtain them directly?
> Can I also get fitted-values based on a synthetic dataset (i.e. predict())?
> data("PatentsRDUS", package="pglm")
> mymodel <- pglm(patents ~ log(rd) + as.numeric(year)+
> I(log(capital72)*as.numeric(year)) , PatentsRDUS,
> family = poisson(link=log), model = "within", index = c("cusip",
> Dr. Simon J Berrebi
> Postdoctoral Fellow
> Civil and Environmental Engineering
> Georgia Institute of Technology
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]
More information about the R-help