I am merging these two tables.and i am getting table3
in most cases table 1 has many observations than table2 for the same ID
is it OK to merge even if the table 1 has less records for the same ID than table2?????
the result in table 3 is in a format i wanted......can i ignore the NOTE????
table1 table2
ID charges ID Trials
101 101 22
101 101 25
101 101 23
101 102 10
101 102 11
101
101
101
101
101
101
102
102
102
102
table3
ID charges Trials
101 22
101 25
101 23
101 23 -----23 spans till the next ID.BUT THAT IS ALSO FINE WITH ME
101 23
101 23
101 23
101 23
101 23
101 23
101 23
102 10
102 11 ---spans
102 11
102 11
I get a message that merge has more than one dataset with repeats of BY variables
The NOTE is there because in most scenarios, you don't want that result, it is unpredictable.
And the same here, why is it ok to repeat the value of the last trail for each ID? What is it you really want...?
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.