[R] Using t tests

Greg Snow Greg.Snow at imail.org
Fri Jul 8 17:43:42 CEST 2011


How are you measuring length of stay?  A chi-square test suggests that you have it categorized, a t-test assumes it is continuous (and relatively symmetric with the amount depending on sample size).

Do you have any censoring? (patients dying or transferring before discharge) if so you should look at survival analysis.

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Gwanmesia at aol.com
Sent: Friday, July 08, 2011 3:23 AM
To: r-help at r-project.org
Subject: [R] Using t tests

Dear Sir,
 
I am doing some work on a population of patients. About half of them are  
admitted into hospital with albumin levels less than 33. The other half have  
albumin levels greater than 33, so I stratify them into 2 groups, x and y  
respectively.
 
I suspect that the average length of stay in hospital for the group of  
patients (x) with albumin levels less than 33 is greater than those  with 
albumin levels greater than 33 (y).
 
What command function do I use (assuming that I will be using the chi  
square test) to show that the length of stay in hospital of those in group x is  
statistically significantly different from those in group y?
 
I look forward to your thoughts.
 
Ivo Gwanmesia

	[[alternative HTML version deleted]]

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list