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.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.