help xtmrho
-------------------------------------------------------------------------------

Title

xtmrho - Computes intraclass correlations, median odds ratios and median incidence rate ratios after xtmixed, xtmelogit, xtmepoisson

Syntax

(xtmixed, xtmelogit or xtmepoisson regression)

. xtmrho

Description

xtmrho is a convenient way to compute intra class correlations (ICC), median odds ratios (MOR) and median incidence rate ratios (MIRR) after xtmixed, xtmepoisson and xtmelogit.

It uses the most recently fitted modell to compute intra correlations for all levels automatically. For each level it stores scalars (help scalar, ereturn) for ICC e(rho'level'), MOR e(mor'level') or MIRR e(mirr'level') as well as a scalar for the total variance on the level e(u'level').

Its results can be used for estimates table or estout (if installed).

Options

(no options are supported)

Example

. use http://www.stata-press.com/data/r9/productivity.dta

. xtmixed gsp private emp hwy water other unemp || region: || state:

(output omitted)

. xtmrho

Levels: region state

Intra class correlation on level 1 rho = .19561036 Intra class correlation on level 2 rho = .66469224

. gen gsp_l9 = gsp<9

. xtmelogit gsp_l9 private emp hwy water other unemp || region: || state:

(output omitted)

. xtmrho

Levels: region state

level 1: Intraclass correlation (ICC): rho1 = 0.00000 Median Odds Ratio (MOR): mor1 = 1.00000

level 2: Intraclass correlation (ICC): rho2 = 0.71714 Median Odds Ratio (MOR): mor2 = 15.71828

. xtile gsp_nq4 = gsp, nq(4)

. xtmepoisson gsp_nq4 private emp hwy water other unemp || region: || state:

(output omitted)

. xtmrho

Levels: region state

level 1: Median Incidence Rate Ratio (MIRR): MIRR1 = 1.00000

level 2: Median Incidence Rate Ratio (MIRR): MIRR2 = 1.03960

. est tab , stat(mirr1 mirr2) stfmt(%4.3f) b(%3.2f) eform

------------------------ Variable | active -------------+---------- eq1 | private | 1.12 emp | 1.50 hwy | 0.90 water | 1.04 other | 0.97 unemp | 1.00 _cons | 0.10 -------------+---------- lns1_1_1 | _cons | 0.00 -------------+---------- lns2_1_1 | _cons | 0.04 -------------+---------- Statistics | mirr1 | 1.000 mirr2 | 1.040 ------------------------

(end)

References

Hox J (2002) Multilevel Analyses. Techniques and Applications. Lawrence Erlbaum Associates, New Jersey. pp.31.

Larsen K and Merlo J (2005). Appropriate Assessment of Neighborhood Effects on Individual Health: Integrating Random and Fixed Effects in Multilevel Logist > ic Regression. American Journal of Epidemiology 161 (1). p.81-88.

Rabe-Hesketh S, Skrondal A (2008). Multilevel and Longitudinal Modeling using S > tata. 2nd Edition. College Station, TX: Stata Press Publication.

Snijders TAB, Bosker RJ (1999). Multilevel analysis: an introduction to basic a > nd advanced multilevel modeling, 1st ed. Thousand Oaks, CA: Sage.

Methods and formulas

Intraclass-Correlation after xtmixed (cf. Snijders 1999):

ICC = AREA LEVEL VARIANCE / TOTAL VARIANCE

Intraclass-Correlation after xtmelogit (cf. Snijders 1999):

ICC = AREA LEVEL VARIANCE / (SUM OF AREA LEVEL VARIANCES + (c(pi)^2)/3)

Median Odds Ratio after xtmelogit (cf. Larsen and Merlo 2002):

MOR = exp(sqrt(2*AREA LEVEL VARIANCE))*invnormal(0.75))

Median Incedence Rate Ratio after xtmepoisson (cf. Rabe-Hesketh and Skrondal 2 > 008):

MIRR = exp(sqrt(2*AREA LEVEL VARIANCE))*invnormal(0.75))

Author

Lars E. Kroll, email http://www.lkroll.de

Also see

Manual: [XT] xtmixed, [XT] xtmelogit, [XT] xtmepoisson

Online: xtmixed, xtmelogit, xtmepoisson, estimates