Unistats Roland's Macro

Reply
Contributor
Posts: 43

Unistats Roland's Macro

Dear all,

I am starting to use the Roland's library macros and I have a little problem.

For unistats macro, the parameter misspct says,

misspct=no By default, do not include missing category counts in the
percentage calculation. If set to "no" then p-values will
not be based on the missing category.


But, or I do not understand what it says or this parameter does not work.

The following macros produce the same percentages:

proc format;
value sex 1 = 'Male'
2 = 'Female';
value age 11-13 = 'Age group 1'
14-high = 'Age group 2';
run;

data class;
set sashelp.class;
if sex = 'M' then sex2 = 1;
else sex2 = 2;
if name in ('Alfred','Alice','Barbara') then age =.;
format sex2 sex. age age.;
run;

%popfmt(class,sex2,uniqueid=name) ;

%unistats(dsin=class, unicatrep=yes, misspct=yes, varlist= age, pvarlist= age);

%unistats(dsin=class, unicatrep=yes, misspct=no, varlist= age, pvarlist= age);


Could somebody tell me how can I get percentages only based in the non-missing values?

I would like to know also if programmers are using this macros?

Thanks in advance!!

Juan Vte.
Contributor
Posts: 43

Re: Unistats Roland's Macro

Ok, I got it!!

the solution regards in the use of the parameter pctcalc=cat!!

As I said, I am starting to study these macros but at the moment I think these are really recommendable!!

JV
Ask a Question
Discussion stats
  • 1 reply
  • 319 views
  • 0 likes
  • 1 in conversation