diff --git a/data_cleaning.Rmd b/data_cleaning.Rmd index 63641d0..1de5340 100644 --- a/data_cleaning.Rmd +++ b/data_cleaning.Rmd @@ -16,7 +16,7 @@ onset <- data.frame(state=onset.2020$state,previous=onset.whole$mean,now=onset.2 onset_FL <- data.frame(state=onset.2020$state[-which(onset.2020$state=="FL")],previous=onset.whole$mean[-which(onset.whole$state=="FL")]-onset.whole$mean[which(onset.whole$state=="FL")],now=onset.2020$onset[-which(onset.2020$state=="FL")]-onset.2020$onset[which(onset.2020$state=="FL")]) -y <- log(onset_FL$now) +y <- onset_FL$now saveRDS(y,"D:/re-emergent RSV timing/sample_requiredata/y.rds") ``` @@ -30,7 +30,7 @@ x_1 <- rep(1,nrow(onset_FL)) x_2 <- as.numeric(scale(pd_hz$`Population Density 2020 Census`)) x_3 <- as.numeric(scale(pd_hz$familysize)) x_4 <- as.numeric(scale(Index$Index)) -x_5 <- log(onset_FL$previous) +x_5 <- onset_FL$previous x <- matrix(data=c(x_1,x_2,x_3,x_4,x_5),nrow = 47,ncol = 5) saveRDS(x,"D:/re-emergent RSV timing/sample_requiredata/x.rds")