Data set A | Data set B |
Id X Y | Id X Z |
1 10 11 2 14 . | 1 . 4 3 15 5 3 17 . |
Data set C
|
| Id | X | Y | Z |
(1) | Data C; set A B;
|
|
|
|
|
(2) | Data C; set A; set B;
|
|
|
|
|
(3) | Data C; set A B; by Id;
|
|
|
|
|
(4) | Data C; merge A B;
|
|
|
|
|
(5) | Data C; merge A B; by Id;
|
|
|
|
|
(6) | Data C; update A B; by Id;
|
|
|
|
|
(7) | Data C; set B; If X=. then set A; Else Y=mean(X, Z);
|
|
|
|
|
I was able to create the two data sets. I am confused to what the table is asking from me. I don't understand how to answer it or how to use the set function.
Try running each of the programs (with a RUN; statement at the end of each), and see what the results are.
The SET statement reads observations from a SAS data set. You will 100% need to learn that.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.