From: Richard A. DeVenezia on
I am using the MISSING option so that a TABULATE will occur without getting
a
WARNING: A class, frequency, or weight variable is missing on every
observation.
and no output at all.

Is there a way to use the MISSING option and then tell tabulate to not show
the missings (class level values)?

In this sample, I would want to see just columns N X*1*N X*2*N Z*1*N

data foo;
do topic = 1 to 2;
do id = 1 to 100;
r = ranuni(1234);
select ;
when (r < 0.33) x = .;
when (r < 0.66) x = 1;
otherwise x=2;
end;
y = .;
z = ifn (ranuni(1234)<0.2,.,1);
output;
end;
end;
run;

ods listing;
options linesize=200 nocenter;
dm 'output' output;

proc tabulate MISSING data=foo format=12.;
class topic x y z;
table topic, n x*n y*n z*n / rts=10;
run;

--
Richard A. DeVenezia
http://www.devenezia.com/


From: "data _null_," on
This gets one part (X*1*N X*2*N Z*1*N) but I can't get big N.

proc transpose out=foo2;
by topic id;
var x y z;
run;
proc tabulate data=foo2 format=12.;
class topic _name_ col1;
table topic, _name_=' '*col1=' '*n / rts=10;
run;

On 10/22/07, Richard A. DeVenezia <rdevenezia(a)wildblue.net> wrote:
> I am using the MISSING option so that a TABULATE will occur without getting
> a
> WARNING: A class, frequency, or weight variable is missing on every
> observation.
> and no output at all.
>
> Is there a way to use the MISSING option and then tell tabulate to not show
> the missings (class level values)?
>
> In this sample, I would want to see just columns N X*1*N X*2*N Z*1*N
>
> data foo;
> do topic = 1 to 2;
> do id = 1 to 100;
> r = ranuni(1234);
> select ;
> when (r < 0.33) x = .;
> when (r < 0.66) x = 1;
> otherwise x=2;
> end;
> y = .;
> z = ifn (ranuni(1234)<0.2,.,1);
> output;
> end;
> end;
> run;
>
> ods listing;
> options linesize=200 nocenter;
> dm 'output' output;
>
> proc tabulate MISSING data=foo format=12.;
> class topic x y z;
> table topic, n x*n y*n z*n / rts=10;
> run;
>
> --
> Richard A. DeVenezia
> http://www.devenezia.com/
>