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
Determine the appropriate lag of independent variable panel data fixed effect modelHi, I am doing a fixed effect panel data regression (T=40 N=1087). Theoretically my independent va…
How to adjust restricted cubic spline curve for custom references?Hi, I am currently learning on how to conduct a dose-response meta-analysis. Following estimations …
Travel cost method combining RP and SPHi I have a dataset with info on #trips for each individual (a total of 200) to a particular recreat…
How to make of use loop in this caseDear all, I would like to seek your advice on the use of loop or other equivalent functions. My dat…
using not allowed stata imputation hotdeckvarHi, I have a problem with my imputing syntaxs. hotdeckvar pasajeros1 using p, store by(marca clase2…
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