Announcement

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

  • Help : create a variable with the frequency + need options

    Hello everybody !

    Here are the two variables I use: Assignment (DS01, DS02 ...) and Default (dummy). The latter is my explained variable.

    I want to create a variable representing the default frequency == 1 depending on my assignment. I made this command:
    egen x = count (1), by (Assignment)
    This gives me the frequency of observations in each district. I want the same thing but only for default == 1.
    What options can I add?


    Pleaaaase Help

  • #2
    The question does not refer to Mata and appears to be a variation on https://www.statalist.org/forums/for...other-variable

    Comment

    Working...
    X