BookmarkSubscribeRSS Feed
AEP
Calcite | Level 5 AEP
Calcite | Level 5

Hello,

 

I was wondering if there was a way to calculate correlation coefficients from a dataset that was formated for repeated measure mixed models. I would like to do a correlation between variable A and B, during a pre-determined time. Before I reformat my dataset in a GLMs analysis format, I would like to know if it is possible. Thanks.

 

example of dataset

 

subno A B Time

001 4 7 1

001 2 3 1

001 2 4 1

001 9 7 2

001 5 6 2

001 4 0 2

002 4 7 1

002 2 3 1

002 2 4 1

002 9 7 2

002 5 6 2

002 4 0 2

 

4 REPLIES 4
PaigeMiller
Diamond | Level 26

Does PROC CORR do what you want? If not, why not?

--
Paige Miller
Rick_SAS
SAS Super FREQ

I am tempted to suggest

proc corr data=have;
   by subno time;
   var a b;
run;

 

How is it that you have three measurements at each timepoint for each subject? Usually there is one measurement at each timepoint.

AEP
Calcite | Level 5 AEP
Calcite | Level 5

I found another way. But thank you for your suggestions.

PaigeMiller
Diamond | Level 26

@AEP wrote:

I found another way. But thank you for your suggestions.


@AEP Can you share it with the rest of the community?

--
Paige Miller

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!

What is Bayesian Analysis?

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.

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
  • 4 replies
  • 710 views
  • 0 likes
  • 3 in conversation