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

Hi Xia,

Thank you for the suggestion, i will use Fisher Exact test to calculate the P-value. here i am getting the overall P-value i.e 0.0109

Also, i am getting warning saying that Chi Square may not be a valid test . Please advice.

Capture.JPG

How would i calculate the individual p value for each category, One p-value for Strongly Agree, one p-value for Disagree etc. (Sorry to bother u so much)

Capture.JPG

Regards,

Ratan

Ksharp
Super User

Oh , that is not Fish 's p-value that is still chi-squre's p-value , see Fisher's Exact Test Part of output , and also try to run my second code.

" individual p value for each category, One p-value for Strongly Agree, one p-value for Disagree"

I don't understand what you mean , do you mean Risk for the first column1. I would like to leave it to

SteveDenhamSteveDenham

  . He is an expert about statistical theory . I am going to sleep now. Bye .

Have a nice day.

Xia Keshan

Reeza
Super User

What you're asking for doesn't seem to make statistical or logical sense, though perhaps its simply not clear.

The way to get multiple p-values is multiple tests, which have its own issues, from a statistical perspective.

Assuming you understand what you want to do, and it makes some sense to you here's how you might calculate it in SAS:

proc sort data=have;

by var1 var2 var3;

run;

proc freq data=have;

by var1 var2 var3;

table var4/chisquare;

run;

Ratanroy
Calcite | Level 5

Hi Reeza,

I have the below table. i have two machines A, B. for Felt pain field, patients are giving the feedback that how convenient the screening was.

So, here i have to calculate the p value for individual fields. i.e strongly Agree, Agree etc. I am new to statistics so i am not able to interpret which test i have top use for this.

Capture.JPG

Regards,

Ratan

Ksharp
Super User

You could try this , since you only care about row variable .

NOTE: it tested the H0 :  proportion is 0.5

And you'd better post it at   SAS Statistical Procedures

Steve will help you a lot .

data have;
do a='S' ,'D', 'A', 'N';
 do b='A', 'B';
  input count @@; output;
 end;
end;
cards;
7 7 3 3  7 9 2 2
;
run;

proc freq data=have order=freq;
tables a / binomial(ac wilson exact level=1) alpha=.1;
tables a / binomial(ac wilson exact level=2) alpha=.1;
tables a / binomial(ac wilson exact level=3) alpha=.1;
tables a / binomial(ac wilson exact level=4) alpha=.1;
weight Count;
run;


Xia Keshan

Reeza
Super User

A best practice for statistical analysis is first determine what type of test you need based on your hypothesis and then figure out how to do it in whatever application you have, SAS, R, SPSS.

Step 1. What is your hypothesis?

Step 2. What type of data do you have?

Step 3. What type of statistical tests are available/appropriate?

You're jumping straight to step 3.

Ratanroy
Calcite | Level 5

Hi Reeza,

1.  Here The primary hypothesis is to be tested is that Machine A is superior to Machine B in terms of “Recommendation”:

    machine were recommended which got feedback "Strongly Agree" or "Agree". We are assuming significance level 0.05.

2.Most of the data are ordinal here

Attached the data for reference. kindly suggest.

Regards,

Ratan

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

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
  • 21 replies
  • 50739 views
  • 7 likes
  • 4 in conversation