Chapter7

Chapter7 - Chapter 7 R Chapter 7 Statistics in R 7.1...

This preview shows pages 1–3. Sign up to view the full content.

Chapter 7 R - 1 - Chapter 7 Statistics in R 7.1 One-sample t test Example: daily energy intake in kJ for 11 women. > daily.intake <- c(5260,5470,5640,6180,6390, + 6515,6805,7515,7515,8230,8770) > t.test(daily.intake,mu=7725) > wilcox.test(daily.intake,mu=7725) 7.2 Two-sample t-test 7.2.1 Independent, variance not equal Example: energy expenditure for lean and obese. > energy <-read.table("K://6360//Rdata//energy.txt",sep="\t", + header=TRUE) > t.test(energy\$expend~energy\$stature) or > attach(energy) > t.test(expend~stature) 7.2.2 Independent, variance equal > t.test(energy\$expend~energy\$stature,var.equal=TRUE) Comparison of variances > var.test(energy\$expend~energy\$stature) 7.2.3 Paired t-test Example: concerning pre- and postmenstrual enery intake in a group of women.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Chapter 7 R - 2 - > intake.pre <- c(5260,5470,5640,6180,6390,6515,6805,7515, 7515,8230,8770) > intake.post <- c(3910,4220,3885,5160,5645,4680,5265,5975, 6790,6900,7335) > t.test(intake.pre,intake.post,paired=T) 7.3 Simple linear regression
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 4

Chapter7 - Chapter 7 R Chapter 7 Statistics in R 7.1...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online