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-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of gwanme...@aol.com Sent: Friday, July 08, 2011 3:23 AM To: r-help@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@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. ______________________________________________ R-help@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.