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
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;
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;
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
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?
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.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.