Hey Aris,
This seemed simpler to me to just make some comments through an issue here that relate to overleaf comments.
- Malaria prevalence data
This line I think will fail to grab the prevalence data for non African settings as the rasters have changed. This explains why you have so many NAs in meta$prev_2_10
|
PfPR2_10 <- malariaAtlas::getRaster(year = sort(unique(meta$prev_2_10))) |
Just to be sure use:
PfPR2_10 <- malariaAtlas::getRaster(surface = "Plasmodium falciparum PR2 - 10 version 2020", year = sort(unique(meta$prev_2_10)))
- Prevalence analysis:
In the below we can definitely see that COI is increasing as prevalence increases. Probably worth adding the loglinear relationship here (i.e. geom_smooth(method = "lm")
) +
|
ggplot(data = prev_fws, aes(x = prev, y = COI, color = Method)) + |
|
geom_point(alpha = 0.3, position = position_jitter(height = 0.2)) + |
|
scale_x_log10( |
|
breaks = c(0.01, 0.1, 1), |
|
labels = c(0.01, 0.1, 1), |
|
limits = c(0.01, 1) |
|
) + |
|
facet_grid(~Method) + |
|
labs(x = "Log10 Prevalence", y = "Estimated COI") + |
|
scale_color_discrete( |
|
name = "Estimation Method", |
|
labels = c("Discrete Variant Method", "THE REAL McCOIL") |
|
) + |
|
theme_coiaf() |
Also, to test for this relationship, put it in a linear model and have a look at the coefficients and the p_value:
lm(COI ~ (prev) + Method, data = prev_fws) %>% summary()
Call:
lm(formula = COI ~ (prev) + Method, data = prev_fws)
Residuals:
Min 1Q Median 3Q Max
-1.4135 -0.4991 -0.2853 0.4548 7.4829
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 1.26726 0.01336 94.86 <2e-16 ***
prev 1.19990 0.06905 17.38 <2e-16 ***
MethodTHE REAL McCOIL 0.22653 0.01703 13.31 <2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.8644 on 10307 degrees of freedom
(27 observations deleted due to missingness)
Multiple R-squared: 0.04435, Adjusted R-squared: 0.04417
F-statistic: 239.2 on 2 and 10307 DF, p-value: < 2.2e-16
Clearly prevalence increases lead to COI increases, with ~1.2 increase in COI as prevalence goes from 0 to 1, and also noting that McCOIL has a significantly quicker increase of 0.22653 in COI with respect to prevalence compared to discrete variant method (which is the default in the linear model).
However, the R2 is incredibly low, 0.044, which shows that the majority of the variation in COI is not well predicted by prevalence. This is expected as all of this samples are not equal (timing in transmission season, age of sample, clinical status are all unknown and may vary).
What I would do though is also have a look at the R2 for each method on its own. For example, I was having a look at the relationships on the grouped data (was working off the old codebase) and you can see that the continuous method 1 has much less variation around the mean linear relationship than the other discrete approaches. This is probably both due to the fact it's continuous, so the rounding that occurs in discrete approaches is less able to contribute to the variance observed, but also shows that it is probably a more reliable indicator of prevalence than the discrete methods that lose sensitivity with relation to prevalence (please ignore discrete_2_med - this is with your old values).
![image](https://user-images.githubusercontent.com/15249565/151360964-813c0f77-a213-4b25-9944-4523454971e6.png)
But it would be good to show these relationships, and also discuss the R2 for each method on its own, to show that while there is a relationship to be observed, it is highly variable and not that large from this data. The continuous approach though is more informative of prevalence, most likely because it is more capable at not losing signal as a result of relatedness.
Bring this in for the last bit of the analysis in the Results section. Once in this will then help you write that missing Discussion paragraph about comparing to the wider literature.