Hi,
Is it possible to get N=0 when there are zero observations in a dataset?
Ex:
data cls;
set sashelp.class;
age=0;
if age ne 0;
run;
In the below, the output dataset is empty. Instead if I want to see N=0 indicating there are no records in a dataset, how can I do?
proc means data=cls stackodsoutput;
var age;
output out=cl_m;
run;
Statistical procedures need at least one row of data to report on, even if all variable values are missing. Zero rows means no statistics.
If you want to report on zero row tables then PROC CONTENTS is a better option:
Statistical procedures need at least one row of data to report on, even if all variable values are missing. Zero rows means no statistics.
If you want to report on zero row tables then PROC CONTENTS is a better option:
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!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.