clouds = read.csv("~/Desktop/GEOG 5680/Data/clouds.csv")Cloud Seeding
Project 3
reading in csv file
1.
seeding = subset(clouds, seeding == "yes")
no_seeding = subset(clouds, seeding == "no")
summary(seeding$rainfall) Min. 1st Qu. Median Mean 3rd Qu. Max.
1.090 2.683 4.530 4.634 5.468 11.860
sd(seeding$rainfall)[1] 2.776841
var(seeding$rainfall)[1] 7.710845
summary(no_seeding$rainfall) Min. 1st Qu. Median Mean 3rd Qu. Max.
0.280 1.075 4.055 4.172 5.832 12.850
sd(no_seeding$rainfall)[1] 3.519196
var(no_seeding$rainfall)[1] 12.38474
boxplot(rainfall~seeding, clouds)t.test(clouds$rainfall~clouds$seeding)
Welch Two Sample t-test
data: clouds$rainfall by clouds$seeding
t = -0.3574, df = 20.871, p-value = 0.7244
alternative hypothesis: true difference in means between group no and group yes is not equal to 0
95 percent confidence interval:
-3.154691 2.229691
sample estimates:
mean in group no mean in group yes
4.171667 4.634167
For the t-test, there is no significant difference, meaning that the difference between the average amount of rainfall for both the seeded and non-seeded clouds is not meaningful.
2.
lm(rainfall~ seeding, data = clouds)
Call:
lm(formula = rainfall ~ seeding, data = clouds)
Coefficients:
(Intercept) seedingyes
4.1717 0.4625
clouds.lm = lm(rainfall ~ seeding + cloudcover + prewetness + echomotion + sne,
data = clouds)
summary(clouds.lm)
Call:
lm(formula = rainfall ~ seeding + cloudcover + prewetness + echomotion +
sne, data = clouds)
Residuals:
Min 1Q Median 3Q Max
-5.1158 -1.7078 -0.2422 1.3368 6.4827
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 6.37680 2.43432 2.620 0.0174 *
seedingyes 1.12011 1.20725 0.928 0.3658
cloudcover 0.01821 0.11508 0.158 0.8761
prewetness 2.55109 2.70090 0.945 0.3574
echomotionstationary 2.59855 1.54090 1.686 0.1090
sne -1.27530 0.68015 -1.875 0.0771 .
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 2.855 on 18 degrees of freedom
Multiple R-squared: 0.3403, Adjusted R-squared: 0.157
F-statistic: 1.857 on 5 and 18 DF, p-value: 0.1524
anova(clouds.lm)Analysis of Variance Table
Response: rainfall
Df Sum Sq Mean Sq F value Pr(>F)
seeding 1 1.283 1.2834 0.1575 0.69613
cloudcover 1 15.738 15.7377 1.9313 0.18157
prewetness 1 0.003 0.0027 0.0003 0.98557
echomotion 1 29.985 29.9853 3.6798 0.07108 .
sne 1 28.649 28.6491 3.5158 0.07711 .
Residuals 18 146.677 8.1487
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Although there are no significant p-values, echomotion and SNE appear to influence rainfall the most.
3.
seeding.lm = lm(rainfall~sne, data = seeding)
summary(seeding.lm)
Call:
lm(formula = rainfall ~ sne, data = seeding)
Residuals:
Min 1Q Median 3Q Max
-3.0134 -1.3297 -0.3276 0.6171 4.3867
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 12.0202 2.9774 4.037 0.00237 **
sne -2.2180 0.8722 -2.543 0.02921 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 2.27 on 10 degrees of freedom
Multiple R-squared: 0.3927, Adjusted R-squared: 0.332
F-statistic: 6.467 on 1 and 10 DF, p-value: 0.02921
There is a significant difference (p = 0.0292), meaning that SNE affects rainfall if seeding occurred. The slope tells us that for every 1 unit increase in SNE, we can expect rain to decrease by 2.22 if seeding occurred.
no_seeding.lm = lm(rainfall~sne, data = no_seeding)
summary(no_seeding.lm)
Call:
lm(formula = rainfall ~ sne, data = no_seeding)
Residuals:
Min 1Q Median 3Q Max
-5.4892 -2.1762 0.2958 1.4902 7.3616
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 7.319 3.160 2.317 0.043 *
sne -1.046 0.995 -1.052 0.318
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 3.502 on 10 degrees of freedom
Multiple R-squared: 0.09957, Adjusted R-squared: 0.009528
F-statistic: 1.106 on 1 and 10 DF, p-value: 0.3177
There is no significant difference (p = 0.318), meaning that SNE doesn’t affect rainfall if seeding didn’t occur. The slope tells use that for every 1 unit increase in SNE, we can expect rain to decrease by 1.05 if no seeding occurred.
clouds$colors = clouds$seeding
clouds$colors[clouds$seeding == "yes"] = "darkgreen"
clouds$colors[clouds$seeding == "no"] = "red"
plot(clouds$sne, clouds$rainfall,
col = clouds$colors, pch = 20,
xlab = "Suitability Criterion (SNE)", ylab = "Rainfall ((m^3)*1e+8)",
main = "Scatterplot of SNE and Rainfall by Seeding")
legend("topright",
legend = c("Seeding", "No Seeding"),
pch = 20,
col = c("darkgreen", "red"))
abline(seeding.lm[1], seeding.lm[2], col = "darkgreen")
abline(no_seeding.lm[1], no_seeding.lm[2], col = "red")The difference in slopes suggests that rainfall is greater in places with a lower SNE when clouds are seeded compared to when they are not seeded. However, as SNE increases (specifically SNE > 4), seeded clouds will produce less rain than non-seeded clouds.