Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Suppose there are two datasets called car and color: DATA car INPUT name $ year

ID: 3277913 • Letter: S

Question

Suppose there are two datasets called car and color: DATA car INPUT name $ year make $ model $; CARDS Nathen 1989 Toyota Camry Logan 2003 Hyundai Sonata Brian 2000 Ford Mustang DATA color, INPUT name $ color $ CARDS; Nathen Silver Logan White Brian Red Judy Blaclk And the following is the output after run a SAS program: bs name year make 1 Brian 2000 FordMustang Red 2 Judy 3 Logan 2003 Hyundai Sonata White 4 Nathen 1989 Toyota Camry Silver model color Black Which statement between SET and MERGE is used?

Explanation / Answer

SET STATEMENT USED TO COMBINE DATA VERTICALLY

MERGE STATEMENT IS USED TO COMBINE DATA HORIZONTALLY

Here data is horizontal

So use merge statement

ANSWER:MERGE

CODE:

PROC SORT DATA=CAR;

BY NAME;

RUN;

PROC SORT DATA=COLOR;

BY NAME;

RUN;

DATA FINAL;

MERGE CAR COLOR;

BY NAME;

RUN;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote