Help using Base SAS procedures

not getting correct result in output sas dataset from mean proc

Accepted Solution Solved
Reply
Regular Contributor
Posts: 188
Accepted Solution

not getting correct result in output sas dataset from mean proc

I am trying to use the below code for average:

  proc means data = join_mkt_sort; by PRODUCT YEAR_MONTH_NUM; var encount_prod; output out = temp1 mean(encount_prod) = avg; run;  

while in the html it shows the correct mean in decimal like : 1.2049, but in the dataset its showing as 1 only while for other variables its doing correctly. Any ideas?


Accepted Solutions
Solution
‎07-02-2013 11:45 AM
Regular Contributor
Posts: 188

Re: not getting correct result in output sas dataset from mean proc

Actually I found the solution, the problem was the format. the means variable was in different format so it was ignoring the decimal places, i formatted it in an output dataset to BEST32. and it worked!

View solution in original post


All Replies
Solution
‎07-02-2013 11:45 AM
Regular Contributor
Posts: 188

Re: not getting correct result in output sas dataset from mean proc

Actually I found the solution, the problem was the format. the means variable was in different format so it was ignoring the decimal places, i formatted it in an output dataset to BEST32. and it worked!

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 162 views
  • 0 likes
  • 1 in conversation