meglm postestimation - Stata
meglm postestimation - Stata
meglm postestimation - Stata
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
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