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
Restructure dates in sequential mannerI got a raw dataset in a wide format that includes hundreds of variables defining drug prescriptions…
new variable: replace with nonumeric variable contentHey, I want to generate a new variable out of a variable that is already existing. However, the exi…
Colour Coding Markers In a Weighted Scatter PlotI am trying to create a scatter plot of Disease Mortality (CD_Mortality) and Income (GDP) weighted b…
Plotting -xtmixed- growth curve modelHello, I am using Stata 15.1 and I want to plot my growth curve model. I wave 5 waves and I want to…
Quintiles comparisonIs there a non parametric method to compare quintiles in STATA? like we compare median …
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