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;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.