Announcement

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

  • Odds of events occuring

    Hi,

    My dataset has seven variables, six of them indicating whether a respondent paid a service (0/1) for consecutive years 2011-2016.

    ID 2011 2012 2013 2014 2015 2016
    1 1 0 0 1 0 0
    2 0 1 1 1 1 1
    3 . . 1 1 0 0
    4 0 1 0 1 0 1

    .....


    For descriptive purposes, I would like to know what the odds are of a respondent who paid a service in year Y to pay for a service at year Y+1, or for a respondent who paid a service for two consecutive years Y and Y+1 to not pay for a service Y+2.

    Thank you

  • #2
    You'll want to reshape your dataset from the current wide layout to a long layout, so observations are identified by the combination of ID and year. From there, it's not quite clear what you want - percentages? odds? logistic regression results? but whatever it is, computing it will be straightforward in a long layout than in the wide layout.

    Comment

    Working...
    X