Austin Wen - Austin Wen STAT 4360 FINAL PROJECT Dr. Park...

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

View Full Document Right Arrow Icon
Austin Wen STAT 4360 FINAL PROJECT Dr. Park May 4 th 2011 #Question1 ##Part A## #Check the directory# ##Tab separate## prostate1 = read.table("prostate1.txt", header = TRUE, sep ="\t") ##CSV file####comma separate## prostate2 = read.csv("prostate2.csv", header = TRUE, sep = ",") prostate3 = rbind( prostate1, prostate2) lpsa = log(psa) #Create new varable lpsa = data.frame (lpsa = lpsa)#data frame variable lpsa prostate3$psa = NULL #Remove variable psa prostate = cbind(prostate3 , lpsa) ##Part B## #Recond variable svi# prostate$svi <- ifelse(prostate$svi == "N", c("No"), c("Yes")) ##Part C## attach(prostate) svi_gleason_table = table ( svi, gleason) chisq.test(svi_gleason_table) #Chi-square test fisher.test(svi_gleason_table)#Fisher's exact test gleason svi 6 7 9 No 35 37 3 Yes 0 19 2 Pearson's Chi-squared test data: svi_gleason_table X-squared = 15.522, df = 2, p-value = 0.000426
Background image of page 1

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

View Full DocumentRight Arrow Icon
Ans: Variable svi and gleason have a significant independence from each other. Fisher's Exact Test for Count Data data: svi_gleason_table p-value = 3.301e-05 alternative hypothesis: two.sided Ans: Variable svi and gleason have a significant independence from each other too. ##Part D##
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/06/2011 for the course STAT 4360 taught by Professor Park during the Spring '11 term at University of Georgia Athens.

Page1 / 10

Austin Wen - Austin Wen STAT 4360 FINAL PROJECT Dr. Park...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online