| pois.fe.robust {poisFErobust} | R Documentation |
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 integercolumns named according to each string in
xvars, numeric typea column named by
group.name, factor typea 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)