Robust Standard Errors: Poisson Panel Regression (pglm, lmtest)
up vote
0
down vote
favorite
As a non-statistician I reached my limit here:
I try to fit a Poisson model for panel data (using pglm
) and I want to calculate robust standard errors (using lmtest
).
My code currently looks like this:
#poisson model (panel with year fixed effects):
poisson_model <- pglm(y ~ a + b + c + factor(year), data = regression_data,
model = "pooling", family = poisson, index = c("ID", "year"))
#robust standard errors:
robust_SE_model <- coeftest(poisson_model, vcov. = vcovHC(poisson_model, type = "HC1"))
This code works fine for one of my other model specifications when I fit a regular panel model with plm
, but when I try the poisson model with pglm
I receive the following error message:
Error in terms.default(object) : no terms component nor attribute
Is this due to a limitation of the lmtest
package or am I making a mistake here? I really hope I can solve the problem using packages (not necessarily pglm
and lmtest
) and don't have to dive into manual calculation of robust errors.
Any help is highly appreciated!
r panel poisson robust
add a comment |
up vote
0
down vote
favorite
As a non-statistician I reached my limit here:
I try to fit a Poisson model for panel data (using pglm
) and I want to calculate robust standard errors (using lmtest
).
My code currently looks like this:
#poisson model (panel with year fixed effects):
poisson_model <- pglm(y ~ a + b + c + factor(year), data = regression_data,
model = "pooling", family = poisson, index = c("ID", "year"))
#robust standard errors:
robust_SE_model <- coeftest(poisson_model, vcov. = vcovHC(poisson_model, type = "HC1"))
This code works fine for one of my other model specifications when I fit a regular panel model with plm
, but when I try the poisson model with pglm
I receive the following error message:
Error in terms.default(object) : no terms component nor attribute
Is this due to a limitation of the lmtest
package or am I making a mistake here? I really hope I can solve the problem using packages (not necessarily pglm
and lmtest
) and don't have to dive into manual calculation of robust errors.
Any help is highly appreciated!
r panel poisson robust
1
As far as I can decipher from?pglm
, the library does not support sandwich error matrices. cran.r-project.org/web/packages/poisFErobust/index.html or cran.r-project.org/web/packages/glmmML might be useful.
– Otto Kässi
Nov 9 at 12:15
@OttoKässi Thanks, that was indeed the problem. The packages you mention will help me for sure. The whole robust errors for models which are non-linear in the parameters topic is a highly controversial one, which I was not completely aware of so far. So applying robust errors if there is heteroscedasticity does not cure any problems obviously: davegiles.blogspot.com/2013/05/…
– sspade
Nov 22 at 9:29
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
As a non-statistician I reached my limit here:
I try to fit a Poisson model for panel data (using pglm
) and I want to calculate robust standard errors (using lmtest
).
My code currently looks like this:
#poisson model (panel with year fixed effects):
poisson_model <- pglm(y ~ a + b + c + factor(year), data = regression_data,
model = "pooling", family = poisson, index = c("ID", "year"))
#robust standard errors:
robust_SE_model <- coeftest(poisson_model, vcov. = vcovHC(poisson_model, type = "HC1"))
This code works fine for one of my other model specifications when I fit a regular panel model with plm
, but when I try the poisson model with pglm
I receive the following error message:
Error in terms.default(object) : no terms component nor attribute
Is this due to a limitation of the lmtest
package or am I making a mistake here? I really hope I can solve the problem using packages (not necessarily pglm
and lmtest
) and don't have to dive into manual calculation of robust errors.
Any help is highly appreciated!
r panel poisson robust
As a non-statistician I reached my limit here:
I try to fit a Poisson model for panel data (using pglm
) and I want to calculate robust standard errors (using lmtest
).
My code currently looks like this:
#poisson model (panel with year fixed effects):
poisson_model <- pglm(y ~ a + b + c + factor(year), data = regression_data,
model = "pooling", family = poisson, index = c("ID", "year"))
#robust standard errors:
robust_SE_model <- coeftest(poisson_model, vcov. = vcovHC(poisson_model, type = "HC1"))
This code works fine for one of my other model specifications when I fit a regular panel model with plm
, but when I try the poisson model with pglm
I receive the following error message:
Error in terms.default(object) : no terms component nor attribute
Is this due to a limitation of the lmtest
package or am I making a mistake here? I really hope I can solve the problem using packages (not necessarily pglm
and lmtest
) and don't have to dive into manual calculation of robust errors.
Any help is highly appreciated!
r panel poisson robust
r panel poisson robust
asked Nov 9 at 10:53
sspade
213
213
1
As far as I can decipher from?pglm
, the library does not support sandwich error matrices. cran.r-project.org/web/packages/poisFErobust/index.html or cran.r-project.org/web/packages/glmmML might be useful.
– Otto Kässi
Nov 9 at 12:15
@OttoKässi Thanks, that was indeed the problem. The packages you mention will help me for sure. The whole robust errors for models which are non-linear in the parameters topic is a highly controversial one, which I was not completely aware of so far. So applying robust errors if there is heteroscedasticity does not cure any problems obviously: davegiles.blogspot.com/2013/05/…
– sspade
Nov 22 at 9:29
add a comment |
1
As far as I can decipher from?pglm
, the library does not support sandwich error matrices. cran.r-project.org/web/packages/poisFErobust/index.html or cran.r-project.org/web/packages/glmmML might be useful.
– Otto Kässi
Nov 9 at 12:15
@OttoKässi Thanks, that was indeed the problem. The packages you mention will help me for sure. The whole robust errors for models which are non-linear in the parameters topic is a highly controversial one, which I was not completely aware of so far. So applying robust errors if there is heteroscedasticity does not cure any problems obviously: davegiles.blogspot.com/2013/05/…
– sspade
Nov 22 at 9:29
1
1
As far as I can decipher from
?pglm
, the library does not support sandwich error matrices. cran.r-project.org/web/packages/poisFErobust/index.html or cran.r-project.org/web/packages/glmmML might be useful.– Otto Kässi
Nov 9 at 12:15
As far as I can decipher from
?pglm
, the library does not support sandwich error matrices. cran.r-project.org/web/packages/poisFErobust/index.html or cran.r-project.org/web/packages/glmmML might be useful.– Otto Kässi
Nov 9 at 12:15
@OttoKässi Thanks, that was indeed the problem. The packages you mention will help me for sure. The whole robust errors for models which are non-linear in the parameters topic is a highly controversial one, which I was not completely aware of so far. So applying robust errors if there is heteroscedasticity does not cure any problems obviously: davegiles.blogspot.com/2013/05/…
– sspade
Nov 22 at 9:29
@OttoKässi Thanks, that was indeed the problem. The packages you mention will help me for sure. The whole robust errors for models which are non-linear in the parameters topic is a highly controversial one, which I was not completely aware of so far. So applying robust errors if there is heteroscedasticity does not cure any problems obviously: davegiles.blogspot.com/2013/05/…
– sspade
Nov 22 at 9:29
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53224319%2frobust-standard-errors-poisson-panel-regression-pglm-lmtest%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
As far as I can decipher from
?pglm
, the library does not support sandwich error matrices. cran.r-project.org/web/packages/poisFErobust/index.html or cran.r-project.org/web/packages/glmmML might be useful.– Otto Kässi
Nov 9 at 12:15
@OttoKässi Thanks, that was indeed the problem. The packages you mention will help me for sure. The whole robust errors for models which are non-linear in the parameters topic is a highly controversial one, which I was not completely aware of so far. So applying robust errors if there is heteroscedasticity does not cure any problems obviously: davegiles.blogspot.com/2013/05/…
– sspade
Nov 22 at 9:29