BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
S_pera
Calcite | Level 5

Hi

 

I use SAS University edition and I found ORDER=DATA option doesn't work for this program and dataset.

 

data trend;
input x y n;
cards;
1 1 0
1 0 5
2 1 3
2 0 3
3 1 0
3 0 1
;
proc freq order=data; weight n;
tables x*y/chisq nocol nopercent measures;
Exact trend;
run;

 

However, when n is different from 0 for the very first cell it works. This order is important because the exact trend is base on the first column/row. Please suggest how to make ORDER = DATA option works irrespective of the data.

rgds

 

S_pera 

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hi @S_pera and welcome to the SAS Support Communities!

 

You need to add the ZEROS option of the WEIGHT statement. Otherwise zero-weight observations are ignored.

weight n / zeros;

View solution in original post

2 REPLIES 2
FreelanceReinh
Jade | Level 19

Hi @S_pera and welcome to the SAS Support Communities!

 

You need to add the ZEROS option of the WEIGHT statement. Otherwise zero-weight observations are ignored.

weight n / zeros;
S_pera
Calcite | Level 5
Thank you very much.

S_pera

SAS Innovate 2025: Call for Content

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!

Submit your idea!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 586 views
  • 2 likes
  • 2 in conversation