BookmarkSubscribeRSS Feed
sschwie
Calcite | Level 5

I am a VERY light SAS user who had the product handed to him when a coworker retired and am having a problem with a SAS program that uses the UNIVARIATE procedure.  Results that used to look like this:

   Quantiles (Definition 5)

                                                       Quantile      Estimate

                                                       100% Max       291.318

                                                       99%              0.160

                                                       95%              0.030

                                                       90%              0.014

                                                       75% Q3           0.004

                                                       50% Median       0.002

                                                       25% Q1           0.000

                                                       10%              0.000

                                                       5%               0.000

                                                       1%               0.000

                                                       0% Min           0.000

Now look like this:

                                                      Quantiles (Definition 5)

                                                     Quantile          Estimate

                                                     100% Max       1.31885E+02

                                                     99%            2.93500E-01

                                                     95%            5.50994E-02

                                                     90%            2.70000E-02

                                                     75% Q3         8.00000E-03

                                                     50% Median     3.50000E-03

                                                     25% Q1         1.58333E-03

                                                     10%            3.99668E-04

                                                     5%             9.99998E-05

                                                     1%             0.00000E+00

                                                     0% Min         0.00000E+00

I know it is a format issue on the output, but I'm struggling with trying to figure out where to look.  Any help would be greatly appreciated.

7 REPLIES 7
Rick_SAS
SAS Super FREQ

Have you recently changed versions of SAS, edited macros, or otherwise made changes to the software?

sschwie
Calcite | Level 5

No changes to the software, but the data now contains 4 positions to the right of the decimal place when there were 3 before.

Ksharp
Super User

Maybe Someone just changed the TEMPLATE of proc univariate.

Delete it and Restore the default TEMPLATE. But I don't know how to do it. Post it at ODS and REPORT forum.

@Cynthina should know how to do it.

sschwie
Calcite | Level 5

Xia,

   Thanks for the reply.  The TEMPLATE wasn't changed because if I use old data, the results look ok.  As I said, the data now has 4 positiions to the right of the decimal place, when before there were 3.  If I run a delete for everything smaller than .001 before I run the UNIVARIATE proc, then it works. I suspect my data has too large a range.  (Some values larger than 1000...some less than .001.)

Ksharp
Super User

Maybe you assign a Ew.d format to that variable ?

format var best32.;

Not sure if it could work.

Xia Keshan

Reeza
Super User

Please post your proc univariate code.

I can't replicate that issue even with various formats on SAS 9.3...

sschwie
Calcite | Level 5

Here's the code that works:

OPTIONS LINESIZE=133 PAGESIZE=60;

 

DATA ONE;                        

  INFILE IFILE ;                  

INPUT  @58   FREQ      10.      

        @73  RESP       9.;      

RESP=RESP/FREQ;

if resp < .001 then delete;

proc printto file='d:/sas/dbparesp.txt';

PROC UNIVARIATE DATA=ONE ;       

  FREQ FREQ;                      

  VAR RESP;                      

proc printto;

run;

If you remove the highlighted code, I get the unreadable results.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 1035 views
  • 0 likes
  • 4 in conversation