We have this dataset. There are only two items from the same store. And we want to determine items as new/old within the same store based on the year.
This is the desired output
To get the desired result use the proc sort procedure, then use first.store to get the new_items else old_items.
Please refer to code-
proc sort data=dt; by id year store; run; proc sort data=dt; by store; run; data dt1; set dt; by store; if first.store then old_new = "New"; else old_new= "old"; run;
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.