Hello,
I am trying to find the mean of variables in an observation that has missing values.
for example, if T1 T2 T3 are the variables, their mean would be (t1 +t2+t3)/3= T_mean.
However, i discovered that SAS ouput a missing value for T_mean if any of the T1-T3 values are missing.
My question is how do i make sas treat the missing as zero in order to compute the mean.
The mean() function handles missing values correctly.
Can you show the code you have now?
The mean() function handles missing values correctly.
Thanks!
@ChuksManuel just to add to this thread. The Mean Function ignores missing values. It does not treat them as zero. There is a big difference.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.