meglm postestimation - Stata

meglm postestimation - Stata meglm postestimation - Stata

29.07.2014 Views

16 meglm postestimation — Postestimation tools for meglm Deviance residuals are calculated as ν D ij = sign(ν ij )√ ̂d 2 ij where the squared deviance residual ̂d 2 ij is defined as follows: family Squared deviance ̂d 2 ij bernoulli −2 log(1 − ̂µ ij ) if y ij = 0 binomial gamma −2 log(̂µ ij ) if y ij = 1 ( rij 2r ij log ( yij 2y ij log r ij − ̂µ ij ) ( ) rij 2r ij log ̂µ ij if y ij = 0 ̂µ ij ) + 2(r ij − y ij ) log if y ij = r ij { ( ) yij −2 log − ̂ν } ij ̂µ ij ̂µ ij ( ) rij − y ij r ij − ̂µ ij if 0 < y ij < r ij gaussian ̂ν 2 ij nbinomial mean 2 log (1 + α̂µ ij ) α if y ij = 0 ( ) ( ) yij 1 + 2y ij log − ̂µ 2 ij α (1 + αy αyij ij) log 1 + α̂µ ij otherwise nbinomial constant ordinal not defined not defined poisson 2̂µ ij if y ij = 0 2y ij log ( yij ̂µ ij ) − 2̂ν ij otherwise

meglm postestimation — Postestimation tools for meglm 17 Anscombe residuals, denoted νij A , are calculated as follows: family bernoulli binomial gamma gaussian nbinomial mean nbinomial constant ordinal poisson Anscombe residual νij A { } 3 y 2/3 ij H(y ij ) − ̂µ 2/3 ij H(̂µ ij) ) 1/6 2 (̂µ ij − ̂µ 2 ij { } 3 y 2/3 ij H(y ij /r ij ) − ̂µ 2/3 ij H(̂µ ij/r ij ) 3(y 1/3 ij − ̂µ 1/3 ij ) ̂µ 1/3 ij ν ij 2 (̂µ ij − ̂µ 2 ij/r ij ) 1/6 H(−αy ij ) − H(−α̂µ ij ) + 1.5(y 2/3 ij − ̂µ 2/3 ij ) (̂µ ij + α̂µ 2 ij) 1/6 not defined not defined 3(y 2/3 ij − ̂µ 2/3 ij ) 2̂µ 1/6 ij where H(t) is a specific univariate case of the Hypergeometric2F1 function (Wolfram 1999, 771–772), defined here as H(t) = 2 F 1 (2/3, 1/3, 5/3, t). For a discussion of the general properties of the various residuals, see Hardin and Hilbe (2012, chap. 4). References Hardin, J. W., and J. M. Hilbe. 2012. Generalized Linear Models and Extensions. 3rd ed. College Station, TX: Stata Press. McCullagh, P., and J. A. Nelder. 1989. Generalized Linear Models. 2nd ed. London: Chapman & Hall/CRC. Skrondal, A., and S. Rabe-Hesketh. 2004. Generalized Latent Variable Modeling: Multilevel, Longitudinal, and Structural Equation Models. Boca Raton, FL: Chapman & Hall/CRC. . 2009. Prediction in multilevel generalized linear models. JRSSA 172: 659–687. Wolfram, S. 1999. The Mathematica Book. 4th ed. Cambridge: Cambridge University Press. Also see [ME] meglm — Multilevel mixed-effects generalized linear model [U] 20 Estimation and postestimation commands

16 <strong>meglm</strong> <strong>postestimation</strong> — Postestimation tools for <strong>meglm</strong><br />

Deviance residuals are calculated as<br />

ν D ij = sign(ν ij )√<br />

̂d<br />

2<br />

ij<br />

where the squared deviance residual ̂d 2 ij<br />

is defined as follows:<br />

family<br />

Squared deviance ̂d 2 ij<br />

bernoulli −2 log(1 − ̂µ ij ) if y ij = 0<br />

binomial<br />

gamma<br />

−2 log(̂µ ij ) if y ij = 1<br />

(<br />

rij<br />

2r ij log<br />

(<br />

yij<br />

2y ij log<br />

r ij − ̂µ ij<br />

)<br />

( )<br />

rij<br />

2r ij log<br />

̂µ ij<br />

if y ij = 0<br />

̂µ ij<br />

)<br />

+ 2(r ij − y ij ) log<br />

if y ij = r ij<br />

{ ( )<br />

yij<br />

−2 log − ̂ν }<br />

ij<br />

̂µ ij ̂µ ij<br />

( )<br />

rij − y ij<br />

r ij − ̂µ ij<br />

if 0 < y ij < r ij<br />

gaussian<br />

̂ν 2 ij<br />

nbinomial mean 2 log (1 + α̂µ ij ) α if y ij = 0<br />

( )<br />

( )<br />

yij<br />

1 +<br />

2y ij log −<br />

̂µ 2 ij<br />

α (1 + αy αyij<br />

ij) log<br />

1 + α̂µ ij<br />

otherwise<br />

nbinomial constant<br />

ordinal<br />

not defined<br />

not defined<br />

poisson 2̂µ ij if y ij = 0<br />

2y ij log<br />

(<br />

yij<br />

̂µ ij<br />

)<br />

− 2̂ν ij<br />

otherwise

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!