Announcement

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

  • Creating dummy variable to indicate if trend increasing or decreasing

    Hello!

    I am working on a panel dataset.

    I want to create a dummy variable that indicates weither my hp trend variable is increasing or declining for each country (Dummy =1 if trend is increasing for country i and 0 if declining).

    How I can do this in stata? I believe I have to start with the gen Dummy=1 if ...

    I don't know what to use after " if " for that condition.

    Thank you in advance.
    Last edited by Rajwane Kafrouni; 21 Jan 2020, 06:47.

  • #2
    A serious question is what your definition of increasing or declining is. Is it monotonic change with no exception? A positive/negative Pearson correlation? Spearman correlation? Which way would a constant outcome be classified? Are you satisfied with comparing just first and last values?

    Comment

    Working...
    X