| Type: | Package |
| Title: | Poisson Fixed Effects Robust |
| Version: | 2.0.1 |
| Date: | 2026-08-31 |
| Description: | Computation of robust standard errors of Poisson fixed effects models, following Wooldridge (1999). |
| License: | MIT + file LICENSE |
| Depends: | R (≥ 3.1.0) |
| Imports: | data.table (≥ 1.9.6), glmmML (≥ 1.0) |
| URL: | https://bitbucket.org/ew-btb/poisson-fe-robust |
| NeedsCompilation: | no |
| Suggests: | testthat |
| LazyData: | true |
| Packaged: | 2026-09-01 02:54:54 UTC; root |
| Author: | Evan Wright [aut, cre] |
| Maintainer: | Evan Wright <enwright@umich.edu> |
| Repository: | CRAN |
| Date/Publication: | 2026-09-01 07:20:02 UTC |
Poisson Fixed Effects Robust
Description
Computation of robust standard errors of Poisson fixed effects models, following Wooldridge (1999).
Details
The DESCRIPTION file:
| Package: | poisFErobust |
| Type: | Package |
| Title: | Poisson Fixed Effects Robust |
| Version: | 2.0.1 |
| Date: | 2026-08-31 |
| Authors@R: | person("Evan", "Wright", email = "enwright@umich.edu", role = c("aut", "cre")) |
| Description: | Computation of robust standard errors of Poisson fixed effects models, following Wooldridge (1999). |
| License: | MIT + file LICENSE |
| Depends: | R (>= 3.1.0) |
| Imports: | data.table (>= 1.9.6), glmmML (>= 1.0) |
| URL: | https://bitbucket.org/ew-btb/poisson-fe-robust |
| NeedsCompilation: | no |
| Suggests: | testthat |
| LazyData: | true |
| Author: | Evan Wright [aut, cre] |
| Maintainer: | Evan Wright <enwright@umich.edu> |
Index of help topics:
ex.dt.bad Poisson data violating conditional mean
assumption
ex.dt.good Poisson data satisfying conditional mean
assumption
pois.fe.robust Robust standard errors of Poisson fixed effects
regression
poisFErobust-package Poisson Fixed Effects Robust
Author(s)
Evan Wright [aut, cre]
Maintainer: Evan Wright <enwright@umich.edu>
References
Wooldridge, Jeffrey M. (1999): "Distribution-free estimation of some nonlinear panel data models," Journal of Econometrics, 90, 77-97.
Examples
# ex.dt.good satisfies the conditional mean assumption
data("ex.dt.good")
pois.fe.robust(outcome = "y", xvars = c("x1", "x2"), group.name = "id",
index.name = "day", data = ex.dt.good)
# ex.dt.bad violates the conditional mean assumption
data("ex.dt.bad")
pois.fe.robust(outcome = "y", xvars = c("x1", "x2"), group.name = "id",
index.name = "day", data = ex.dt.bad)
Poisson data violating conditional mean assumption
Description
A data.table containing id by day observations of Poisson
random variables which violate the conditional mean assumption of
Wooldridge (1999).
Usage
data("ex.dt.bad")
Format
A data.table with 450 observations on the following 7 variables.
ida factor with levels
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950daya numeric vector
fea numeric vector
x1a numeric vector
x2a numeric vector
ya numeric vector
x1.leada numeric vector
Details
The data were simulated like
y <- rpois(1, exp(fe + x1 + x2 + 2.5*x1.lead))
where fe, x1, and x2 are standard normal random variables.
fe varies only across id.
x1.lead is a one period lead of x1 which causes the violation
of the conditional mean assumption.
References
Wooldridge, Jeffrey M. (1999): "Distribution-free estimation of some nonlinear panel data models," Journal of Econometrics, 90, 77-97.
Examples
data("ex.dt.bad")
str(ex.dt.bad)
Poisson data satisfying conditional mean assumption
Description
A data.table containing id by day observations of Poisson
random variables which satisfy the conditional mean assumption of
Wooldridge (1999).
Usage
data("ex.dt.good")
Format
A data frame with 500 observations on the following 6 variables.
ida factor with levels
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950daya numeric vector
fea numeric vector
x1a numeric vector
x2a numeric vector
ya numeric vector
Details
The data were simulated like
y <- rpois(1, exp(fe + x1 + x2))
where fe, x1, and x2 are standard normal random variables.
fe varies only across id.
References
Wooldridge, Jeffrey M. (1999): "Distribution-free estimation of some nonlinear panel data models," Journal of Econometrics, 90, 77-97.
Examples
data("ex.dt.good")
str(ex.dt.good)
Robust standard errors of Poisson fixed effects regression
Description
Compute standard errors following Wooldridge (1999) for Poisson regression with fixed effects, and a hypothesis test of the conditional mean assumption (3.1).
Usage
pois.fe.robust(outcome, xvars, group.name, data,
qcmle.coefs = NULL, allow.set.key = FALSE,
index.name = NULL)
Arguments
outcome |
character string of the name of the dependent variable. |
xvars |
vector of character strings of the names of the independent variables. |
group.name |
character string of the name of the grouping variable. |
data |
data.table which contains the variables named in other arguments. See details for variable type requirements. |
qcmle.coefs |
an optional numeric vector of coefficients in the same order as |
allow.set.key |
logical. When |
index.name |
DEPRECATED (leave as NULL). |
Details
data must be a data.table containing the following:
- a column named by
outcome non-negative integer
- columns named according to each string in
xvars numeric type
- a column named by
group.name factor type
- a column named by
index.name integer sequence increasing by one each observation with no gaps within groups
No observation in data may contain a missing value.
Setting allow.set.key to TRUE is recommended to reduce
memory usage; however, it will allow data to be modified
(sorted in-place).
pois.fe.robust also returns the p-value of the hypothesis test of the
conditional mean assumption (3.1) as described in Wooldridge (1999) section 3.3.
Value
A list containing:
coefficients |
a numeric vector of coefficients. |
se.robust |
a numeric vector of standard errors. |
p.value |
the p-value of a hypothesis test of the conditional mean assumption (3.1). |
Author(s)
Evan Wright
References
Wooldridge, Jeffrey M. (1999): "Distribution-free estimation of some nonlinear panel data models," Journal of Econometrics, 90, 77-97.
See Also
Examples
# ex.dt.good satisfies the conditional mean assumption
data("ex.dt.good")
pois.fe.robust(outcome = "y", xvars = c("x1", "x2"), group.name = "id",
index.name = "day", data = ex.dt.good)
# ex.dt.bad violates the conditional mean assumption
data("ex.dt.bad")
pois.fe.robust(outcome = "y", xvars = c("x1", "x2"), group.name = "id",
index.name = "day", data = ex.dt.bad)