Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Estimating the impact of a deviation of one variable from another one in a regression

    Hi All,

    I am trying to find a command in Stata that can estimate different measures of the deviation between two covariates, e.g. x1 and x2.

    The empirical model I would like to run is on a panel data set and takes the following form: Yit=const+b1L.X1+b2L.X2+b3(L.X1-L.X2). That is I would like to measure the impact of the deviation of variable X1 from variable X2 on Yit ( for each panel in every time period).

    X1 is a specific characteristic for panel i, X2 is a composite measure of the same specific characteristic but for all other panels (excluding panel i). In sense, I try to model the deviation of X1 from this composite measure.

    I am looking for a Stata command that could automatically estimate alternative measures of the X1-X2 difference (or deviation of X1 from X2). Also, as a robustness check.

    Have checked the manuals and the forum, but I could not find much information on the subject.


    Dave

  • #2
    I don't understand what you mean by alternate measures of the difference. The difference is the difference. What kind of alternate measure do you have in mind?

    In any case, you will not be able to estimate the model Yit=const+b1L.X1+b2L.X2+b3(L.X1-L.X2), because L.X1, L.X2 and L.X1-L.X2 are colinear, so one of them will be dropped.

    If you explain what your research question is and the context, perhaps somebody can help you figure out a way to achieve your goals.


    Comment


    • #3
      Thanks, Clyde. An example with the research question would certainly help. I am looking at whether the degree of deviation of variable X1 (municipality budget) from the group average X2 (average budget of similar municipalities in a given region) has any impact on the dependent variable (average salary level of municipality officials).

      Comment


      • #4
        Well, if your data consists of observations of multiple municipalities in several regions, you can just do this:

        Code:
        xtset region
        xtreg Y X1, fe
        That -xtreg- command is equivalent to de-meaning the values of the variables within region, and then regressing the de-meaned values. So the regression coefficient of X1 here will actually be an estimate of the effect on Y of X1 - (mean X1 within the region).

        It is better than regressing Y on X1-X2 because the use of the fixed-effects estimator will also overcome any missing variable bias that might be attributable to other fixed attributes of the regions besides just the average budgets.

        That said, I think it will be very difficult to make any causal inferences from this analysis. It is really quite unclear whether official salaries are driven up by the larger budget, or whether the budgets themselves are inflated because they include higher official salaries. And both of those, in turn, may be driven by things like the level of economic activity in the municipality or the region, municipal or regional income levels, tax policy, and perhaps many other things I haven't thought of . It just seems to me like there is massive endogeneity in this. Stretching beyond my area of full understanding and expertise, my guess is that you need to find some instrumental variables.


        Comment

        Working...
        X