Robson, Pevalin. Multilevel Modeling in Plain Language by Karen Robson & David Pevalin

Robson, Pevalin. Multilevel Modeling in Plain Language by Karen Robson & David Pevalin

Author:Karen Robson & David Pevalin
Language: eng
Format: epub
Published: 2015-10-27T15:06:20.974000+00:00


Getting started with random coefficient models

In a similar way to how we examined our data to see if a random intercept model was more appropriate than a single intercept one, we can first look at our data and determine if there is enough variation in the coefficients (slopes) to warrant further modeling in a multilevel framework.

There are a number of possible ways to go about this initial examination of the data, but here we start by running separate OLS regressions for each school and then examine results using some descriptive statistics and graphs.

We will continue with our example that investigates the effect of parental occupational status (the centred variable cen_pos) on standardized reading scores (z_read). The command statsby is useful for this procedure as it collects the value of the intercept and the coefficient for each regression and we tell Stata to save these results in a new data set, with one observation per school, which we will first inspect and then merge back into our working data for graphing. We called the saved data set ols.dta in this example.

statsby intercept=_b[_cons] coeff=_b[cen_pos], ///

 by(schoolid) saving(ols, replace): reg z_read cen_pos

Now we open the ‘ols’ data set and produce some descriptive statistics. You could also examine some graphs if you prefer.

se ols, clear

su intercept coef



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.