Announcement

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

  • Need help w code

    Hi first of all I am very new to Stata and have to perform a test with multiple variables, so for example, prior a timestamp and after a timestamp for a specific illness

    so like i'll run a nbreg x if y == 1, z == 2, how can i do this? because negative binomial won't run with multiple if's

    i chose nbreg because of overdispersion in my data

    my exercise asks me to test whether pre-timestamp number due to x have grown quicker compared to numbers due to y
    Last edited by John Garcia; 01 Feb 2023, 06:52.

  • #2
    Are you looking for

    Code:
    nbreg x if y==1&z==2
    where & is the Stata AND operator, otherwise you may need to clarify your question.

    Comment


    • #3
      Originally posted by Daniel Feenberg View Post
      Are you looking for

      Code:
      nbreg x if y==1&z==2
      where & is the Stata AND operator, otherwise you may need to clarify your question.
      I think its working, thank you!


      Edit: p value comes out at . is that normal?
      Last edited by John Garcia; 01 Feb 2023, 07:08.

      Comment

      Working...
      X