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:
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.
Ready to level-up your skills? Choose your own adventure.