Brendan
Jan. 4th 2018
code_folding: hide
Objectives
This data is in the dataset package (called 'attenu'). For more details on the dataset, use the link below. https://stat.ethz.ch/R-manual/R-devel/library/datasets/html/attenu.html
library(datasets); names(attenu[,sapply(attenu,is.numeric)])
[1] "event" "mag" "dist" "accel"
Some code is hidden
x <- log10(attenu$dist); y <- log10(attenu$accel)
fit <- lm(y~I(x^2) +x); xNew <- data.frame(x = seq(min(x),max(x), length.out = 50))
pred <- predict(fit, newdata= xNew)
plot(x, y, xlab = "log dist", ylab = "log accel")
Provides a basic tool to explore the data and trends
Earthquake_Att available here: https://brendanpowers.shinyapps.io/Earthquake_Att/