Hi,
I am just learning stata and have tried to read about this error online, but haven't had any luck. I am hoping someone here can help with might be a very basic question.
I am trying to select the first instance of a program name to apply it to all existing records (let me know if you need more background information). This is what I have done:
sort ProgramId
by ProgramId: egen ProgName = first (UProgName)
I'm using stata 12. It keeps telling me: unknown egen function first(). So I tried using firsttime instead of first. But it says the same thing: unknown egen function firsttime.
I am tried reading about this and can't seem to figure out why it does not recognize the command. I have also tried using gen instead of egen, to not avail.
I appreciate any help. Again, I'm learning, so I hope my question makes sense and look forward to your help.
Thank you in advance for your help,
Diana
I am just learning stata and have tried to read about this error online, but haven't had any luck. I am hoping someone here can help with might be a very basic question.
I am trying to select the first instance of a program name to apply it to all existing records (let me know if you need more background information). This is what I have done:
sort ProgramId
by ProgramId: egen ProgName = first (UProgName)
I'm using stata 12. It keeps telling me: unknown egen function first(). So I tried using firsttime instead of first. But it says the same thing: unknown egen function firsttime.
I am tried reading about this and can't seem to figure out why it does not recognize the command. I have also tried using gen instead of egen, to not avail.
I appreciate any help. Again, I'm learning, so I hope my question makes sense and look forward to your help.
Thank you in advance for your help,
Diana
Comment