PLN_RE: A Poisson Lognormal Model with Random Effects

Description Usage Arguments Value References See Also Examples

View source: R/PLN_RE.R

Description

Estimate a Poisson Lognormal model with random effects in panel counting data. This model accounts for heterogeneity on the individual level, and heterogeneity on the <individual, time> level.

Usage

1
2
3
4
PLN_RE(formula, id, data = NULL, par = NULL, gamma = 1, max_gamma = 5,
  sigma = 1, max_sigma = 3, method = "BFGS", lower = NULL,
  upper = NULL, H = 20, psnH = 20, accu = 10, reltol = 1e-08,
  verbose = 0, tol_gtHg = Inf)

Arguments

formula

Formula of the model

id

A vector that represents the identity of individuals, numeric or character

data

Input data, a data frame

par

Starting values for estimates

gamma

Variance of random effects on the <individual, time> level for PLN_RE

max_gamma

Largest allowed initial gamma

sigma

Variance of random effects on the individual level for PLN_RE

max_sigma

Largest allowed initial sigma

method

Searching algorithm, don't change default unless you know what you are doing

lower

Lower bound for estiamtes

upper

Upper bound for estimates

H

A vector of length 2, specifying the number of points for inner and outer Quadratures

psnH

Number of Quadrature points for Poisson RE model

accu

L-BFGS-B only, 1e12 for low accuracy; 1e7 for moderate accuracy; 10.0 for extremely high accuracy. See optim

reltol

Relative convergence tolerance. default typically 1e-8

verbose

Level of output during estimation. Lowest is 0.

tol_gtHg

tolerance on gtHg, not informative for L-BFGS-B

Value

A list containing the results of the estimated model

References

1. Jing Peng and Christophe Van den Bulte. Participation vs. Effectiveness of Paid Endorsers in Social Advertising Campaigns: A Field Experiment. Working Paper.

2. Jing Peng and Christophe Van den Bulte. How to Better Target and Incent Paid Endorsers in Social Advertising Campaigns: A Field Experiment. In Proceedings of the 2015 International Conference on Information Systems.

See Also

Other PanelCount: CRE_SS; CRE; PoissonRE; ProbitRE

Examples

1
2
3
4
data(rt)
est = PLN_RE(num.words~fans+tweets+as.factor(tweet.id),
              id=rt$user.id[rt$isRetweet==1],
              data=rt[rt$isRetweet==1,])

PanelCount documentation built on May 2, 2019, 3:21 p.m.