Announcement

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

  • Using same variable for weight and control

    I would like to use the same variable for weight and control like:

    Code:
    sysuse auto
    ivreghdfe price weight (length=trunk) [aw=weight], absorb(rep78)
    But it generates error that says

    Error: cannot use weight variables as dependent variable, regressor or IV in combination with -partial- option.
    Is there any workaround?

  • #2
    James:
    provided that it makes methodological sense, you can create a new variable that mirrors -weight-, but under a different name:
    Code:
    sysuse auto
    clonevar Weight = weight
    ivreghdfe price Weight (length=trunk) [aw=weight], absorb(rep78)
    Kind regards,
    Carlo
    (Stata 16.0 SE)

    Comment


    • #3
      Hi Carlo,

      I want to include the same variable as control (it would introduce an omitted variable bias if I didn't) and as weight (to give more weight to certain observations and because of heteroscedasticity). Your answer suggests that this does not pose a problem. Could you please elaborate further or refer to some reference? In general, I was wondering if including the same variable as weight and as control makes any sense and more specifically, I was worried about consistency.

      Thanks!

      Comment


      • #4
        Caecilia;
        my previous reply stated that what your seemingly are after is fesible in Stata; its methodological acceptability is a totally different topic.
        The usual advice is skimming through the literature of your research field and see what others did in the past when presented with the same research topic.
        As an aside, I'm not clear why not invoking -robust- standard error if you detected heteroskedastcity in rsidual distribution.
        Kind regards,
        Carlo
        (Stata 16.0 SE)

        Comment

        Working...
        X