Announcement

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

  • Trend variable in a Tobit model

    Hello everyone,


    I would like to add a trend variable in my Tobit model since I was adviced not to use a fixed effect (i.Year). My panel data consists of 183 municipalities observed from the year 2003 to 2016. (=2562 no of obs)


    I used a cmd:

    by Municipality: gen Trend=_n

    I wonder if this is correct?


    Thanks in advance.

    Best regards,

    Annaliza

  • #2
    Annaliza:
    I'm not sure I got what you're after right.
    If you have panel data, go -xttobit- as first choice.
    As far as your trend is concrened, it is not clear what you mean by it.
    Usually, trend relates to -timevar- and specifically if the relatiionship between it and the regressand is linear or quadratic (the latter is usually checked for):
    Code:
    c.timevar##c.timevar
    to be included among the predictors, includes both linear and quadratic terms in an efficient way.
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment


    • #3
      Carlo Lazzaro

      Thank you for the response. I am sorry for not being clear. Yes, you are right - what I mean is the time trend (timevar -Year).

      I am trying to analyze how the installed wind capacity differs between municipalities.
      My models look like this:

      1)mi estimate, cmdok: metobit yvar xvarlist c.Year, ll(0) vce(cluster Municipality)

      2)mi estimate, cmdok : metobit yvar xvarlist dummies i.Municipality##c .Year, ll(0) vce (cluster Municipality)

      --> mi estimate, cmdok : metobit yvar xvarlist dummies c.Year, ll(0) vce (cluster Municipality)

      Since model 2 only loads (for a long period of time) and never gives any result/output, I can not say what went wrong. I had to abort the second model and replace i.Municipality ##c.Year with only c.Year.

      Best regards,
      Annaliza
      Last edited by Annaliza Gronlund; 23 Dec 2018, 12:01. Reason: Clarification

      Comment


      • #4
        Annaliza:
        reporting that something is not working as expected is not that useful for those interested in replying positively to your query.
        As per FAQ, please report what you typed (as you did) and what Stata gave you back between CODE delimiters. Thanks.
        Kind regards,
        Carlo
        (Stata 18.0 SE)

        Comment


        • #5

          I would like to know how to estimate robustly usando xtregar?

          Comment


          • #6
            Bruno:
            welcome to this forum.
            For the future, please start a new thread whenever the subject you're interested in has nothing to do with the previous thread you intend to queue up to. Thanks.
            That said, from the related entry in Stata .pdf manual, it seems that -robust- option is not available for -xtregar-.
            Kind regards,
            Carlo
            (Stata 18.0 SE)

            Comment

            Working...
            X