Hi everyone, first time here
I have a longitudinal data set with 3500 unique individuals that looks like something below but i want to have a new variable where each unique individual will be represented in one row and not appear multiple times.
I used this code [generate subjectID: subjectid = subjectid] to create the new variable which is a replica of the old variable but don't seem to know how to exclude all the repeat subjectid that appear more than once.
How do i proceed?
subjectid
1
1
2
3
4
4
4
5
...
3500
Thanks
Related Posts with How do i create a variable from a longitudinal dataset where i have one row for all the times a unique individual appears more than once
Change date variable to one stata can readHello Statalist, I've a question regarding my dataset. I want to extract the year and month separat…
Different marginal effect for dummy variable after logit, depending on using i-prefix or notHello, I'm wondering why margins (after logit) produces different results for a dummy variable (0-1…
twopm: Two Part ModelsI am using Stata 15 MP and my analytic data set is a geographic region-year panel, for the years 200…
gologit2 suddenly having problems in Stata 15I have sent this problem to Stata tech support. I will be amazed if anyone on the list can help me b…
Merging few observations to copy/add for other observationsHello, I am relative to Stata and I just cannot figure out how to solve the following problem. My m…
Subscribe to:
Post Comments (Atom)
0 Response to How do i create a variable from a longitudinal dataset where i have one row for all the times a unique individual appears more than once
Post a Comment