forked from ottiP/PCV-analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ottip
committed
Jul 13, 2022
1 parent
9429510
commit 1f3bde8
Showing
10 changed files
with
858,318 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.Rproj.user | ||
.Rhistory | ||
.RData | ||
.Ruserdata |
30,241 changes: 30,241 additions & 0 deletions
30,241
Data/No_pharma_cov/core_table_droprace_filled.csv
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
368,641 changes: 368,641 additions & 0 deletions
368,641
Data/No_pharma_cov/suppl_6mo_table_filled.csv
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
library(tidyverse) | ||
set.seed(5) | ||
df<-tibble(Gender = as.factor(sample(c("m","f"), 200, replace = TRUE, prob=c(0.6,0.4))), | ||
Age_Group = as.factor(sample(c("[<30]","[30-65]", "[65+]"), 200, replace = TRUE, prob=c(0.3,0.6,0.1))), | ||
Response = rbinom(200, 1, prob = 0.2)) | ||
df | ||
model1<-glm(Response ~ Gender+Age_Group, data = df, family = binomial("logit")) | ||
summary(model1) | ||
|
||
df_agg<-df%>%group_by(Gender, Age_Group)%>%summarise(Impressions=n(), Responses=sum(Response))%>% | ||
ungroup()%>%mutate(RR=Responses/Impressions) | ||
df_agg | ||
|
||
df_agg$No_Responses <- df_agg$Impressions- df_agg$Responses | ||
df_agg | ||
|
||
m3<-glm(cbind(Responses, No_Responses) ~ Gender+Age_Group, data=df_agg, family = binomial("logit")) | ||
summary(m3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
data[data$year_month=="2021-12" & data$age=="1" & data$patient_gender_code=="F"&data$race_code=="U"&data$PCV_combined=="U"&data$flu_vacc | ||
=="FALSE"&data$zoster_vacc=="FALSE"&data$bmi_30_plus=="FALSE"&data$comorbidities=="FALSE"&data$income_est_mod=="U",] | ||
|
||
|
||
supp_table_filled[supp_table_filled$year_month=="2021-12" & supp_table_filled$age=="1" & supp_table_filled$patient_gender_code=="F"& supp_table_filled$race_code=="U"&supp_table_filled$PCV_combined=="U"& | ||
supp_table_filled$flu_vacc | ||
=="FALSE"&supp_table_filled$zoster_vacc=="FALSE"&supp_table_filled$bmi_30_plus=="FALSE"&supp_table_filled$comorbidities=="FALSE"&supp_table_filled$income_est_mod=="U" | ||
&supp_table_filled$COVID_severity!="non_resp_severe"& supp_table_filled$COVID_severity!="ICU_crit_care",] |