The Question:
i already cleaned the data by using data step:
DATA Q1;
input
ID
Name : $14.
TeamandLeague : $21.
BattingAverageFirst45 $
BattingAverageRemainderSeason $
AtBatsRemainderSeason ;
DATALINES;
1 Clemente (Pitts,NL) .400 .346 367
2 F.Robinson (Balt,AL) .378 .298 426
3 F.Howard (Wash,AL) .356 .276 521
4 Johnstone (Cal,AL) .333 .222 275
5 Berry (Chi,AL) .311 .273 418
6 Spencer (Cal,AL) .311 .270 466
7 Kessinger (Chi,NL) .289 .263 586
8 L.Alvarado (Bos,AL) .267 .210 138
9 Santo (Chi,NL) .244 .269 510
10 Swoboda (NY,NL) .244 .230 200
11 Unser (Wash,AL) .222 .264 277
12 Williams (Chi,AL) .222 .256 270
13 Scott (Bos,AL) .222 .303 435
14 Petrocelli (Bos,AL) .222 .264 538
15 E.Rodriguez (KC,AL) .222 .226 186
16 Campaneris (Oak,AL) .200 .285 558
17 Munson (NY,AL) .178 .316 408
18 Alvis (Mil,NL) .156 .200 70
;
RUN;
PROC PRINT data=Q1;
RUN;
I dont know the conditions im supposed to write if i use the %if %then %else method.
can anyone help me in solving this question?
Why macros? Here are 2 ways to compute MLE :
https://blogs.sas.com/content/iml/2017/06/14/maximum-likelihood-estimates-in-sas.html
The macro language mainly exists to generate sas code, avoiding repetitive work.
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!
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.