Announcement

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

  • #16
    when I want to drop period between 2021/05 to 2021/09:
    I run this codes but it made an error:

    drop if mdate==2021m05
    Code:
    drop if inrange(mdate, tm(2021m5), tm(2021m9))
    Furthermore, I need to separate countries to exporters and importers, would you help me how could I do that?
    How do you know which countries or exporters and which are importers? There is nothing in the example data that I can see that indicates that.

    And again, we are going off topic here. Please start a new thread.

    Comment


    • #17
      Hi everyone, Please I am just learning STATA, and I need assistance. So I have 2 seperate variable as Systolic and Diastolic. I am now trying to write a condition where STATA can return "normal" for me where the systolic is <=140, and "Abnormal" where it is >140,

      Here is what I have written that returns the error code "Abnormal not allowed"

      *for the Systolic
      generate SysBldPressure = cond(Systolic=<140, "Normal", "Abnormal")

      Comment


      • #18
        Hi everyone, Please I am just learning STATA, and I need assistance. So I have 2 seperate variable as Systolic and Diastolic. I am now trying to write a condition where STATA can return "normal" for me where the systolic is <=140, and "Abnormal" where it is >140,

        Here is what I have written that returns the error code "Abnormal not allowed"

        *for the Systolic
        generate SysBldPressure = cond(Systolic=<140, "Normal", "Abnormal")

        Comment

        Working...
        X