Ken Barz
2009-08-12 20:05:15 UTC
Hey all, been a while since I've been on the -L due to company email =
problems.
As my brain seems to be on minimal power today, maybe you might help =
with something: I'm trying to streamline some analysis processing =
(using means and freq) to generate one dataset which will have the =
variable name, grouping vars, then n, mean, std, ... However, in =
running proc means using ods output, I notice that n becomes age_n, mean =
becomes age_mean, ... I know I can control that using the output =
statement within the means procedure. Using the ods output approach, is =
there a way to shut off the age_ prefix and just have it read n, mean, =
...?
Thanks,
Ken
%macro analysis (type, ds, clslst, var, addstat);
%if &type =3D cont %then %do;
ods listing close;
ods select Summary(persist);
ods output Summary(persist=3Dproc)=3D&var (drop=3D_proc_ _run_);
proc means data=3D&ds n mean std median min max &addstat;
class &clslst;
var &var;
run;
ods _all_ close;
ods listing;
%end;
%else %if &type =3D cat %then %do;
%end;
data &var;
length variable $8;
set &var;
variable =3D "&var";
run;
%mend;
%analysis(cont, dataout.demogr, cohort treatment, age, )
problems.
As my brain seems to be on minimal power today, maybe you might help =
with something: I'm trying to streamline some analysis processing =
(using means and freq) to generate one dataset which will have the =
variable name, grouping vars, then n, mean, std, ... However, in =
running proc means using ods output, I notice that n becomes age_n, mean =
becomes age_mean, ... I know I can control that using the output =
statement within the means procedure. Using the ods output approach, is =
there a way to shut off the age_ prefix and just have it read n, mean, =
...?
Thanks,
Ken
%macro analysis (type, ds, clslst, var, addstat);
%if &type =3D cont %then %do;
ods listing close;
ods select Summary(persist);
ods output Summary(persist=3Dproc)=3D&var (drop=3D_proc_ _run_);
proc means data=3D&ds n mean std median min max &addstat;
class &clslst;
var &var;
run;
ods _all_ close;
ods listing;
%end;
%else %if &type =3D cat %then %do;
%end;
data &var;
length variable $8;
set &var;
variable =3D "&var";
run;
%mend;
%analysis(cont, dataout.demogr, cohort treatment, age, )