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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 478 views
  • 2 likes
  • 2 in conversation