Hello
usually i use nodupkey option to eliminate the replicated observations, but i think this option removes all observations that occur next year and so on.
other words this option keeps only first year-observations while i have ten years observations, so I need to know how much replicated obs i have in my datafile.
thanks
You can use the DUPOUT= Option in the PROC SORT Statement.
Please post the code you are using and an excerpt of the data and explain which obs are "accidentally" removed. The "nodupkey" option keeps only the first observation within a group defined by BY-statement.
proc sort data=real_var1 nodupkey; by code year; run;
the observations were 34000 then became 1931 observations
when i checked the number of firms it was 1931 firms.
while i have data for 9 years.
You should add the year-variable to the by-statement, if you want obs for each year.
Check your data. It's probably messed up. The result you describe would only be possible if the YEAR values were the same for all observations.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.