Skip to content

Commit

Permalink
update file for rmd rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
meghutch committed Nov 16, 2023
1 parent 26dc790 commit fcf2590
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions Meta-Analysis-Cox-PH-Sensitivity-Analysis.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ source("R/analyze_survival.R")

# Import Data from each Healthcare system

```{r}
```{r message=FALSE, warning=FALSE}
# read in files from results folder
# this folder contains all of the local healthcare system level analyses
rdas <- list.files(
Expand Down Expand Up @@ -163,9 +163,9 @@ concordance_results <- bind_results(results_list = cox_concordance_results_adult
```

**Concordance**
### **Concordance**

```{r}
```{r fig.height=7, fig.width=12}
c_plot <- ggplot(concordance_results %>%
mutate(comorb_method = factor(comorb_method,
levels = c("ind", "score", "lpca")) %>%
Expand Down Expand Up @@ -199,6 +199,8 @@ c_plot <- ggplot(concordance_results %>%
axis.text.x = element_text(size = 13, face = "bold", color = "black"),
axis.text.y = element_text(size = 12, face = "bold"))
c_plot
ggsave("figures/Comorbidity_adjustment.png", c_plot, width = 12, height = 7, dpi = 300)
```

Expand Down Expand Up @@ -250,7 +252,7 @@ set `sm = "HR"` when estimate is logHR (which is coef in our model): <https://cr

\*Note: We excluded sites with \< 3 neuro patients in a category

```{r}
```{r message=FALSE, warning=FALSE}
## adults
meta_results_adults_cns <- list()
Expand Down Expand Up @@ -286,7 +288,7 @@ for (outcome_i in outcomes) {

## Random effects meta-analysis - PNS

```{r}
```{r message=FALSE, warning=FALSE}
## adults
meta_results_adults_pns <- list()
Expand Down Expand Up @@ -411,9 +413,9 @@ datatable(meta_results_pns %>%
filter="top")
```

**Hazard-Ratio**
### **Hazard-Ratio**

```{r}
```{r fig.height=7, fig.width=12}
pd <- position_dodge(width = 0.6)
meta_results_cns$neuro <- "CNS"
Expand Down Expand Up @@ -459,12 +461,14 @@ meta_comorb_comparison <- ggplot(meta_mortality_results %>%
legend.title = element_text(size = 15, face = "bold"),
legend.text = element_text(size = 13, face = "bold"))
meta_comorb_comparison
ggsave("figures/Comorbidity_adjustment_HR.png", meta_comorb_comparison, width = 12, height = 7, dpi = 300)
```

## Evaluate individual covariates

```{r}
```{r message=FALSE, warning=FALSE}
variables <- cox_results %>%
filter(comorb_method == "ind") %>%
distinct(variable)
Expand Down Expand Up @@ -640,6 +644,8 @@ age_hr <- ggplot(meta_ind_age, aes(x=TE.random, y=Covariate, colour=Covariate, g
ggsave("figures/Hazard_ratio_age.png", age_hr, width = 12, height = 6, dpi = 300)
```

### Evaluate all covariates

Create a scale function to identify the min and max CI for each site, excluding sites with values of 'Inf' or our invalid sites

```{r}
Expand Down

0 comments on commit fcf2590

Please sign in to comment.