------------------------------------------------------------------------------- helpmlt2stageKatja Moehring and Alexander Schmidt -------------------------------------------------------------------------------

Produces two-stage (or slopes as outcomes) results for linear and logistic regr> ession models (beta version)Syntax

mlt2stage yvar xvar(s) [if] [weight], l2id(varname)[drop] [logit] [taboff]

mlt2stageis part of themlt(multilevel tools) package.

Description

mlt2stageis an easy way to produce two-stage results. It calculates separate linear or logit regression models onyvarfor each level2-unitl2id(varname), displays the results as table and stores the coefficients of the independent variables (xvar(s)). Thelogitoption allows calculating logistic regression models.

mlt2stagecan be used together withmltl2scatterto produce two-stage plots of the estimated single country regression coefficients of a lower-level variable over a higher-level variable. See Mood (2010) for the comparison of logit models based on different samples.

mlt2stageallows to specify a weight for the units at the lower level.aweights,fweightsandiweightsare allowed. See the help forregressandlogitto read how these weights are treated.

Options

dropcoefficients are not stored,mlt2stageonly produces an output table.

logitcalculates logistic instead of linear regression models.

taboffno output table is shown,mlt2stageonly stores the coefficients. This option is recommended if a large number of xvars is specified.

Examples

A simple two-stage plotLoad data set (ISSP 2006)

. webuse redistribution.dtaRegress "Support for income redistribution" on age and sex

. mlt2stage gr_incdiff age sex, l2id(Country)Scatter plot showing the association between the (age- and sex-adjusted) level of support for redistribution and economic inequality (gini)

. mltl2scatter cons_gr_incdiff gini, l2id(Country) labels qfit

Using mlt2stage for a graphic inspection of a multilevel model withcross-level interactionsLoad data set (ISSP 2006)

. net get mlt. use redistribution.dtaA multilevel regression of "Support for income redistribution" on income, age, gender and economic inequality (gini)

. xtmixed gr_incdiff incperc age sex gini ia_gini_incperc || Country:incperc, mle var cov(un)The model gives a significant interaction effect between the country-level variable economic inequality (gini) and the individual-level variable income (cross-level interaction). The model suggests that the negative effect of income becomes weaker if inequality is higher. Is this a robust result? Let's use mlt2stage!

Regress "Support for income redistribution" on all individual-level variables (income, age and sex)

. mlt2stage gr_incdiff incperc age sex, l2id(Country)Scatter plot showing the association between the slope of income and the country-level variable economic inequality (gini)

. mltl2scatter coef_gr_incdiff_incperc gini, l2id(Country) labels qfitBy plotting the estimated slopes of income against the country-level variable we can visualize the interaction effect. It seems that there is a particular country which is responsible for the positive interaction effect estimated in the multilevel model. This country is Chile (Country == 152).

Scatter plot showing the association between the slope of income and the country-level variable economic inequality, Chile excluded (gini)

. mltl2scatter coef_gr_incdiff_incperc gini if Country != 152,l2id(Country) labels qfitRe-estimate the multilevel regression without Chile

. xtmixed gr_incdiff incperc age sex gini ia_gini_incperc || Country:incperc if Country != 152, mle var cov(un)The interaction effect is no longer significant. It was actually due to one particular Country.

ReferencesISSP (2006): International Social Survey Programme - Role of Government IV, GESIS StudyNo: ZA4700, Edition 1.0, doi:10.4232/1.4700.

Carina Mood (2010): “Logistic Regression: Why We Cannot Do What We Think We Can Do, and What We Can Do About It.”

European Sociological Review26 (1): 67-82.

AuthorsKatja Moehring, GK SOLCIFE, University of Cologne, moehring@wiso.uni-koeln.de, www.katjamoehring.de.

Alexander Schmidt, GK SOCLIFE and Chair for Empirical Economic and Social Research, University of Cologne, alex@alexanderwschmidt.de, www.alexanderwschmidt.de.

Also see