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

Hi,

 

I have a data with glucose levels at admission and at discharge in 2 different variables. I want to calculate the P-value for the difference in means between these 2 variables. It means, I want to test if there was a significant change in the glucose level with time in this population.

 

Thanks

 

 

 
SAS Output
 

Variable

HBA1C_ADM

HBA1C_DIS

 

Mean

7.1

6.5

 

SD 

1.0

0.8

 
 
1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

PROC TTEST or PROC ANOVA

 

Check both of the examples sections. 

 

I think, this should be a PAIRED T-Test, so make sure you decide explicitly if it's paired or not. 

View solution in original post

4 REPLIES 4
Reeza
Super User

@seltonsy wrote:

Hi,

 

I have a data with glucose levels at admission and at discharge in 2 different variables. I want to calculate the P-value for the difference in means between these 2 variables. It means, I want to test if there was a significant change in the glucose level with time in this population.

 

Thanks

 

 

 
SAS Output
 

Variable

HBA1C_ADM

HBA1C_DIS

 

Mean

7.1

6.5

 

SD 

1.0

0.8

 
 

 

 

@seltonsy So what is your question to us? Which part, specifically, are you having issues with?

 

seltonsy
Quartz | Level 8

sorry if it wasn't clear enough,

 

I'd like to know what is the proc to use that can perform this test. Compre the means of the two variables and provide p-values (i.e. if the means of the 2 variables are significantly different or not).

 

Thanks in advance.

Reeza
Super User

PROC TTEST or PROC ANOVA

 

Check both of the examples sections. 

 

I think, this should be a PAIRED T-Test, so make sure you decide explicitly if it's paired or not. 

seltonsy
Quartz | Level 8

Thanks,

 

Paired t test is the right answer I guess,

 

Here is what I did,

 

proc ttest data=cohort_1 ;
paired HBA1C_ADM*HBA1C_FIN;
run;

 

 

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 4 replies
  • 733 views
  • 1 like
  • 2 in conversation