PoissonRE {PanelCount}R Documentation

A Poisson Model with Random Effects

Description

Estimate a Poisson model with random effects at the individual level.

E[y_{it}|x_{it},v_i] = exp(\boldsymbol{\beta}\mathbf{x_{it}}' + \sigma v_i)

Notations:

Usage

PoissonRE(
  formula,
  data,
  id.name,
  par = NULL,
  sigma = NULL,
  method = "BFGS",
  stopUpdate = FALSE,
  se_type = c("Hessian", "BHHH")[1],
  H = 20,
  reltol = sqrt(.Machine$double.eps),
  verbose = 0
)

Arguments

formula

Formula of the model

data

Input data, a data.frame object

id.name

The name of the column representing id. Data will be sorted by id to improve estimation speed.

par

Starting values for estimates. Default to estimates of Poisson Model

sigma

Starting value for sigma. Defaults to 1 and will be ignored if par is provided.

method

Optimization method used by optim. Defaults to 'BFGS'.

stopUpdate

Whether to disable update of Adaptive Gaussian Quadrature parameters. Defaults to FALSE.

se_type

Report Hessian or BHHH standard errors. Defaults to Hessian.

H

Number of Quadrature points used for numerical integration using the Gaussian-Hermite Quadrature method. Defaults to 20.

reltol

Relative convergence tolerance. The algorithm stops if it is unable to reduce the value by a factor of reltol * (abs(val) + reltol) at a step. Defaults to sqrt(.Machine$double.eps), typically about 1e-8.

verbose

A integer indicating how much output to display during the estimation process.

  • <0 - No ouput

  • 0 - Basic output (model estimates)

  • 1 - Moderate output, basic ouput + parameter and likelihood in each iteration

  • 2 - Extensive output, moderate output + gradient values on each call

Value

A list containing the results of the estimated model, some of which are inherited from the return of optim

References

  1. Peng, J., & Van den Bulte, C. (2023). Participation vs. Effectiveness in Sponsored Tweet Campaigns: A Quality-Quantity Conundrum. Management Science (forthcoming). Available at SSRN: https://www.ssrn.com/abstract=2702053

  2. Peng, J., & Van den Bulte, C. (2015). How to Better Target and Incent Paid Endorsers in Social Advertising Campaigns: A Field Experiment. 2015 International Conference on Information Systems. https://aisel.aisnet.org/icis2015/proceedings/SocialMedia/24/

See Also

Other PanelCount: PLN_RE(), ProbitRE_PLNRE(), ProbitRE_PoissonRE(), ProbitRE()

Examples

# Use the simulated dataset, in which the true coefficient of x is 1.
# Estimated coefficient is biased primarily due to omission of self-selection
data(sim)
res = PoissonRE(y~x, data=sim[!is.na(sim$y), ], id.name='id', verbose=-1)
res$estimates

[Package PanelCount version 2.0.1 Index]