Hi guys, I am required to produce output like the image sample from the fitness data set. May I know the solutions? The questions is like: What is the highest runtime for male and female individuals in the fitness data file?
something like this
title 'max runtime for female'; proc sql; select max(runtime) as mxdata from sashelp.class where sex= 'F'; title; title 'max runtime for Male'; select max(runtime) as mxdata from sashelp.class where sex= 'M'; quit;
something like this
title 'max runtime for female'; proc sql; select max(runtime) as mxdata from sashelp.class where sex= 'F'; title; title 'max runtime for Male'; select max(runtime) as mxdata from sashelp.class where sex= 'M'; quit;
May i know, how can i get the "Obs" as the image shown.
proc sql number;
select max(runtime) as mxdata from sashelp.class
where sex= 'F';
title;
title 'max runtime for Male';
select max(runtime) as mxdata from sashelp.class
where sex= 'M';
quit;
but this shows up as ROW instead of obs as heading or use SAS undocumented function monotonic() as shown below
proc sql ;
select monotonic() as Obs, max(runtime) as mxdata from sashelp.class
where sex= 'F';
title;
title 'max runtime for Male';
select monotonic() as Obs, max(runtime) as mxdata from sashelp.class
where sex= 'M';
quit;
alternatively try the proc means
proc means data=have nway;
class sex;
var runtime;
output out=want max=max;
run;
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 save with the early bird rate—just $795!
Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.
Find more tutorials on the SAS Users YouTube channel.