Hello,
I have the data in this format shown below and i have given examples for 2 ID's.
Each domain may have several questions and each ID may be either Established or NEW.
How do i find if there is a correlation of scores between Established and NEW.
I tried the following:
/*FOR ESTABLISHED*/
proc transpose data=Have(where=(Appointment_Type="ESTABLISHED")) out=test_transpose_Established prefix=EST_;
by ID question;
var score;
id DOMAIN;
run;
/*NEW PATIENTS*/
proc transpose data=Have(where=(Appointment_Type="NEW")) out=test_transpose_NEW prefix=NEW_;
by id question;
var score;
id Domain;
run;
/*Both Together*/
data new_EST;
set test_transpose_Established test_transpose_NEW;
run;
proc corr data=NEW_EST;
run;
ID DOMAIN QUESTION SCORE APPOINTMENT_TYPE
101 Med Practice: Care Provider Med Practice: CP Concern 100 Estblished
101 Med Practice: Care Provider Med Practice: CP Explanation 100 Estblished
101 Med Practice: Care Provider Med Practice: CP Discuss treatments 100 Estblished
101 Med Practice: Care Provider Med Practice: CP Efforts 100 Estblished
101 Med Practice: Access Med Practice: Ease of contacting 100 Estblished
101 Med Practice: Access Med Practice: Ease of scheduling 100 Estblished
101 Med Practice: Access Med Practice: CP Efforts 100 Estblished
102 Med Practice: Care Provider Med Practice: CP Concern 100 New
102 Med Practice: Care Provider Med Practice: CP Explanation 100 New
102 Med Practice: Care Provider Med Practice: CP Discuss treatments 100 New
102 Med Practice: Care Provider Med Practice: CP Efforts 100 New
102 Med Practice: Access Med Practice: Ease of contacting 100 New
102 Med Practice: Access Med Practice: Ease of scheduling 100 New
102 Med Practice: Access Med Practice: CP Efforts 100 New
Hi @robertrao, would "are the average scores of the new IDs significantly different from the average scores of the established IDs?" be an alternative to "what is the correlation between average scores of the new IDs and their appointment type?" for you?
Best Regards
Markus
Thank you, Marcus
Did you mean i have to perform a ttest to look at the difference in Mean scores?
Would you be able to show th sample SAS code for my example to
Proc ttest;
class Appointment_Type;
var score;
run;
Starting with yout table new_EST I would calculate the average score per ID and then start the ttest:
proc sql;
create table TTest_2 as
select
ID, APPOINTMENT_TYPE, avg(SCORE) as AVERAGE_SCORE
from new_EST
group by ID;
quit;
proc ttest data=TTest_2;
class APPOINTMENT_TYPE;
var AVERAGE_SCORE;
run;
Hello MArkus,
It looks like they already know that the mean scores are different . This analysis provided information that the means are statistically significant.
The established had given a higher rating than the new patients.
Additionally, the important question that we need answer to is:
Between the two groups , is there a statistical difference between the questions they answered? !
Was Med Practice: Ease of scheduling higher in one group than the other???
@robertrao , could you please provide the full text of your task.
Best
Markus
Hello MArkus,
I did not post the entire data since its huge and so i pasted a sample.
It was identified the Established category gave high rtings for the questions compared to NEW patients.
I changed the original sample to reflect those now -see below as i couldnt change the original post).
Our goal is to find if there is a statistical diffference if any for a question between Established and NEW!!!
ID DOMAIN QUESTION SCORE APPOINTMENT_TYPE
101 Med Practice: Care Provider Med Practice: CP Concern 100 Estblished
101 Med Practice: Care Provider Med Practice: CP Explanation 100 Estblished
101 Med Practice: Care Provider Med Practice: CP Discuss treatments 100 Estblished
101 Med Practice: Care Provider Med Practice: CP Efforts 100 Estblished
101 Med Practice: Access Med Practice: Ease of contacting 100 Estblished
101 Med Practice: Access Med Practice: Ease of scheduling 100 Estblished
101 Med Practice: Access Med Practice: CP Efforts 100 Estblished
102 Med Practice: Care Provider Med Practice: CP Concern 96 New
102 Med Practice: Care Provider Med Practice: CP Explanation 82 New
102 Med Practice: Care Provider Med Practice: CP Discuss treatments 75 New
102 Med Practice: Care Provider Med Practice: CP Efforts 70 New
102 Med Practice: Access Med Practice: Ease of contacting 100 New
102 Med Practice: Access Med Practice: Ease of scheduling 95 New
102 Med Practice: Access Med Practice: CP Efforts 99 New
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.