Announcement

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

  • How to declare "string" condition in If condition

    Hello,

    I am newbie in Stata and I have a problem with stata when I try to declare If condition.

    In my DB, I have "country" variable which has "Germany" values but when I run the regression:

    "oprobit adl iadl depression_scale chronicw2 if country==Germany". It said that "Germany not found"
    or
    " oprobit adl iadl depression_scale if "country"=="Germany" ". It said that "no observations"

    How can I fix it?

    Thank you

  • #2
    Cross-posted and answered at https://stackoverflow.com/questions/...ition-in-stata

    Comment


    • #3
      Yes, it's me, I posted in 2 places. Sorry about that

      Comment


      • #4
        See https://www.statalist.org/forums/help#crossposting for our policy.

        Comment


        • #5
          thank you for that info, i will do it next time when i get the answer

          Comment


          • #6
            Your question has already been answered on SO.

            Comment

            Working...
            X