Water Quality v Precipitation Variability
Scatterplots
Water quality vs. rainfall in the Democratic Republic of the Congo
Water quality vs. rainfall in Rwanda
Runoff vs. rainfall in the Democratic Republic of the Congo
Runoff vs. rainfall in Rwanda
Time Series Data
Precipitation & Runoff Time Series: Democratic Republic of the Congo
Precipitation & Runoff Time Series: Rwanda
Water Quality Mapping Data
Mapped Water Quality: Democratic Republic of the Congo
Precipitation & Runoff Time Series: Rwanda
Note: Given tight clustering, this is zoomed in so far it does not display mapping resolution details. The water quality data is also not pulling in in gradient form (not reading as continuous?). For discussion with Denis on better mapping path.
Linear Regressions
Check correlation coefficient to assess linearity
Democratic Republic of the Congo
cor
-0.1416783
Rwanda
cor
0.1431377
Linear regression of water quality versus rainfall in the Democratic Republic of the Congo:
Call:
lm(formula = Colony ~ imerg_rf, data = rf_at_wq_DRC_all)
Residuals:
Min 1Q Median 3Q Max
-940.2 -913.2 -723.0 -80.5 13059.8
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 940.23 183.62 5.121 7.57e-07 ***
imerg_rf -20.59 10.55 -1.952 0.0524 .
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 2197 on 186 degrees of freedom
Multiple R-squared: 0.02007, Adjusted R-squared: 0.0148
F-statistic: 3.81 on 1 and 186 DF, p-value: 0.05245
Linear regression of water quality versus rainfall in Rwanda:
Call:
lm(formula = MPN ~ imerg_rf, data = rf_at_wq_Rwanda_all)
Residuals:
Min 1Q Median 3Q Max
-83.53 -34.52 -29.76 57.70 65.54
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 34.4567 1.7938 19.209 < 2e-16 ***
imerg_rf 1.4186 0.3244 4.372 1.37e-05 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 44.43 on 914 degrees of freedom
Multiple R-squared: 0.02049, Adjusted R-squared: 0.01942
F-statistic: 19.12 on 1 and 914 DF, p-value: 1.37e-05
Binomial Regressions of Water Quality versus Rainfall
Negative binomial regression of water quality versus rainfall in the Democratic Republic of the Congo:
Call:
glm.nb(formula = Colony ~ imerg_rf, data = rf_at_wq_DRC_all,
init.theta = 0.2851242306, link = log)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 6.862953 0.156535 43.843 < 2e-16 ***
imerg_rf -0.048036 0.009004 -5.335 9.56e-08 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for Negative Binomial(0.2851) family taken to be 1)
Null deviance: 273.67 on 187 degrees of freedom
Residual deviance: 253.81 on 186 degrees of freedom
AIC: 2476.3
Number of Fisher Scoring iterations: 1
Theta: 0.2851
Std. Err.: 0.0237
2 x log-likelihood: -2470.3450
(With Site Fixed Effects): Negative binomial regression of water quality versus rainfall in the Democratic Republic of the Congo:
Call:
glm.nb(formula = Colony ~ imerg_rf + SiteID, data = rf_at_wq_DRC_all,
init.theta = 0.2853835486, link = log)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 7.180e+00 6.997e-01 10.261 < 2e-16 ***
imerg_rf -4.649e-02 9.492e-03 -4.898 9.66e-07 ***
SiteID -1.105e-09 2.353e-09 -0.470 0.639
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for Negative Binomial(0.2854) family taken to be 1)
Null deviance: 273.91 on 187 degrees of freedom
Residual deviance: 253.77 on 185 degrees of freedom
AIC: 2478.1
Number of Fisher Scoring iterations: 1
Theta: 0.2854
Std. Err.: 0.0238
2 x log-likelihood: -2470.0830
Binomial mixed effects model of water quality versus rainfall in the Democratic Republic of the Congo:
#m3DRC <- glmer(
# Colony ~ imerg_rf + SiteID,
# data = rf_at_wq_DRC_all,
# family = binomial(link = "logit")
#)
#summary(m3DRC)Note: Error: “No random effects”
Negative binomial regression of water quality versus rainfall in Rwanda
Note: Initially got error – “Error in prettyNum(.Internal(format(x, trim, digits, nsmall, width, 3L, : invalid ‘nsmall’ argument.” I believe this is either due to high AIC or theta? Even with including AIC and theta adjustments “control = glm.control(maxit = 500), init.theta = 1.0” the model doesn’t run. Is this underdispersion due to only baselining? Should we revert to a Poisson model?
(With Site Fixed Effects): Negative binomial regression of water quality versus rainfall in Rwanda:
#m2Rwanda <- glm.nb(MPN ~ imerg_rf + SiteID, data=rf_at_wq_Rwanda_all)
#summary(m2Rwanda)Note: Initially got error – “Error in prettyNum(.Internal(format(x, trim, digits, nsmall, width, 3L, : invalid ‘nsmall’ argument.” I believe this is either due to high AIC or theta? Even with including AIC and theta adjustments “control = glm.control(maxit = 500), init.theta = 1.0” the model doesn’t run.
Binomial mixed effects model of water quality versus rainfall in Rwanda:
#m3Rwanda <- glmer(
# MPN ~ imerg_rf + SiteID,
# data = rf_at_wq_Rwanda_all,
# family = binomial(link = "logit")
#)
#summary(m3Rwanda)Note: Error: “No random effects”
Negative binomial regression of water quality versus 7-day rainfall in the Democratic Republic of the Congo:
Call:
glm.nb(formula = Colony ~ img7d, data = rf_at_wq_DRC_all, init.theta = 0.2704613534,
link = log)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 6.940258 0.199472 34.793 <2e-16 ***
img7d -0.006656 0.002789 -2.387 0.017 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for Negative Binomial(0.2705) family taken to be 1)
Null deviance: 259.81 on 187 degrees of freedom
Residual deviance: 255.90 on 186 degrees of freedom
AIC: 2491.7
Number of Fisher Scoring iterations: 1
Theta: 0.2705
Std. Err.: 0.0224
2 x log-likelihood: -2485.6670
(With Site Fixed Effects): Negative binomial regression of water quality versus 7-day rainfall in the Democratic Republic of the Congo:
Call:
glm.nb(formula = Colony ~ img7d + SiteID, data = rf_at_wq_DRC_all,
init.theta = 0.2719376215, link = log)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 7.741e+00 7.071e-01 10.948 <2e-16 ***
img7d -6.347e-03 2.945e-03 -2.155 0.0312 *
SiteID -2.765e-09 2.420e-09 -1.143 0.2532
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for Negative Binomial(0.2719) family taken to be 1)
Null deviance: 261.21 on 187 degrees of freedom
Residual deviance: 255.68 on 185 degrees of freedom
AIC: 2492.1
Number of Fisher Scoring iterations: 1
Theta: 0.2719
Std. Err.: 0.0225
2 x log-likelihood: -2484.0800
Binomial mixed effects model of water quality versus 7-day rainfall in the Democratic Republic of the Congo:
#m3DRC <- glmer(
# Colony ~ img7d + SiteID,
# data = rf_at_wq_DRC_all,
# family = binomial(link = "logit")
#)
#summary(m3DRC)Note: Error: “No random effects”
Negative binomial regression of water quality versus 7-day rainfall in Rwanda
Note: Got error – “invalid ‘nsmall’ argument.” I believe this is either due to high AIC or theta?
(With Site Fixed Effects): Negative binomial regression of water quality versus 7-day rainfall in Rwanda:
#m2Rwanda <- glm.nb(MPN ~ img7d + SiteID, data=rf_at_wq_Rwanda_all)
#summary(m2Rwanda)Note: Got error – “invalid ‘nsmall’ argument.” I believe this is either due to high AIC or theta?
Binomial mixed effects model of water quality versus 7-day rainfall in Rwanda:
#m3Rwanda <- glmer(
# MPN ~ img7d + SiteID,
# data = rf_at_wq_Rwanda_all,
# family = binomial(link = "logit")
#)
#summary(m3Rwanda)Note: Error: “No random effects”
Negative binomial regression of water quality versus 14-day rainfall in the Democratic Republic of the Congo:
Call:
glm.nb(formula = Colony ~ img14d, data = rf_at_wq_DRC_all, init.theta = 0.2671893276,
link = log)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 6.738707 0.209998 32.089 <2e-16 ***
img14d -0.001098 0.001677 -0.655 0.513
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for Negative Binomial(0.2672) family taken to be 1)
Null deviance: 256.72 on 187 degrees of freedom
Residual deviance: 256.39 on 186 degrees of freedom
AIC: 2495.2
Number of Fisher Scoring iterations: 1
Theta: 0.2672
Std. Err.: 0.0221
2 x log-likelihood: -2489.2190
(With Site Fixed Effects): Negative binomial regression of water quality versus 14-day rainfall in the Democratic Republic of the Congo:
Call:
glm.nb(formula = Colony ~ img14d + SiteID, data = rf_at_wq_DRC_all,
init.theta = 0.2688414129, link = log)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 7.581e+00 7.079e-01 10.710 <2e-16 ***
img14d -7.803e-04 1.757e-03 -0.444 0.657
SiteID -2.958e-09 2.414e-09 -1.225 0.221
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for Negative Binomial(0.2688) family taken to be 1)
Null deviance: 258.28 on 187 degrees of freedom
Residual deviance: 256.14 on 185 degrees of freedom
AIC: 2495.4
Number of Fisher Scoring iterations: 1
Theta: 0.2688
Std. Err.: 0.0223
2 x log-likelihood: -2487.4190
Binomial mixed effects model of water quality versus 14-day rainfall in the Democratic Republic of the Congo:
#m3DRC <- glmer(
# Colony ~ img14d + SiteID,
# data = rf_at_wq_DRC_all,
# family = binomial(link = "logit")
#)
#summary(m3DRC)Note: Error: “No random effects”
Negative binomial regression of water quality versus 14-day rainfall in Rwanda
Note: Got error – “invalid ‘nsmall’ argument.” I believe this is either due to high AIC or theta?
(With Site Fixed Effects): Negative binomial regression of water quality versus 14-day rainfall in Rwanda:
#m2Rwanda <- glm.nb(MPN ~ img14d + SiteID, data=rf_at_wq_Rwanda_all)
#summary(m2Rwanda)Note: Got error – “invalid ‘nsmall’ argument.” I believe this is either due to high AIC or theta?
Binomial mixed effects model of water quality versus 14-day rainfall in Rwanda:
#m3Rwanda <- glmer(
# MPN ~ img14d + SiteID,
# data = rf_at_wq_Rwanda_all,
# family = binomial(link = "logit")
#)
#summary(m3Rwanda)Note: Error: “No random effects”
Negative binomial regression of water quality versus 30-day rainfall in the Democratic Republic of the Congo:
Call:
glm.nb(formula = Colony ~ img30d, data = rf_at_wq_DRC_all, init.theta = 0.2671192387,
link = log)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 6.5415653 0.2233972 29.282 <2e-16 ***
img30d 0.0005253 0.0009469 0.555 0.579
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for Negative Binomial(0.2671) family taken to be 1)
Null deviance: 256.66 on 187 degrees of freedom
Residual deviance: 256.40 on 186 degrees of freedom
AIC: 2495.3
Number of Fisher Scoring iterations: 1
Theta: 0.2671
Std. Err.: 0.0221
2 x log-likelihood: -2489.2950
(With Site Fixed Effects): Negative binomial regression of water quality versus 30-day rainfall in the Democratic Republic of the Congo:
Call:
glm.nb(formula = Colony ~ img30d + SiteID, data = rf_at_wq_DRC_all,
init.theta = 0.2688855106, link = log)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 7.441e+00 7.053e-01 10.550 <2e-16 ***
img30d 4.761e-04 9.719e-04 0.490 0.624
SiteID -3.025e-09 2.366e-09 -1.278 0.201
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for Negative Binomial(0.2689) family taken to be 1)
Null deviance: 258.33 on 187 degrees of freedom
Residual deviance: 256.13 on 185 degrees of freedom
AIC: 2495.4
Number of Fisher Scoring iterations: 1
Theta: 0.2689
Std. Err.: 0.0223
2 x log-likelihood: -2487.3720
Binomial mixed effects model of water quality versus 30-day rainfall in the Democratic Republic of the Congo:
#m3DRC <- glmer(
# Colony ~ img30d + SiteID,
# data = rf_at_wq_DRC_all,
# family = binomial(link = "logit")
#)
#summary(m3DRC)Note: Error: “No random effects”
Negative binomial regression of water quality versus 30-day rainfall in Rwanda
Note: Got error – “invalid ‘nsmall’ argument.” I believe this is either due to high AIC or theta?
(With Site Fixed Effects): Negative binomial regression of water quality versus 30-day rainfall in Rwanda:
#m2Rwanda <- glm.nb(MPN ~ img30d + SiteID, data=rf_at_wq_Rwanda_all)
#summary(m2Rwanda)Note: Got error – “invalid ‘nsmall’ argument.” I believe this is either due to high AIC or theta?
Binomial mixed effects model of water quality versus 30-day rainfall in Rwanda:
#m3Rwanda <- glmer(
# MPN ~ img30d + SiteID,
# data = rf_at_wq_Rwanda_all,
# family = binomial(link = "logit")
#)
#summary(m3Rwanda)Note: Error: “No random effects”
Binomial Regressions of Water Quality versus Runoff
Negative binomial regression of water quality versus runoff in the Democratic Republic of the Congo:
Call:
glm.nb(formula = Colony ~ lis_runoff, data = rf_at_wq_DRC_all,
init.theta = 0.2794810443, link = log)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 6.77367 0.15203 44.554 < 2e-16 ***
lis_runoff -0.07996 0.01933 -4.137 3.52e-05 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for Negative Binomial(0.2795) family taken to be 1)
Null deviance: 268.34 on 187 degrees of freedom
Residual deviance: 254.60 on 186 degrees of freedom
AIC: 2482.1
Number of Fisher Scoring iterations: 1
Theta: 0.2795
Std. Err.: 0.0232
2 x log-likelihood: -2476.1330
(With Site Fixed Effects): Negative binomial water quality versus runoff in the Democratic Republic of the Congo:
Note: Initially got error – “Error in glm.fitter() NA/NaN/Inf in ‘x’” but there are no missing values. Model not converging. Should we revert to a Poisson model, often shown as the correction?
Binomial mixed effects model of water quality versus runoff in the Democratic Republic of the Congo:
#m3DRC <- glmer(
# Colony ~ lis_runoff + SiteID,
# data = rf_at_wq_DRC_all,
# family = binomial(link = "logit")
#)
#summary(m3DRC)Note: Error: “No random effects”
Negative binomial regression of water quality versus runoff in Rwanda
Note: Got error – “invalid ‘nsmall’ argument.” I believe this is either due to high AIC or theta?
(With Site Fixed Effects): Negative binomial regression of water quality versus runoff in Rwanda:
#m2Rwanda <- glm.nb(MPN ~ lis_runoff + SiteID, data=rf_at_wq_Rwanda_all)
#summary(m2Rwanda)Note: Got error – “invalid ‘nsmall’ argument.” I believe this is either due to high AIC or theta?
Binomial mixed effects model of water quality versus runoff in Rwanda:
#m3Rwanda <- glmer(
# MPN ~ lis_runoff + SiteID,
# data = rf_at_wq_Rwanda_all,
# family = binomial(link = "logit")
#)
#summary(m3Rwanda)Note: Error: “No random effects”
Negative binomial regression of water quality versus 30-day runoff in the Democratic Republic of the Congo:
Call:
glm.nb(formula = Colony ~ lis30d, data = rf_at_wq_DRC_all, init.theta = 0.2670300772,
link = log)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 6.574489 0.200938 32.719 <2e-16 ***
lis30d 0.001066 0.002377 0.448 0.654
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for Negative Binomial(0.267) family taken to be 1)
Null deviance: 256.57 on 187 degrees of freedom
Residual deviance: 256.41 on 186 degrees of freedom
AIC: 2495.4
Number of Fisher Scoring iterations: 1
Theta: 0.2670
Std. Err.: 0.0221
2 x log-likelihood: -2489.3930
(With Site Fixed Effects): Negative binomial water quality versus 30-day runoff in the Democratic Republic of the Congo:
Call:
glm.nb(formula = Colony ~ lis30d + SiteID, data = rf_at_wq_DRC_all,
init.theta = 0.268849347, link = log)
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 7.476e+00 7.053e-01 10.599 <2e-16 ***
lis30d 1.112e-03 2.423e-03 0.459 0.646
SiteID -3.072e-09 2.351e-09 -1.307 0.191
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for Negative Binomial(0.2688) family taken to be 1)
Null deviance: 258.29 on 187 degrees of freedom
Residual deviance: 256.14 on 185 degrees of freedom
AIC: 2495.4
Number of Fisher Scoring iterations: 1
Theta: 0.2688
Std. Err.: 0.0223
2 x log-likelihood: -2487.4110
Binomial mixed effects model of water quality versus 30-day runoff in the Democratic Republic of the Congo:
#m3DRC <- glmer(
# Colony ~ lis30d + SiteID,
# data = rf_at_wq_DRC_all,
# family = binomial(link = "logit")
#)
#summary(m3DRC)Note: Error: “No random effects”
Negative binomial regression of water quality versus 30-day runoff in Rwanda
Note: Got error – “invalid ‘nsmall’ argument.” I believe this is either due to high AIC or theta?
(With Site Fixed Effects): Negative binomial regression of water quality versus 30-day runoff in Rwanda:
#m2Rwanda <- glm.nb(MPN ~ lis30d + SiteID, data=rf_at_wq_Rwanda_all)
#summary(m2Rwanda)Note: Got error – “invalid ‘nsmall’ argument.” I believe this is either due to high AIC or theta?
Binomial mixed effects model of water quality versus 30-day runoff in Rwanda:
#m3Rwanda <- glmer(
# MPN ~ lis30d + SiteID,
# data = rf_at_wq_Rwanda_all,
# family = binomial(link = "logit")
#)
#summary(m3Rwanda)Note: Error: “No random effects”
Create Categorical Variables: WHO Risks for the Democratic Republic of the Congo:
#rf_at_wq_DRC_all$Categories <- cut(rf_at_wq_DRC_all$Colony,
#breaks=c(0, 1, 10, 100, 100000),
#labels=c('Low_Risk', 'Intermediate Risk', 'High_Risk', 'Very_High_Risk'))
rf_at_wq_DRC_all <- within(rf_at_wq_DRC_all, {
Colony.cat <- NA # need to initialize variable
Colony.cat[Colony < 1] <- "Low_Risk"
Colony.cat[Colony >= 1 & Colony < 11 ] <- "Intermediate_Risk"
Colony.cat[Colony >= 11 & Colony < 100] <- "High_Risk"
Colony.cat[Colony >= 100] <- "a_Very_High_Risk"
} )
table1 <-
rf_at_wq_DRC_all %>%
tbl_summary(include = c(Colony, Colony.cat)) %>%
modify_header(label = "**WHO Risk Categories for Samples from the DRC**")
table1| WHO Risk Categories for Samples from the DRC | N = 1881 |
|---|---|
| Colony | 58 (12, 323) |
| Colony.cat | |
| a_Very_High_Risk | 71 (38%) |
| High_Risk | 72 (38%) |
| Intermediate_Risk | 39 (21%) |
| Low_Risk | 6 (3.2%) |
| 1 Median (IQR); n (%) | |
Create Categorical Variables: WHO Risks for Rwanda:
#rf_at_wq_Rwanda_all$Categories <- cut(rf_at_wq_Rwanda_all$MPN,
#breaks=c(0, 1, 10, 100, 100000),
#labels=c('Low_Risk', 'Intermediate Risk', 'High_Risk', 'Very_High_Risk'))
rf_at_wq_Rwanda_all <- within(rf_at_wq_Rwanda_all, {
MPN.cat <- NA # need to initialize variable
MPN.cat[MPN < 1] <- "Low_Risk"
MPN.cat[MPN >= 1 & MPN < 11 ] <- "Intermediate_Risk"
MPN.cat[MPN >= 11 & MPN < 100] <- "High_Risk"
MPN.cat[MPN >= 100] <- "a_Very_High_Risk"
} )
table1 <-
rf_at_wq_Rwanda_all %>%
tbl_summary(include = c(MPN, MPN.cat))%>%
modify_header(label = "**WHO Risk Categories for Samples from the Rwanda**")
table1| WHO Risk Categories for Samples from the Rwanda | N = 9161 |
|---|---|
| MPN | 10 (0, 100) |
| MPN.cat | |
| a_Very_High_Risk | 305 (33%) |
| High_Risk | 146 (16%) |
| Intermediate_Risk | 186 (20%) |
| Low_Risk | 279 (30%) |
| 1 Median (IQR); n (%) | |
Multinomial Logistic Regression Model of water quality versus precipitation in the DRC:
#rf_at_wq_DRC_all$Colony2.cat <- relevel(rf_at_wq_DRC_all$Colony.cat, ref = "imerg_rf")
#test <- multinom(Colony2.cat ~ imerg_rf, data = rf_at_wq_DRC_all)
#summary(test)
#mldata <- mlogit.data(mydata, choice="y", shape="wide")
#mlogit.model1 <- mlogit(y ~ 1| col1+col2, data=mldata)
#mlogit.model2 = multinom(y ~ 1 + col1+col2, data=mydata)
#stargazer(mlogit.model2)
#my.model <- multinom(Colony.cat ~ imerg_rf, data=rf_at_wq_DRC_all)
#tidy(my.model, exponentiate = FALSE) #display model
# calculate predicted probabilities
#pred.probs <- predict(my.model, type = "probs")
mlr_DRC <- multinom(Colony.cat ~ imerg_rf, data = rf_at_wq_DRC_all)# weights: 12 (6 variable)
initial value 260.623340
iter 10 value 219.289268
final value 219.273108
converged
summary(mlr_DRC)Call:
multinom(formula = Colony.cat ~ imerg_rf, data = rf_at_wq_DRC_all)
Coefficients:
(Intercept) imerg_rf
High_Risk -0.09973338 0.01364508
Intermediate_Risk -0.68843371 0.01113391
Low_Risk -2.39765536 -0.01237835
Std. Errors:
(Intercept) imerg_rf
High_Risk 0.1918431 0.01139343
Intermediate_Risk 0.2285109 0.01340820
Low_Risk 0.4668177 0.03760472
Residual Deviance: 438.5462
AIC: 450.5462
parameters(mlr_DRC, exponentiate=T, summary=T, digits=3, ci_digits=3)# Response level: high_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
------------------------------------------------------------------
(Intercept) | 0.905 | 0.174 | [0.621, 1.318] | -0.520 | 0.603
imerg rf | 1.014 | 0.012 | [0.991, 1.037] | 1.198 | 0.231
# Response level: intermediate_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
------------------------------------------------------------------
(Intercept) | 0.502 | 0.115 | [0.321, 0.786] | -3.013 | 0.003
imerg rf | 1.011 | 0.014 | [0.985, 1.038] | 0.830 | 0.406
# Response level: low_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
-------------------------------------------------------------------
(Intercept) | 0.091 | 0.042 | [0.036, 0.227] | -5.136 | < .001
imerg rf | 0.988 | 0.037 | [0.918, 1.063] | -0.329 | 0.742
Model: Colony.cat ~ imerg_rf (188 Observations)
Residual standard deviation: 1.552 (df = 182)
McFadden's R2: 0.004; adjusted McFadden's R2: -9.858e-05
Uncertainty intervals (equal-tailed) and p-values (two-tailed) computed
using a Wald normal distribution approximation.
mpred_DRC <- ggemmeans(mlr_DRC, terms="imerg_rf")Data were 'prettified'. Consider using `terms="imerg_rf [all]"` to get
smooth plots.
print(mpred_DRC, digits=4)# Predicted probabilities of Colony.cat
Colony.cat: a_Very_High_Risk
imerg_rf | Predicted | 95% CI
-------------------------------------
0 | 0.4003 | 0.3811, 0.4198
15 | 0.3597 | 0.3423, 0.3776
25 | 0.3330 | 0.3104, 0.3563
40 | 0.2940 | 0.2635, 0.3264
65 | 0.2340 | 0.1970, 0.2755
Colony.cat: High_Risk
imerg_rf | Predicted | 95% CI
-------------------------------------
0 | 0.3623 | 0.3443, 0.3806
15 | 0.3995 | 0.3814, 0.4180
25 | 0.4239 | 0.3986, 0.4495
40 | 0.4592 | 0.4188, 0.5002
65 | 0.5141 | 0.4449, 0.5828
Colony.cat: Intermediate_Risk
imerg_rf | Predicted | 95% CI
-------------------------------------
0 | 0.2011 | 0.1908, 0.2118
15 | 0.2136 | 0.2031, 0.2244
25 | 0.2210 | 0.2064, 0.2362
40 | 0.2305 | 0.2069, 0.2560
65 | 0.2424 | 0.2010, 0.2892
Colony.cat: Low_Risk
imerg_rf | Predicted | 95% CI
-------------------------------------
0 | 0.0364 | 0.0353, 0.0375
15 | 0.0272 | 0.0264, 0.0279
25 | 0.0222 | 0.0215, 0.0230
40 | 0.0163 | 0.0156, 0.0170
65 | 0.0095 | 0.0091, 0.0099
Not all rows are shown in the output. Use `print(..., n = Inf)` to show
all rows.
Multinomial Logistic Regression Model of water quality versus precipitation in Rwanda:
mlr_Rwanda <- multinom(MPN.cat ~ imerg_rf, data = rf_at_wq_Rwanda_all)# weights: 12 (6 variable)
initial value 1269.845635
iter 10 value 1221.974274
iter 10 value 1221.974265
iter 10 value 1221.974265
final value 1221.974265
converged
summary(mlr_Rwanda)Call:
multinom(formula = MPN.cat ~ imerg_rf, data = rf_at_wq_Rwanda_all)
Coefficients:
(Intercept) imerg_rf
High_Risk -0.6412248 -0.02597848
Intermediate_Risk -0.2898038 -0.06212777
Low_Risk 0.1585346 -0.07867744
Std. Errors:
(Intercept) imerg_rf
High_Risk 0.1252073 0.02096928
Intermediate_Risk 0.1153131 0.02199606
Low_Risk 0.1031090 0.02021751
Residual Deviance: 2443.949
AIC: 2455.949
parameters(mlr_Rwanda, exponentiate=T, summary=T, digits=3, ci_digits=3)# Response level: high_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
-------------------------------------------------------------------
(Intercept) | 0.527 | 0.066 | [0.412, 0.673] | -5.121 | < .001
imerg rf | 0.974 | 0.020 | [0.935, 1.015] | -1.239 | 0.215
# Response level: intermediate_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
------------------------------------------------------------------
(Intercept) | 0.748 | 0.086 | [0.597, 0.938] | -2.513 | 0.012
imerg rf | 0.940 | 0.021 | [0.900, 0.981] | -2.824 | 0.005
# Response level: low_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
-------------------------------------------------------------------
(Intercept) | 1.172 | 0.121 | [0.957, 1.434] | 1.538 | 0.124
imerg rf | 0.924 | 0.019 | [0.888, 0.962] | -3.892 | < .001
Model: MPN.cat ~ imerg_rf (916 Observations)
Residual standard deviation: 1.639 (df = 910)
McFadden's R2: 0.008; adjusted McFadden's R2: 0.007
Uncertainty intervals (equal-tailed) and p-values (two-tailed) computed
using a Wald normal distribution approximation.
mpred_Rwanda <- ggemmeans(mlr_Rwanda, terms="imerg_rf")Data were 'prettified'. Consider using `terms="imerg_rf [all]"` to get
smooth plots.
print(mpred_Rwanda, digits=4)# Predicted probabilities of MPN.cat
MPN.cat: a_Very_High_Risk
imerg_rf | Predicted | 95% CI
-------------------------------------
0 | 0.2901 | 0.2829, 0.2975
5 | 0.3569 | 0.3492, 0.3647
15 | 0.4972 | 0.4739, 0.5204
20 | 0.5643 | 0.5329, 0.5952
35 | 0.7289 | 0.6881, 0.7663
MPN.cat: High_Risk
imerg_rf | Predicted | 95% CI
-------------------------------------
0 | 0.1528 | 0.1492, 0.1565
5 | 0.1651 | 0.1615, 0.1687
15 | 0.1773 | 0.1673, 0.1878
20 | 0.1768 | 0.1631, 0.1913
35 | 0.1546 | 0.1342, 0.1775
MPN.cat: Intermediate_Risk
imerg_rf | Predicted | 95% CI
-------------------------------------
0 | 0.2171 | 0.2115, 0.2229
5 | 0.1958 | 0.1913, 0.2004
15 | 0.1465 | 0.1386, 0.1548
20 | 0.1219 | 0.1140, 0.1303
35 | 0.0620 | 0.0577, 0.0667
MPN.cat: Low_Risk
imerg_rf | Predicted | 95% CI
-------------------------------------
0 | 0.3400 | 0.3313, 0.3487
5 | 0.2822 | 0.2755, 0.2890
15 | 0.1790 | 0.1690, 0.1894
20 | 0.1371 | 0.1282, 0.1464
35 | 0.0544 | 0.0513, 0.0577
Not all rows are shown in the output. Use `print(..., n = Inf)` to show
all rows.
Multinomial Logistic Regression Model of water quality versus 30-day precipitation in the DRC:
mlr_DRC <- multinom(Colony.cat ~ img30d, data = rf_at_wq_DRC_all)# weights: 12 (6 variable)
initial value 260.623340
iter 10 value 216.843685
final value 216.752599
converged
summary(mlr_DRC)Call:
multinom(formula = Colony.cat ~ img30d, data = rf_at_wq_DRC_all)
Coefficients:
(Intercept) img30d
High_Risk -0.1980589 0.001092302
Intermediate_Risk -0.4212866 -0.001041587
Low_Risk -1.6751767 -0.006798145
Std. Errors:
(Intercept) img30d
High_Risk 0.2761186 0.001130589
Intermediate_Risk 0.3035702 0.001365130
Low_Risk 0.5169491 0.003969756
Residual Deviance: 433.5052
AIC: 445.5052
parameters(mlr_DRC, exponentiate=T, summary=T, digits=3, ci_digits=3)# Response level: high_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
------------------------------------------------------------------
(Intercept) | 0.820 | 0.227 | [0.477, 1.409] | -0.717 | 0.473
img30d | 1.001 | 0.001 | [0.999, 1.003] | 0.966 | 0.334
# Response level: intermediate_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
------------------------------------------------------------------
(Intercept) | 0.656 | 0.199 | [0.362, 1.190] | -1.388 | 0.165
img30d | 0.999 | 0.001 | [0.996, 1.002] | -0.763 | 0.445
# Response level: low_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
------------------------------------------------------------------
(Intercept) | 0.187 | 0.097 | [0.068, 0.516] | -3.241 | 0.001
img30d | 0.993 | 0.004 | [0.986, 1.001] | -1.712 | 0.087
Model: Colony.cat ~ img30d (188 Observations)
Residual standard deviation: 1.543 (df = 182)
McFadden's R2: 0.016; adjusted McFadden's R2: 0.011
Uncertainty intervals (equal-tailed) and p-values (two-tailed) computed
using a Wald normal distribution approximation.
mpred_DRC <- ggemmeans(mlr_DRC, terms="img30d")Data were 'prettified'. Consider using `terms="img30d [all]"` to get
smooth plots.
print(mpred_DRC, digits=4)# Predicted probabilities of Colony.cat
Colony.cat: a_Very_High_Risk
img30d | Predicted | 95% CI
-----------------------------------
0 | 0.3754 | 0.3500, 0.4015
100 | 0.3844 | 0.3656, 0.4036
200 | 0.3844 | 0.3677, 0.4013
300 | 0.3784 | 0.3578, 0.3994
500 | 0.3556 | 0.3196, 0.3933
Colony.cat: High_Risk
img30d | Predicted | 95% CI
-----------------------------------
0 | 0.3080 | 0.2864, 0.3304
100 | 0.3518 | 0.3338, 0.3701
200 | 0.3923 | 0.3755, 0.4094
300 | 0.4307 | 0.4088, 0.4529
500 | 0.5036 | 0.4608, 0.5464
Colony.cat: Intermediate_Risk
img30d | Predicted | 95% CI
-----------------------------------
0 | 0.2463 | 0.2284, 0.2652
100 | 0.2273 | 0.2155, 0.2395
200 | 0.2048 | 0.1953, 0.2146
300 | 0.1817 | 0.1713, 0.1925
500 | 0.1386 | 0.1264, 0.1517
Colony.cat: Low_Risk
img30d | Predicted | 95% CI
-----------------------------------
0 | 0.0703 | 0.0663, 0.0746
100 | 0.0365 | 0.0354, 0.0376
200 | 0.0185 | 0.0181, 0.0189
300 | 0.0092 | 0.0091, 0.0094
500 | 0.0022 | 0.0022, 0.0022
Not all rows are shown in the output. Use `print(..., n = Inf)` to show
all rows.
Multinomial Logistic Regression Model of water quality versus 30-day precipitation in Rwanda:
mlr_Rwanda <- multinom(MPN.cat ~ img30d, data = rf_at_wq_Rwanda_all)# weights: 12 (6 variable)
initial value 1269.845635
iter 10 value 1213.456561
final value 1213.456471
converged
summary(mlr_Rwanda)Call:
multinom(formula = MPN.cat ~ img30d, data = rf_at_wq_Rwanda_all)
Coefficients:
(Intercept) img30d
High_Risk -0.9781305 0.002079402
Intermediate_Risk -0.9046845 0.003460123
Low_Risk 0.4567398 -0.005305365
Std. Errors:
(Intercept) img30d
High_Risk 0.2234346 0.001698283
Intermediate_Risk 0.2116255 0.001581524
Low_Risk 0.1661933 0.001399585
Residual Deviance: 2426.913
AIC: 2438.913
parameters(mlr_Rwanda, exponentiate=T, summary=T, digits=3, ci_digits=3)# Response level: high_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
-------------------------------------------------------------------
(Intercept) | 0.376 | 0.084 | [0.243, 0.583] | -4.378 | < .001
img30d | 1.002 | 0.002 | [0.999, 1.005] | 1.224 | 0.221
# Response level: intermediate_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
-------------------------------------------------------------------
(Intercept) | 0.405 | 0.086 | [0.267, 0.613] | -4.275 | < .001
img30d | 1.003 | 0.002 | [1.000, 1.007] | 2.188 | 0.029
# Response level: low_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
-------------------------------------------------------------------
(Intercept) | 1.579 | 0.262 | [1.140, 2.187] | 2.748 | 0.006
img30d | 0.995 | 0.001 | [0.992, 0.997] | -3.791 | < .001
Model: MPN.cat ~ img30d (916 Observations)
Residual standard deviation: 1.633 (df = 910)
McFadden's R2: 0.015; adjusted McFadden's R2: 0.014
Uncertainty intervals (equal-tailed) and p-values (two-tailed) computed
using a Wald normal distribution approximation.
mpred_Rwanda <- ggemmeans(mlr_Rwanda, terms="img30d")Data were 'prettified'. Consider using `terms="img30d [all]"` to get
smooth plots.
print(mpred_Rwanda, digits=4)# Predicted probabilities of MPN.cat
MPN.cat: a_Very_High_Risk
img30d | Predicted | 95% CI
-----------------------------------
0 | 0.2977 | 0.2850, 0.3106
60 | 0.3255 | 0.3168, 0.3343
120 | 0.3412 | 0.3342, 0.3483
160 | 0.3444 | 0.3354, 0.3534
280 | 0.3229 | 0.3029, 0.3436
MPN.cat: High_Risk
img30d | Predicted | 95% CI
-----------------------------------
0 | 0.1119 | 0.1081, 0.1159
60 | 0.1386 | 0.1351, 0.1422
120 | 0.1647 | 0.1613, 0.1680
160 | 0.1806 | 0.1759, 0.1854
280 | 0.2173 | 0.2026, 0.2329
MPN.cat: Intermediate_Risk
img30d | Predicted | 95% CI
-----------------------------------
0 | 0.1205 | 0.1163, 0.1247
60 | 0.1621 | 0.1578, 0.1665
120 | 0.2091 | 0.2047, 0.2136
160 | 0.2424 | 0.2359, 0.2490
280 | 0.3443 | 0.3206, 0.3688
MPN.cat: Low_Risk
img30d | Predicted | 95% CI
-----------------------------------
0 | 0.4700 | 0.4525, 0.4875
60 | 0.3738 | 0.3643, 0.3834
120 | 0.2850 | 0.2788, 0.2913
160 | 0.2327 | 0.2263, 0.2391
280 | 0.1154 | 0.1107, 0.1203
Not all rows are shown in the output. Use `print(..., n = Inf)` to show
all rows.
Multinomial Logistic Regression Model of water quality versus runoff in the DRC:
mlr_DRC <- multinom(Colony.cat ~ lis_runoff, data = rf_at_wq_DRC_all)# weights: 12 (6 variable)
initial value 260.623340
iter 10 value 219.222444
final value 219.202157
converged
summary(mlr_DRC)Call:
multinom(formula = Colony.cat ~ lis_runoff, data = rf_at_wq_DRC_all)
Coefficients:
(Intercept) lis_runoff
High_Risk -0.09314299 0.03308681
Intermediate_Risk -0.66208654 0.02138298
Low_Risk -2.44883586 -0.01032391
Std. Errors:
(Intercept) lis_runoff
High_Risk 0.1846791 0.02465471
Intermediate_Risk 0.2187988 0.02953443
Low_Risk 0.4570339 0.07674746
Residual Deviance: 438.4043
AIC: 450.4043
parameters(mlr_DRC, exponentiate=T, summary=T, digits=3, ci_digits=3)# Response level: high_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
------------------------------------------------------------------
(Intercept) | 0.911 | 0.168 | [0.634, 1.308] | -0.504 | 0.614
lis runoff | 1.034 | 0.025 | [0.985, 1.085] | 1.342 | 0.180
# Response level: intermediate_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
------------------------------------------------------------------
(Intercept) | 0.516 | 0.113 | [0.336, 0.792] | -3.026 | 0.002
lis runoff | 1.022 | 0.030 | [0.964, 1.082] | 0.724 | 0.469
# Response level: low_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
-------------------------------------------------------------------
(Intercept) | 0.086 | 0.039 | [0.035, 0.212] | -5.358 | < .001
lis runoff | 0.990 | 0.076 | [0.852, 1.150] | -0.135 | 0.893
Model: Colony.cat ~ lis_runoff (188 Observations)
Residual standard deviation: 1.552 (df = 182)
McFadden's R2: 0.005; adjusted McFadden's R2: 2.236e-04
Uncertainty intervals (equal-tailed) and p-values (two-tailed) computed
using a Wald normal distribution approximation.
mpred_DRC <- ggemmeans(mlr_DRC, terms="lis_runoff")Data were 'prettified'. Consider using `terms="lis_runoff [all]"` to get
smooth plots.
print(mpred_DRC, digits=4)# Predicted probabilities of Colony.cat
Colony.cat: a_Very_High_Risk
lis_runoff | Predicted | 95% CI
---------------------------------------
0 | 0.3979 | 0.3795, 0.4166
5 | 0.3662 | 0.3495, 0.3831
10 | 0.3350 | 0.3135, 0.3572
20 | 0.2757 | 0.2438, 0.3101
30 | 0.2222 | 0.1866, 0.2623
Colony.cat: High_Risk
lis_runoff | Predicted | 95% CI
---------------------------------------
0 | 0.3625 | 0.3452, 0.3801
5 | 0.3936 | 0.3765, 0.4110
10 | 0.4249 | 0.4014, 0.4488
20 | 0.4868 | 0.4415, 0.5324
30 | 0.5461 | 0.4774, 0.6132
Colony.cat: Intermediate_Risk
lis_runoff | Predicted | 95% CI
---------------------------------------
0 | 0.2052 | 0.1951, 0.2158
5 | 0.2102 | 0.2004, 0.2203
10 | 0.2140 | 0.2007, 0.2278
20 | 0.2181 | 0.1935, 0.2448
30 | 0.2176 | 0.1812, 0.2591
Colony.cat: Low_Risk
lis_runoff | Predicted | 95% CI
---------------------------------------
0 | 0.0344 | 0.0334, 0.0354
5 | 0.0300 | 0.0293, 0.0308
10 | 0.0261 | 0.0252, 0.0270
20 | 0.0194 | 0.0184, 0.0204
30 | 0.0141 | 0.0133, 0.0149
Not all rows are shown in the output. Use `print(..., n = Inf)` to show
all rows.
Multinomial Logistic Regression Model of water quality versus runoff in Rwanda:
mlr_Rwanda <- multinom(MPN.cat ~ lis_runoff, data = rf_at_wq_Rwanda_all)# weights: 12 (6 variable)
initial value 1269.845635
iter 10 value 1221.403792
final value 1221.403114
converged
summary(mlr_Rwanda)Call:
multinom(formula = MPN.cat ~ lis_runoff, data = rf_at_wq_Rwanda_all)
Coefficients:
(Intercept) lis_runoff
High_Risk -0.796595106 0.1185305
Intermediate_Risk -0.441459976 -0.1626626
Low_Risk 0.003076488 -0.3432319
Std. Errors:
(Intercept) lis_runoff
High_Risk 0.10820638 0.07441506
Intermediate_Risk 0.09834871 0.10590018
Low_Risk 0.08790348 0.12345653
Residual Deviance: 2442.806
AIC: 2454.806
parameters(mlr_Rwanda, exponentiate=T, summary=T, digits=3, ci_digits=3)# Response level: high_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
-------------------------------------------------------------------
(Intercept) | 0.451 | 0.049 | [0.365, 0.557] | -7.362 | < .001
lis runoff | 1.126 | 0.084 | [0.973, 1.303] | 1.593 | 0.111
# Response level: intermediate_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
-------------------------------------------------------------------
(Intercept) | 0.643 | 0.063 | [0.530, 0.780] | -4.489 | < .001
lis runoff | 0.850 | 0.090 | [0.691, 1.046] | -1.536 | 0.125
# Response level: low_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
------------------------------------------------------------------
(Intercept) | 1.003 | 0.088 | [0.844, 1.192] | 0.035 | 0.972
lis runoff | 0.709 | 0.088 | [0.557, 0.904] | -2.780 | 0.005
Model: MPN.cat ~ lis_runoff (916 Observations)
Residual standard deviation: 1.638 (df = 910)
McFadden's R2: 0.008; adjusted McFadden's R2: 0.008
Uncertainty intervals (equal-tailed) and p-values (two-tailed) computed
using a Wald normal distribution approximation.
mpred_Rwanda <- ggemmeans(mlr_Rwanda, terms="lis_runoff")Data were 'prettified'. Consider using `terms="lis_runoff [all]"` to get
smooth plots.
print(mpred_Rwanda, digits=4)# Predicted probabilities of MPN.cat
MPN.cat: a_Very_High_Risk
lis_runoff | Predicted | 95% CI
---------------------------------------
0 | 0.3229 | 0.3159, 0.3299
2 | 0.3936 | 0.3782, 0.4091
4 | 0.4322 | 0.4028, 0.4620
6 | 0.4370 | 0.3927, 0.4823
8 | 0.4161 | 0.3571, 0.4777
MPN.cat: High_Risk
lis_runoff | Predicted | 95% CI
---------------------------------------
0 | 0.1456 | 0.1426, 0.1486
2 | 0.2249 | 0.2165, 0.2335
4 | 0.3130 | 0.2900, 0.3370
6 | 0.4012 | 0.3579, 0.4462
8 | 0.4843 | 0.4198, 0.5492
MPN.cat: Intermediate_Risk
lis_runoff | Predicted | 95% CI
---------------------------------------
0 | 0.2076 | 0.2031, 0.2123
2 | 0.1828 | 0.1745, 0.1914
4 | 0.1450 | 0.1339, 0.1568
6 | 0.1059 | 0.0962, 0.1165
8 | 0.0728 | 0.0662, 0.0801
MPN.cat: Low_Risk
lis_runoff | Predicted | 95% CI
---------------------------------------
0 | 0.3239 | 0.3168, 0.3311
2 | 0.1987 | 0.1878, 0.2101
4 | 0.1098 | 0.1016, 0.1186
6 | 0.0559 | 0.0523, 0.0598
8 | 0.0268 | 0.0256, 0.0281
Multinomial Logistic Regression Model of water quality versus 7-day runoff in the DRC:
mlr_DRC <- multinom(Colony.cat ~ lis7d, data = rf_at_wq_DRC_all)# weights: 12 (6 variable)
initial value 260.623340
iter 10 value 217.386109
final value 216.924994
converged
summary(mlr_DRC)Call:
multinom(formula = Colony.cat ~ lis7d, data = rf_at_wq_DRC_all)
Coefficients:
(Intercept) lis7d
High_Risk -0.2185568 0.011998578
Intermediate_Risk -0.6687508 0.004036902
Low_Risk -2.0210122 -0.054224952
Std. Errors:
(Intercept) lis7d
High_Risk 0.2185943 0.007295964
Intermediate_Risk 0.2532893 0.008930196
Low_Risk 0.4714176 0.044772937
Residual Deviance: 433.85
AIC: 445.85
parameters(mlr_DRC, exponentiate=T, summary=T, digits=3, ci_digits=3)# Response level: high_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
------------------------------------------------------------------
(Intercept) | 0.804 | 0.176 | [0.524, 1.234] | -1.000 | 0.317
lis7d | 1.012 | 0.007 | [0.998, 1.027] | 1.645 | 0.100
# Response level: intermediate_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
------------------------------------------------------------------
(Intercept) | 0.512 | 0.130 | [0.312, 0.842] | -2.640 | 0.008
lis7d | 1.004 | 0.009 | [0.987, 1.022] | 0.452 | 0.651
# Response level: low_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
-------------------------------------------------------------------
(Intercept) | 0.133 | 0.062 | [0.053, 0.334] | -4.287 | < .001
lis7d | 0.947 | 0.042 | [0.868, 1.034] | -1.211 | 0.226
Model: Colony.cat ~ lis7d (188 Observations)
Residual standard deviation: 1.544 (df = 182)
McFadden's R2: 0.015; adjusted McFadden's R2: 0.011
Uncertainty intervals (equal-tailed) and p-values (two-tailed) computed
using a Wald normal distribution approximation.
mpred_DRC <- ggemmeans(mlr_DRC, terms="lis7d")Data were 'prettified'. Consider using `terms="lis7d [all]"` to get
smooth plots.
print(mpred_DRC, digits=4)# Predicted probabilities of Colony.cat
Colony.cat: a_Very_High_Risk
lis7d | Predicted | 95% CI
----------------------------------
0 | 0.4084 | 0.3866, 0.4306
20 | 0.3814 | 0.3648, 0.3983
40 | 0.3429 | 0.3220, 0.3645
50 | 0.3226 | 0.2982, 0.3479
90 | 0.2437 | 0.2111, 0.2794
Colony.cat: High_Risk
lis7d | Predicted | 95% CI
----------------------------------
0 | 0.3282 | 0.3096, 0.3474
20 | 0.3897 | 0.3729, 0.4067
40 | 0.4454 | 0.4217, 0.4693
50 | 0.4723 | 0.4426, 0.5023
90 | 0.5766 | 0.5202, 0.6310
Colony.cat: Intermediate_Risk
lis7d | Predicted | 95% CI
----------------------------------
0 | 0.2092 | 0.1971, 0.2219
20 | 0.2118 | 0.2021, 0.2219
40 | 0.2065 | 0.1938, 0.2198
50 | 0.2022 | 0.1870, 0.2183
90 | 0.1795 | 0.1556, 0.2062
Colony.cat: Low_Risk
lis7d | Predicted | 95% CI
----------------------------------
0 | 0.0541 | 0.0518, 0.0565
20 | 0.0171 | 0.0166, 0.0175
40 | 0.0052 | 0.0051, 0.0053
50 | 0.0028 | 0.0028, 0.0029
90 | 0.0002 | 0.0002, 0.0002
Not all rows are shown in the output. Use `print(..., n = Inf)` to show
all rows.
Multinomial Logistic Regression Model of water quality versus 7-day runoff in Rwanda:
mlr_Rwanda <- multinom(MPN.cat ~ lis7d, data = rf_at_wq_Rwanda_all)# weights: 12 (6 variable)
initial value 1269.845635
iter 10 value 1210.653330
final value 1210.648707
converged
summary(mlr_Rwanda)Call:
multinom(formula = MPN.cat ~ lis7d, data = rf_at_wq_Rwanda_all)
Coefficients:
(Intercept) lis7d
High_Risk -0.7568568 0.008152867
Intermediate_Risk -0.3953586 -0.045353585
Low_Risk 0.2405451 -0.202363026
Std. Errors:
(Intercept) lis7d
High_Risk 0.1242531 0.02928387
Intermediate_Risk 0.1129923 0.03017519
Low_Risk 0.1003890 0.03807930
Residual Deviance: 2421.297
AIC: 2433.297
parameters(mlr_Rwanda, exponentiate=T, summary=T, digits=3, ci_digits=3)# Response level: high_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
-------------------------------------------------------------------
(Intercept) | 0.469 | 0.058 | [0.368, 0.599] | -6.091 | < .001
lis7d | 1.008 | 0.030 | [0.952, 1.068] | 0.278 | 0.781
# Response level: intermediate_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
-------------------------------------------------------------------
(Intercept) | 0.673 | 0.076 | [0.540, 0.840] | -3.499 | < .001
lis7d | 0.956 | 0.029 | [0.901, 1.014] | -1.503 | 0.133
# Response level: low_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
-------------------------------------------------------------------
(Intercept) | 1.272 | 0.128 | [1.045, 1.549] | 2.396 | 0.017
lis7d | 0.817 | 0.031 | [0.758, 0.880] | -5.314 | < .001
Model: MPN.cat ~ lis7d (916 Observations)
Residual standard deviation: 1.631 (df = 910)
McFadden's R2: 0.017; adjusted McFadden's R2: 0.016
Uncertainty intervals (equal-tailed) and p-values (two-tailed) computed
using a Wald normal distribution approximation.
mpred_Rwanda <- ggemmeans(mlr_Rwanda, terms="lis7d")Data were 'prettified'. Consider using `terms="lis7d [all]"` to get
smooth plots.
print(mpred_Rwanda, digits=4)# Predicted probabilities of MPN.cat
MPN.cat: a_Very_High_Risk
lis7d | Predicted | 95% CI
----------------------------------
0 | 0.2929 | 0.2857, 0.3002
2 | 0.3401 | 0.3330, 0.3472
6 | 0.4196 | 0.4063, 0.4330
8 | 0.4502 | 0.4321, 0.4684
14 | 0.5108 | 0.4760, 0.5456
MPN.cat: High_Risk
lis7d | Predicted | 95% CI
----------------------------------
0 | 0.1374 | 0.1344, 0.1405
2 | 0.1622 | 0.1589, 0.1655
6 | 0.2067 | 0.1997, 0.2139
8 | 0.2254 | 0.2150, 0.2362
14 | 0.2686 | 0.2444, 0.2943
MPN.cat: Intermediate_Risk
lis7d | Predicted | 95% CI
----------------------------------
0 | 0.1972 | 0.1924, 0.2021
2 | 0.2092 | 0.2047, 0.2136
6 | 0.2152 | 0.2075, 0.2232
8 | 0.2109 | 0.2009, 0.2213
14 | 0.1823 | 0.1676, 0.1980
MPN.cat: Low_Risk
lis7d | Predicted | 95% CI
----------------------------------
0 | 0.3725 | 0.3633, 0.3818
2 | 0.2886 | 0.2822, 0.2951
6 | 0.1585 | 0.1521, 0.1651
8 | 0.1134 | 0.1085, 0.1186
14 | 0.0382 | 0.0370, 0.0395
Not all rows are shown in the output. Use `print(..., n = Inf)` to show
all rows.
Updated Logistic Regression Model of water quality versus rainfall in Rwanda:
glmmodelRwanda <- glm(MPN ~ imerg_rf, data = rf_at_wq_Rwanda_all, family = "gaussian")
summary(glmmodelRwanda)
Call:
glm(formula = MPN ~ imerg_rf, family = "gaussian", data = rf_at_wq_Rwanda_all)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 34.4567 1.7938 19.209 < 2e-16 ***
imerg_rf 1.4186 0.3244 4.372 1.37e-05 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for gaussian family taken to be 1974.27)
Null deviance: 1842227 on 915 degrees of freedom
Residual deviance: 1804483 on 914 degrees of freedom
AIC: 9554.1
Number of Fisher Scoring iterations: 2
Updated Logistic Regression Model of water quality versus rainfall in DRC:
glmmodelDRC <- glm(Colony ~ imerg_rf, data = rf_at_wq_DRC_all, family = "gaussian")
summary(glmmodelDRC)
Call:
glm(formula = Colony ~ imerg_rf, family = "gaussian", data = rf_at_wq_DRC_all)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 940.23 183.62 5.121 7.57e-07 ***
imerg_rf -20.59 10.55 -1.952 0.0524 .
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for gaussian family taken to be 4827821)
Null deviance: 916368732 on 187 degrees of freedom
Residual deviance: 897974702 on 186 degrees of freedom
AIC: 3430.8
Number of Fisher Scoring iterations: 2
Updated Logistic Regression Model of water quality versus 30-day rainfall in Rwanda:
glmmodelRwanda <- glm(MPN ~ img30d, data = rf_at_wq_Rwanda_all, family = "gaussian")
summary(glmmodelRwanda)
Call:
glm(formula = MPN ~ img30d, family = "gaussian", data = rf_at_wq_Rwanda_all)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 35.25241 3.07098 11.48 <2e-16 ***
img30d 0.03366 0.02440 1.38 0.168
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for gaussian family taken to be 2011.378)
Null deviance: 1842227 on 915 degrees of freedom
Residual deviance: 1838399 on 914 degrees of freedom
AIC: 9571.1
Number of Fisher Scoring iterations: 2
Updated Logistic Regression Model of water quality versus 30-day rainfall in DRC:
glmmodelDRC <- glm(Colony ~ img30d, data = rf_at_wq_DRC_all, family = "gaussian")
summary(glmmodelDRC)
Call:
glm(formula = Colony ~ img30d, family = "gaussian", data = rf_at_wq_DRC_all)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 703.3777 256.1615 2.746 0.00663 **
img30d 0.3384 1.0858 0.312 0.75566
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for gaussian family taken to be 4924143)
Null deviance: 916368732 on 187 degrees of freedom
Residual deviance: 915890505 on 186 degrees of freedom
AIC: 3434.5
Number of Fisher Scoring iterations: 2
Updated Logistic Regression Model of water quality versus runoff in Rwanda:
glmmodelRwanda <- glm(MPN ~ lis_runoff, data = rf_at_wq_Rwanda_all, family = "gaussian")
summary(glmmodelRwanda)
Call:
glm(formula = MPN ~ lis_runoff, family = "gaussian", data = rf_at_wq_Rwanda_all)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 37.901 1.561 24.273 <2e-16 ***
lis_runoff 3.091 1.450 2.131 0.0333 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for gaussian family taken to be 2005.597)
Null deviance: 1842227 on 915 degrees of freedom
Residual deviance: 1833115 on 914 degrees of freedom
AIC: 9568.5
Number of Fisher Scoring iterations: 2
Updated Logistic Regression Model of water quality versus runoff in DRC:
glmmodelDRC <- glm(Colony ~ lis_runoff, data = rf_at_wq_DRC_all, family = "gaussian")
summary(glmmodelDRC)
Call:
glm(formula = Colony ~ lis_runoff, family = "gaussian", data = rf_at_wq_DRC_all)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 891.69 176.99 5.038 1.11e-06 ***
lis_runoff -38.25 22.48 -1.701 0.0905 .
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for gaussian family taken to be 4851215)
Null deviance: 916368732 on 187 degrees of freedom
Residual deviance: 902326018 on 186 degrees of freedom
AIC: 3431.7
Number of Fisher Scoring iterations: 2
Updated Logistic Regression Model of water quality versus 7-day runoff in Rwanda:
glmmodelRwanda <- glm(MPN ~ lis7d, data = rf_at_wq_Rwanda_all, family = "gaussian")
summary(glmmodelRwanda)
Call:
glm(formula = MPN ~ lis7d, family = "gaussian", data = rf_at_wq_Rwanda_all)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 34.9397 1.7558 19.900 < 2e-16 ***
lis7d 2.0687 0.4942 4.186 3.11e-05 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for gaussian family taken to be 1977.648)
Null deviance: 1842227 on 915 degrees of freedom
Residual deviance: 1807570 on 914 degrees of freedom
AIC: 9555.6
Number of Fisher Scoring iterations: 2
Updated Logistic Regression Model of water quality versus 7-day runoff in DRC:
glmmodelDRC <- glm(Colony ~ lis7d, data = rf_at_wq_DRC_all, family = "gaussian")
summary(glmmodelDRC)
Call:
glm(formula = Colony ~ lis7d, family = "gaussian", data = rf_at_wq_DRC_all)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 843.152 207.889 4.056 7.34e-05 ***
lis7d -4.149 6.958 -0.596 0.552
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for gaussian family taken to be 4917312)
Null deviance: 916368732 on 187 degrees of freedom
Residual deviance: 914620008 on 186 degrees of freedom
AIC: 3434.3
Number of Fisher Scoring iterations: 2