Registered S3 method overwritten by 'GGally':
method from
+.gg ggplot2
ggpairs(trash_by_year, progress =FALSE)
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Is it more meaningful to look at the rate at which each type of trash is collected? rpd = rate per deployment
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Don't know how to automatically pick scale for object of type <table>.
Defaulting to continuous.
Call:
lm(formula = Year ~ plastic_bottles_rpd + wrappers_rpd + glass_bottles_rpd,
data = trash_by_year_rpd)
Residuals:
Min 1Q Median 3Q Max
-1.0576 -0.6737 -0.1413 0.4898 1.8518
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.024e+03 1.020e+00 1983.910 < 2e-16 ***
plastic_bottles_rpd -1.644e-02 5.961e-03 -2.758 0.032962 *
wrappers_rpd 1.025e-02 3.801e-03 2.698 0.035679 *
glass_bottles_rpd -1.571e-02 2.367e-03 -6.637 0.000565 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1.143 on 6 degrees of freedom
Multiple R-squared: 0.905, Adjusted R-squared: 0.8575
F-statistic: 19.05 on 3 and 6 DF, p-value: 0.001807
autoplot(fit4, 1:4, nrow =2, ncol =2)
Although the adjusted r-squared has gone down, it is still relatively high at 0.8575. The line estimated in the Residuals vs Fitted plot is flatter and closer to 0. The Q-Q plot appears unchanged. Observations 2 and 5, 2015 and 2018 respectively, are noted. What will happen if they are removed from the model?
Removing 2016-2018 results in an increased adjusted r-squared, with 95.59% of the variation in observations explained by this model. However, this results in three noted values and the residuals vs fitted plot suggests a linear model may no longer be appropriate. Without additional information, it does not make sense to remove these two years. Fit4 remains the best model.
library(streamgraph)library(RColorBrewer)streamgraph(trash_by_year_rpd_long, key = name, value = value, date = Year, order ="inside-out", interpolate ="cardinal") |>sg_fill_brewer("BrBG") |>sg_axis_x(tick_interval =1, tick_units ="Year") |>sg_title(title ="Types of Trash per Average Dumpster")
Warning in widget_html(name, package, id = x$id, style = css(width =
validateCssUnit(sizeInfo$width), : streamgraph_html returned an object of class
`list` instead of a `shiny.tag`.
Warning: `bindFillRole()` only works on htmltools::tag() objects (e.g., div(),
p(), etc.), not objects of type 'list'.