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] <- "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 | |
| High_Risk | 72 (38%) |
| Intermediate_Risk | 39 (21%) |
| Low_Risk | 6 (3.2%) |
| Very_High_Risk | 71 (38%) |
| 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] <- "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 | |
| High_Risk | 146 (16%) |
| Intermediate_Risk | 186 (20%) |
| Low_Risk | 279 (30%) |
| Very_High_Risk | 305 (33%) |
| 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.583146
iter 20 value 219.273110
final value 219.273103
converged
summary(mlr_DRC)Call:
multinom(formula = Colony.cat ~ imerg_rf, data = rf_at_wq_DRC_all)
Coefficients:
(Intercept) imerg_rf
Intermediate_Risk -0.58909144 -0.002498249
Low_Risk -2.29899838 -0.025932813
Very_High_Risk 0.09942931 -0.013638748
Std. Errors:
(Intercept) imerg_rf
Intermediate_Risk 0.2310889 0.01237902
Low_Risk 0.4684435 0.03725894
Very_High_Risk 0.1918352 0.01139374
Residual Deviance: 438.5462
AIC: 450.5462
parameters(mlr_DRC, exponentiate=T, summary=T, digits=3, ci_digits=3)# Response level: intermediate_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
------------------------------------------------------------------
(Intercept) | 0.555 | 0.128 | [0.353, 0.873] | -2.549 | 0.011
imerg rf | 0.998 | 0.012 | [0.974, 1.022] | -0.202 | 0.840
# Response level: low_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
-------------------------------------------------------------------
(Intercept) | 0.100 | 0.047 | [0.040, 0.251] | -4.908 | < .001
imerg rf | 0.974 | 0.036 | [0.906, 1.048] | -0.696 | 0.486
# Response level: very_high_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
------------------------------------------------------------------
(Intercept) | 1.105 | 0.212 | [0.758, 1.609] | 0.518 | 0.604
imerg rf | 0.986 | 0.011 | [0.965, 1.009] | -1.197 | 0.231
Model: Colony.cat ~ imerg_rf (188 Observations)
Residual standard deviation: 1.552 (df = 182)
McFadden's R2: 0.004; adjusted McFadden's R2: -9.852e-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: High_Risk
imerg_rf | Predicted | 95% CI
-------------------------------------
0 | 0.3624 | 0.3444, 0.3807
15 | 0.3996 | 0.3814, 0.4180
25 | 0.4239 | 0.3987, 0.4495
40 | 0.4592 | 0.4188, 0.5001
65 | 0.5140 | 0.4448, 0.5827
Colony.cat: Intermediate_Risk
imerg_rf | Predicted | 95% CI
-------------------------------------
0 | 0.2010 | 0.1907, 0.2118
15 | 0.2135 | 0.2031, 0.2244
25 | 0.2209 | 0.2064, 0.2362
40 | 0.2305 | 0.2069, 0.2560
65 | 0.2424 | 0.2010, 0.2893
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.0157, 0.0170
65 | 0.0096 | 0.0092, 0.0100
Colony.cat: Very_High_Risk
imerg_rf | Predicted | 95% CI
-------------------------------------
0 | 0.4002 | 0.3811, 0.4197
15 | 0.3597 | 0.3422, 0.3776
25 | 0.3329 | 0.3104, 0.3563
40 | 0.2939 | 0.2635, 0.3264
65 | 0.2340 | 0.1970, 0.2755
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.974910
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
Intermediate_Risk 0.3514480 -0.03615092
Low_Risk 0.7997770 -0.05270517
Very_High_Risk 0.6412275 0.02598464
Std. Errors:
(Intercept) imerg_rf
Intermediate_Risk 0.1359110 0.02596295
Low_Risk 0.1256048 0.02441102
Very_High_Risk 0.1252081 0.02096953
Residual Deviance: 2443.949
AIC: 2455.949
parameters(mlr_Rwanda, exponentiate=T, summary=T, digits=3, ci_digits=3)# Response level: intermediate_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
------------------------------------------------------------------
(Intercept) | 1.421 | 0.193 | [1.089, 1.855] | 2.586 | 0.010
imerg rf | 0.964 | 0.025 | [0.917, 1.015] | -1.392 | 0.164
# Response level: low_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
-------------------------------------------------------------------
(Intercept) | 2.225 | 0.279 | [1.739, 2.846] | 6.367 | < .001
imerg rf | 0.949 | 0.023 | [0.904, 0.995] | -2.159 | 0.031
# Response level: very_high_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
------------------------------------------------------------------
(Intercept) | 1.899 | 0.238 | [1.486, 2.427] | 5.121 | < .001
imerg rf | 1.026 | 0.022 | [0.985, 1.069] | 1.239 | 0.215
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: 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.1767 | 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.0576, 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
MPN.cat: Very_High_Risk
imerg_rf | Predicted | 95% CI
-------------------------------------
0 | 0.2901 | 0.2828, 0.2975
5 | 0.3569 | 0.3492, 0.3647
15 | 0.4972 | 0.4739, 0.5205
20 | 0.5643 | 0.5329, 0.5952
35 | 0.7290 | 0.6881, 0.7663
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.972592
iter 20 value 216.752608
final value 216.752599
converged
summary(mlr_DRC)Call:
multinom(formula = Colony.cat ~ img30d, data = rf_at_wq_DRC_all)
Coefficients:
(Intercept) img30d
Intermediate_Risk -0.2232167 -0.002134128
Low_Risk -1.4774963 -0.007888178
Very_High_Risk 0.1980009 -0.001092324
Std. Errors:
(Intercept) img30d
Intermediate_Risk 0.3128995 0.001365626
Low_Risk 0.5234399 0.003975044
Very_High_Risk 0.2761166 0.001130584
Residual Deviance: 433.5052
AIC: 445.5052
parameters(mlr_DRC, exponentiate=T, summary=T, digits=3, ci_digits=3)# Response level: intermediate_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
------------------------------------------------------------------
(Intercept) | 0.800 | 0.250 | [0.433, 1.477] | -0.713 | 0.476
img30d | 0.998 | 0.001 | [0.995, 1.001] | -1.563 | 0.118
# Response level: low_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
------------------------------------------------------------------
(Intercept) | 0.228 | 0.119 | [0.082, 0.637] | -2.823 | 0.005
img30d | 0.992 | 0.004 | [0.984, 1.000] | -1.984 | 0.047
# Response level: very_high_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
------------------------------------------------------------------
(Intercept) | 1.219 | 0.337 | [0.710, 2.094] | 0.717 | 0.473
img30d | 0.999 | 0.001 | [0.997, 1.001] | -0.966 | 0.334
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: High_Risk
img30d | Predicted | 95% CI
-----------------------------------
0 | 0.3080 | 0.2864, 0.3304
100 | 0.3518 | 0.3338, 0.3702
200 | 0.3923 | 0.3755, 0.4094
300 | 0.4308 | 0.4088, 0.4530
500 | 0.5036 | 0.4608, 0.5464
Colony.cat: Intermediate_Risk
img30d | Predicted | 95% CI
-----------------------------------
0 | 0.2464 | 0.2284, 0.2652
100 | 0.2273 | 0.2156, 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.0662, 0.0745
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
Colony.cat: 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
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.468905
final value 1213.456471
converged
summary(mlr_Rwanda)Call:
multinom(formula = MPN.cat ~ img30d, data = rf_at_wq_Rwanda_all)
Coefficients:
(Intercept) img30d
Intermediate_Risk 0.07346234 0.001380618
Low_Risk 1.43486332 -0.007384692
Very_High_Risk 0.97812592 -0.002079327
Std. Errors:
(Intercept) img30d
Intermediate_Risk 0.2540412 0.001875967
Low_Risk 0.2194868 0.001743542
Very_High_Risk 0.2234346 0.001698282
Residual Deviance: 2426.913
AIC: 2438.913
parameters(mlr_Rwanda, exponentiate=T, summary=T, digits=3, ci_digits=3)# Response level: intermediate_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
-----------------------------------------------------------------
(Intercept) | 1.076 | 0.273 | [0.654, 1.771] | 0.289 | 0.772
img30d | 1.001 | 0.002 | [0.998, 1.005] | 0.736 | 0.462
# Response level: low_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
-------------------------------------------------------------------
(Intercept) | 4.199 | 0.922 | [2.731, 6.456] | 6.537 | < .001
img30d | 0.993 | 0.002 | [0.989, 0.996] | -4.235 | < .001
# Response level: very_high_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
-------------------------------------------------------------------
(Intercept) | 2.659 | 0.594 | [1.716, 4.121] | 4.378 | < .001
img30d | 0.998 | 0.002 | [0.995, 1.001] | -1.224 | 0.221
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: 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
MPN.cat: 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
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.216231
final value 219.202148
converged
summary(mlr_DRC)Call:
multinom(formula = Colony.cat ~ lis_runoff, data = rf_at_wq_DRC_all)
Coefficients:
(Intercept) lis_runoff
Intermediate_Risk -0.56886053 -0.01170086
Low_Risk -2.35382556 -0.04339782
Very_High_Risk 0.09301715 -0.03310042
Std. Errors:
(Intercept) lis_runoff
Intermediate_Risk 0.2211892 0.02643448
Low_Risk 0.4579263 0.07562028
Very_High_Risk 0.1846879 0.02465760
Residual Deviance: 438.4043
AIC: 450.4043
parameters(mlr_DRC, exponentiate=T, summary=T, digits=3, ci_digits=3)# Response level: intermediate_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
------------------------------------------------------------------
(Intercept) | 0.566 | 0.125 | [0.367, 0.873] | -2.572 | 0.010
lis runoff | 0.988 | 0.026 | [0.938, 1.041] | -0.443 | 0.658
# Response level: low_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
-------------------------------------------------------------------
(Intercept) | 0.095 | 0.044 | [0.039, 0.233] | -5.140 | < .001
lis runoff | 0.958 | 0.072 | [0.826, 1.111] | -0.574 | 0.566
# Response level: very_high_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
------------------------------------------------------------------
(Intercept) | 1.097 | 0.203 | [0.764, 1.576] | 0.504 | 0.615
lis runoff | 0.967 | 0.024 | [0.922, 1.015] | -1.342 | 0.179
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: 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.4869 | 0.4415, 0.5324
30 | 0.5462 | 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.2008, 0.2279
20 | 0.2181 | 0.1936, 0.2448
30 | 0.2177 | 0.1812, 0.2591
Colony.cat: Low_Risk
lis_runoff | Predicted | 95% CI
---------------------------------------
0 | 0.0344 | 0.0335, 0.0354
5 | 0.0301 | 0.0293, 0.0309
10 | 0.0262 | 0.0253, 0.0271
20 | 0.0194 | 0.0184, 0.0204
30 | 0.0141 | 0.0133, 0.0149
Colony.cat: Very_High_Risk
lis_runoff | Predicted | 95% CI
---------------------------------------
0 | 0.3978 | 0.3794, 0.4165
5 | 0.3661 | 0.3494, 0.3831
10 | 0.3349 | 0.3135, 0.3571
20 | 0.2756 | 0.2437, 0.3100
30 | 0.2221 | 0.1865, 0.2621
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.786973
final value 1221.403118
converged
summary(mlr_Rwanda)Call:
multinom(formula = MPN.cat ~ lis_runoff, data = rf_at_wq_Rwanda_all)
Coefficients:
(Intercept) lis_runoff
Intermediate_Risk 0.3550655 -0.2814088
Low_Risk 0.7997008 -0.4618649
Very_High_Risk 0.7966031 -0.1185635
Std. Errors:
(Intercept) lis_runoff
Intermediate_Risk 0.1183346 0.10907852
Low_Risk 0.1098817 0.12679552
Very_High_Risk 0.1082055 0.07440961
Residual Deviance: 2442.806
AIC: 2454.806
parameters(mlr_Rwanda, exponentiate=T, summary=T, digits=3, ci_digits=3)# Response level: intermediate_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
------------------------------------------------------------------
(Intercept) | 1.426 | 0.169 | [1.131, 1.799] | 3.001 | 0.003
lis runoff | 0.755 | 0.082 | [0.609, 0.935] | -2.580 | 0.010
# Response level: low_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
-------------------------------------------------------------------
(Intercept) | 2.225 | 0.244 | [1.794, 2.760] | 7.278 | < .001
lis runoff | 0.630 | 0.080 | [0.491, 0.808] | -3.643 | < .001
# Response level: very_high_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
-------------------------------------------------------------------
(Intercept) | 2.218 | 0.240 | [1.794, 2.742] | 7.362 | < .001
lis runoff | 0.888 | 0.066 | [0.768, 1.028] | -1.593 | 0.111
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: High_Risk
lis_runoff | Predicted | 95% CI
---------------------------------------
0 | 0.1456 | 0.1426, 0.1486
2 | 0.2249 | 0.2166, 0.2335
4 | 0.3131 | 0.2901, 0.3371
6 | 0.4013 | 0.3580, 0.4463
8 | 0.4844 | 0.4200, 0.5493
MPN.cat: Intermediate_Risk
lis_runoff | Predicted | 95% CI
---------------------------------------
0 | 0.2076 | 0.2031, 0.2123
2 | 0.1827 | 0.1745, 0.1913
4 | 0.1449 | 0.1338, 0.1567
6 | 0.1058 | 0.0961, 0.1163
8 | 0.0727 | 0.0661, 0.0800
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.0522, 0.0598
8 | 0.0268 | 0.0256, 0.0280
MPN.cat: Very_High_Risk
lis_runoff | Predicted | 95% CI
---------------------------------------
0 | 0.3229 | 0.3160, 0.3299
2 | 0.3936 | 0.3783, 0.4091
4 | 0.4322 | 0.4028, 0.4621
6 | 0.4370 | 0.3927, 0.4823
8 | 0.4161 | 0.3571, 0.4777
Multinomial Logistic Regression Model of water quality versus 30-day runoff in the DRC:
mlr_DRC <- multinom(Colony.cat ~ lis30d, data = rf_at_wq_DRC_all)# weights: 12 (6 variable)
initial value 260.623340
iter 10 value 217.643922
final value 216.629475
converged
summary(mlr_DRC)Call:
multinom(formula = Colony.cat ~ lis30d, data = rf_at_wq_DRC_all)
Coefficients:
(Intercept) lis30d
Intermediate_Risk -0.3178213 -0.004872353
Low_Risk -1.5682144 -0.025752335
Very_High_Risk 0.1679766 -0.002821695
Std. Errors:
(Intercept) lis30d
Intermediate_Risk 0.2830983 0.003468236
Low_Risk 0.4968186 0.014240793
Very_High_Risk 0.2450498 0.002796199
Residual Deviance: 433.259
AIC: 445.259
parameters(mlr_DRC, exponentiate=T, summary=T, digits=3, ci_digits=3)# Response level: intermediate_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
------------------------------------------------------------------
(Intercept) | 0.728 | 0.206 | [0.418, 1.267] | -1.123 | 0.262
lis30d | 0.995 | 0.003 | [0.988, 1.002] | -1.405 | 0.160
# Response level: low_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
------------------------------------------------------------------
(Intercept) | 0.208 | 0.104 | [0.079, 0.552] | -3.157 | 0.002
lis30d | 0.975 | 0.014 | [0.948, 1.002] | -1.808 | 0.071
# Response level: very_high_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
------------------------------------------------------------------
(Intercept) | 1.183 | 0.290 | [0.732, 1.912] | 0.685 | 0.493
lis30d | 0.997 | 0.003 | [0.992, 1.003] | -1.009 | 0.313
Model: Colony.cat ~ lis30d (188 Observations)
Residual standard deviation: 1.543 (df = 182)
McFadden's R2: 0.016; adjusted McFadden's R2: 0.012
Uncertainty intervals (equal-tailed) and p-values (two-tailed) computed
using a Wald normal distribution approximation.
mpred_DRC <- ggemmeans(mlr_DRC, terms="lis30d")Data were 'prettified'. Consider using `terms="lis30d [all]"` to get
smooth plots.
print(mpred_DRC, digits=4)# Predicted probabilities of Colony.cat
Colony.cat: High_Risk
lis30d | Predicted | 95% CI
-----------------------------------
0 | 0.3206 | 0.3005, 0.3414
40 | 0.3663 | 0.3493, 0.3837
80 | 0.4060 | 0.3881, 0.4241
130 | 0.4518 | 0.4247, 0.4792
210 | 0.5218 | 0.4727, 0.5704
Colony.cat: Intermediate_Risk
lis30d | Predicted | 95% CI
-----------------------------------
0 | 0.2333 | 0.2180, 0.2493
40 | 0.2194 | 0.2088, 0.2303
80 | 0.2001 | 0.1903, 0.2102
130 | 0.1745 | 0.1626, 0.1871
210 | 0.1365 | 0.1227, 0.1516
Colony.cat: Low_Risk
lis30d | Predicted | 95% CI
-----------------------------------
0 | 0.0668 | 0.0633, 0.0705
40 | 0.0273 | 0.0265, 0.0280
80 | 0.0108 | 0.0106, 0.0110
130 | 0.0033 | 0.0033, 0.0033
210 | 0.0005 | 0.0005, 0.0005
Colony.cat: Very_High_Risk
lis30d | Predicted | 95% CI
-----------------------------------
0 | 0.3793 | 0.3562, 0.4028
40 | 0.3871 | 0.3695, 0.4049
80 | 0.3832 | 0.3658, 0.4009
130 | 0.3703 | 0.3458, 0.3956
210 | 0.3413 | 0.3014, 0.3835
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 runoff in Rwanda:
mlr_Rwanda <- multinom(MPN.cat ~ lis30d, data = rf_at_wq_Rwanda_all)# weights: 12 (6 variable)
initial value 1269.845635
iter 10 value 1215.352033
final value 1215.338919
converged
summary(mlr_Rwanda)Call:
multinom(formula = MPN.cat ~ lis30d, data = rf_at_wq_Rwanda_all)
Coefficients:
(Intercept) lis30d
Intermediate_Risk 0.2976435 -0.004559746
Low_Risk 1.0023615 -0.040612954
Very_High_Risk 0.7860239 -0.004024339
Std. Errors:
(Intercept) lis30d
Intermediate_Risk 0.1340987 0.006203705
Low_Risk 0.1286266 0.009190845
Very_High_Risk 0.1221299 0.005551870
Residual Deviance: 2430.678
AIC: 2442.678
parameters(mlr_Rwanda, exponentiate=T, summary=T, digits=3, ci_digits=3)# Response level: intermediate_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
------------------------------------------------------------------
(Intercept) | 1.347 | 0.181 | [1.035, 1.751] | 2.220 | 0.026
lis30d | 0.995 | 0.006 | [0.983, 1.008] | -0.735 | 0.462
# Response level: low_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
-------------------------------------------------------------------
(Intercept) | 2.725 | 0.350 | [2.118, 3.506] | 7.793 | < .001
lis30d | 0.960 | 0.009 | [0.943, 0.978] | -4.419 | < .001
# Response level: very_high_risk
Parameter | Odds Ratio | SE | 95% CI | z | p
-------------------------------------------------------------------
(Intercept) | 2.195 | 0.268 | [1.727, 2.788] | 6.436 | < .001
lis30d | 0.996 | 0.006 | [0.985, 1.007] | -0.725 | 0.469
Model: MPN.cat ~ lis30d (916 Observations)
Residual standard deviation: 1.634 (df = 910)
McFadden's R2: 0.013; adjusted McFadden's R2: 0.013
Uncertainty intervals (equal-tailed) and p-values (two-tailed) computed
using a Wald normal distribution approximation.
mpred_Rwanda <- ggemmeans(mlr_Rwanda, terms="lis30d")Data were 'prettified'. Consider using `terms="lis30d [all]"` to get
smooth plots.
print(mpred_Rwanda, digits=4)# Predicted probabilities of MPN.cat
MPN.cat: High_Risk
lis30d | Predicted | 95% CI
-----------------------------------
0 | 0.1376 | 0.1346, 0.1407
20 | 0.1830 | 0.1786, 0.1875
40 | 0.2209 | 0.2112, 0.2309
60 | 0.2508 | 0.2333, 0.2692
80 | 0.2754 | 0.2484, 0.3042
MPN.cat: Intermediate_Risk
lis30d | Predicted | 95% CI
-----------------------------------
0 | 0.1853 | 0.1809, 0.1899
20 | 0.2250 | 0.2193, 0.2308
40 | 0.2479 | 0.2366, 0.2595
60 | 0.2570 | 0.2389, 0.2758
80 | 0.2575 | 0.2328, 0.2839
MPN.cat: Low_Risk
lis30d | Predicted | 95% CI
-----------------------------------
0 | 0.3750 | 0.3650, 0.3851
20 | 0.2214 | 0.2138, 0.2291
40 | 0.1186 | 0.1126, 0.1248
60 | 0.0598 | 0.0571, 0.0626
80 | 0.0291 | 0.0282, 0.0301
MPN.cat: Very_High_Risk
lis30d | Predicted | 95% CI
-----------------------------------
0 | 0.3020 | 0.2945, 0.3097
20 | 0.3706 | 0.3615, 0.3799
40 | 0.4127 | 0.3957, 0.4299
60 | 0.4324 | 0.4058, 0.4594
80 | 0.4380 | 0.4010, 0.4757