Skip to content

Commit

Permalink
Create qqPlot.R
Browse files Browse the repository at this point in the history
  • Loading branch information
JD2112 authored Jun 13, 2021
1 parent 5096375 commit 0700b94
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions analysisScripts/qqPlot.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
hladrData <- read.table("myNorm_BAL_HLADR.txt", stringsAsFactors = F, header = T)
head(hladrData)

hladr_si <- hladrData[, c(1,2,4,6,8,10)]
hladr_bal <- hladrData[, c(1,3,5,7,9,11)]
# avarge si and bal data
hladr_si$avg <- (hladr_si$B1_SPU_HLDADR+hladr_si$B2_SPU_HLDADR + hladr_si$B3_SPU_HLDADR +
hladr_si$B4_SPU_HLDADR + hladr_si$B5_SPU_HLDADR)/5
head(hladr_si)
hladr_bal$avg <- (hladr_bal$B1_LAV_HLDADR+hladr_bal$B2_LAV_HLDADR + hladr_bal$B3_LAV_HLDADR +
hladr_bal$B4_LAV_HLDADR + hladr_bal$B5_LAV_HLDADR)/5
head(hladr_bal)
# Create a second file for MWW test
hladr_siAVG <- hladr_si[,c(1,7)]
hladr_siAVG$type <- rep("SI")
head(hladr_siAVG)
hladr_balAVG <- hladr_bal[,c(1,7)]
hladr_balAVG$type <- rep("BAL")
head(hladr_balAVG)


qqnorm(hladr_balAVG$avg, pch = 1, frame = FALSE)
qqline(hladr_balAVG$avg, col = "steelblue", lwd = 2)


library("car")
qqPlot(hladr_balAVG$avg)
qqPlot(hladr_siAVG$avg)

0 comments on commit 0700b94

Please sign in to comment.