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

I have the below data related to a clinical study. I would like to understand if there is a correlation in prescribing the prescription per Genral practioner. In the data there are 3 GP's handling 14 patients GP 1 handled 5 patients, GP 2 handled 4 patients and GP 3. I want to know if the patients have strong or weak correlation in terms of having similar number of prescriptions prescribed by their GP. To understand the correlation by group what is the suitable method I can apply? Thank you for your help.

 

GP_Id Pat_Id    Total_prescribed_prescriptions
1   a   1
1   b   2
1   c   4
1   d   1
1   e   2
2   f   7
2   g   2
2   h   1
2   i   7
3   j   8
3   k   9
3   l   4
3   m   6
3   n   4
1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

You talk about "correlations" but I would not use that word here. Correlation of what variable with what other variable? The General Practitioners are distinct individuals, and despite the fact that you have numbered them 1, 2, 3, there is no concept of a linear or non-linear relationship here, and no concept of "correlation" in the statistical meaning of the word here.

 

As I understand the problem (and please correct me if I am wrong), you want to test if the MEAN number of prescriptions varies from doctor to doctor.

 

So, here's my solution:

 

proc glm data=have;
    class gp_id;
    model total_prescribed_prescriptions=gp_id;
    means gp_id/t;
run;
quit;
    

 

 

--
Paige Miller

View solution in original post

6 REPLIES 6
PaigeMiller
Diamond | Level 26

You talk about "correlations" but I would not use that word here. Correlation of what variable with what other variable? The General Practitioners are distinct individuals, and despite the fact that you have numbered them 1, 2, 3, there is no concept of a linear or non-linear relationship here, and no concept of "correlation" in the statistical meaning of the word here.

 

As I understand the problem (and please correct me if I am wrong), you want to test if the MEAN number of prescriptions varies from doctor to doctor.

 

So, here's my solution:

 

proc glm data=have;
    class gp_id;
    model total_prescribed_prescriptions=gp_id;
    means gp_id/t;
run;
quit;
    

 

 

--
Paige Miller
Chapi
Obsidian | Level 7

Thank you so much for the recommendation. Is it also possible mixed procedure or Intraclass correlation techniques to find out the MEAN number of prescriptions varies from doctor to doctor?

 

Many thanks and best regards,

Kiran Chapidi

PaigeMiller
Diamond | Level 26

Please explain further. I simply don't see correlation as a meaningful thing to do here. As I said in my first message, correlation of which variable with which other variable?

--
Paige Miller
Chapi
Obsidian | Level 7

I think I now know how to explain. I would like to know how to calculate variance between the group and variance within the group of prescriptions. I am not sure how to do this.
PaigeMiller
Diamond | Level 26

The between group variance and the within group variance are outputs from PROC GLM, in the code I gave earlier.

 

The mean square for "Model" is the between group variance. The mean square for "Error" is the within group variance.

--
Paige Miller
Chapi
Obsidian | Level 7
Thanks a lot, I understand now, I accepted your solution. Have a great day!!

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 6 replies
  • 933 views
  • 3 likes
  • 2 in conversation