turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- Base SAS Programming
- /
- Compare means of 2 variables from admission to dis...

Topic Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-12-2017 02:13 PM

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

Accepted Solutions

Solution

10-12-2017
03:35 PM

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to seltonsy

10-12-2017 03:25 PM

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.

All Replies

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to seltonsy

10-12-2017 03:02 PM

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 OutputVariable

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?

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Reeza

10-12-2017 03:16 PM

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.

Solution

10-12-2017
03:35 PM

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to seltonsy

10-12-2017 03:25 PM

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.

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Reeza

10-12-2017 03:36 PM

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;