meglm postestimation - Stata

meglm postestimation - Stata meglm postestimation - Stata

29.07.2014 Views

14 meglm postestimation — Postestimation tools for meglm cov(ũ j |y j , X j , Z j ; ̂θ) = ∫R q (u j − ũ j )(u j − ũ j ) ′ ω(u j |y j , X j , Z j ; ̂θ) duj The posterior covariance matrix and the integrals are approximated by the mean–variance adaptive Gaussian quadrature; see Methods and formulas of [ME] meglm for details about the quadrature. Conditional standard errors for the estimated posterior modes are derived from standard theory of maximum likelihood, which dictates that the asymptotic variance matrix of ũ j is the negative inverse of the Hessian, g ′′ (β, Σ, ũ j ). In what follows, we show formulas using the posterior means estimates of random effects ũ j , which are used by default or if the means option is specified. If the modes option is specified, ũ j are simply replaced with the posterior modes ũ j in these formulas. For any ith observation in the jth cluster in a two-level model, define the linear predictor as ̂η ij = x ij ̂β + zij ũ j The linear predictor includes the offset or exposure variable if one was specified during estimation, unless the nooffset option is specified. If the fixedonly option is specified, ̂η contains the linear predictor for only the fixed portion of the model, ̂η ij = x ij ̂β. The predicted mean, conditional on the random effects ũ j , is ̂µ ij = g −1 (̂η ij ) where g −1 (·) is the inverse link function for µ ij = g −1 (η ij ) defined as follows for the available links in link(link): link Inverse link identity η ij logit 1/{1 + exp(−η ij )} probit Φ(η ij ) log exp(η ij ) cloglog 1 − exp{− exp(η ij )} By default, random effects and any statistic based on them—mu, fitted, pearson, deviance, anscombe—are calculated using posterior means of random effects unless option modes is specified, in which case the calculations are based on posterior modes of random effects. Raw residuals are calculated as the difference between the observed and fitted outcomes, and are only defined for the Gaussian family. ν ij = y ij − ̂µ ij Let r ij be the number of Bernoulli trials in a binomial model, α be the conditional overdispersion parameter under the mean parameterization of the negative binomial model, and δ be the conditional overdispersion parameter under the constant parameterization of the negative binomial model.

meglm postestimation — Postestimation tools for meglm 15 Pearson residuals are raw residuals divided by the square root of the variance function ν P ij = ν ij {V (̂µ ij )} 1/2 where V (̂µ ij ) is the family-specific variance function defined as follows for the available families in family(family): family Variance function V (̂µ ij ) bernoulli ̂µ ij (1 − ̂µ ij ) binomial ̂µ ij (1 − ̂µ ij /r ij ) ̂µ 2 ij gamma gaussian 1 nbinomial mean ̂µ ij (1 + α̂µ ij ) nbinomial constant ̂µ ij (1 + δ) ordinal not defined poisson ̂µ ij

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

cov(ũ j |y j , X j , Z j ; ̂θ) =<br />

∫R q (u j − ũ j )(u j − ũ j ) ′ ω(u j |y j , X j , Z j ; ̂θ) duj<br />

The posterior covariance matrix and the integrals are approximated by the mean–variance adaptive<br />

Gaussian quadrature; see Methods and formulas of [ME] <strong>meglm</strong> for details about the quadrature.<br />

Conditional standard errors for the estimated posterior modes are derived from standard theory of<br />

maximum likelihood, which dictates that the asymptotic variance matrix of ũ j is the negative inverse<br />

of the Hessian, g ′′ (β, Σ, ũ j ).<br />

In what follows, we show formulas using the posterior means estimates of random effects ũ j ,<br />

which are used by default or if the means option is specified. If the modes option is specified, ũ j<br />

are simply replaced with the posterior modes ũ j in these formulas.<br />

For any ith observation in the jth cluster in a two-level model, define the linear predictor as<br />

̂η ij = x ij ̂β + zij ũ j<br />

The linear predictor includes the offset or exposure variable if one was specified during estimation,<br />

unless the nooffset option is specified. If the fixedonly option is specified, ̂η contains the linear<br />

predictor for only the fixed portion of the model, ̂η ij = x ij ̂β.<br />

The predicted mean, conditional on the random effects ũ j , is<br />

̂µ ij = g −1 (̂η ij )<br />

where g −1 (·) is the inverse link function for µ ij = g −1 (η ij ) defined as follows for the available<br />

links in link(link):<br />

link Inverse link<br />

identity η ij<br />

logit 1/{1 + exp(−η ij )}<br />

probit Φ(η ij )<br />

log exp(η ij )<br />

cloglog 1 − exp{− exp(η ij )}<br />

By default, random effects and any statistic based on them—mu, fitted, pearson, deviance,<br />

anscombe—are calculated using posterior means of random effects unless option modes is specified,<br />

in which case the calculations are based on posterior modes of random effects.<br />

Raw residuals are calculated as the difference between the observed and fitted outcomes,<br />

and are only defined for the Gaussian family.<br />

ν ij = y ij − ̂µ ij<br />

Let r ij be the number of Bernoulli trials in a binomial model, α be the conditional overdispersion<br />

parameter under the mean parameterization of the negative binomial model, and δ be the conditional<br />

overdispersion parameter under the constant parameterization of the negative binomial model.

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

Saved successfully!

Ooh no, something went wrong!