The data set (https://www.kaggle.com/datasets/bharathposa/earthquakes-from-2150bc-2023-ad-around-the-world/data) that I worked with comes from the NCEI/WDS Global Significant Earthquake Database for major earthquakes that occurred from 2150 BC to 2023 CE that had either approximately $1 million or more in damages, 10 or more deaths, a magnitude of 7.5 or greater, a Modified Mercalli Intensity X or greater, or that it generated a tsunami. This data is collected and archived to help support research, planning, response and mitigation against future events (National 2006). The data came from the NOAA Tsunami Warning Centers, U.S. Geological Survey, UNESCO IOC International Tsunami Information Center, earthquake and tsunami catalogs, journal articles, national and government databases, post-event reconnaissance reports, newspapers, email and internet pages. The data set includes the following information: year, month, day, hour, minute, second, whether the earthquake produced a tsunami, whether the earthquake was associated with a volcanic eruption, location (country and city), latitude, longitude, depth, magnitude, Modified Mercalli Intensity, deaths, missing, injuries, damage in millions of dollars, damage description, number of houses destroyed and number of houses damaged, total deaths, total missing, total injuries, total damage in millions, total houses destroyed and total houses damaged. The total deaths, total missing, total injuries, total damage in millions, total houses destroyed and total houses damaged include the secondary effects from the earthquake such as the number of houses destroyed or people killed from the tsunami generated by the earthquake.
Questions I want to answer
The intensity of an earthquake is dependent on the depth of the epicenter of the earthquake with more shallow earthquakes having higher intensities, the magnitude of the earthquake with higher magnitude earthquakes having higher intensities as well as from geologic features at the site of the earthquake influencing how much shaking occurs at the surface (Weise 2024). I am interested in investigating whether the depth of the earthquakes and the magnitude of the earthquakes really do have a significant relationship with the Modified Mercalli Intensity scale and, if so, which of these two factors are correlated with the intensity more. I also want to create a good model for predicting the earthquake intensity based on variables that can be measured right after an earthquake occurs so that the intensity of the earthquake can be estimated before doing surveys of the damage caused by the earthquake. I am also interested in investigating if there is a significant relationship between the magnitude, focal depth and Modified Mercalli Intensity level with the damage caused by the earthquake to see which predictors have the biggest impact and create a model that can accurately predict the damage of an earthquake. If there are enough data on earthquakes from the different countries, I would also like to investigate whether the relationship between magnitude, focal depth and Modified Mercalli Intensity and the damage differs depending on the country. Since each country has different socioeconomic conditions and building codes, it would be interesting to see if certain countries are more greatly affected than other countries by an earthquake of a similar magnitude/intensity and whether the relationships of the predictors to the damage are more significant for some countries than for others.
Predicting the intensity of an earthquake using linear regression
Here I loaded the data set and selected the entries from the data that had values for the magnitude, deaths, depth and intensity since the data was missing many values.
I am going to start out investigating the relationship between the variables that are known right after the earthquake happens (latitude, longitude, depth and magnitude) and the variables I am interested in predicting (intensity and damage) to see which predictor variables seem to be most correlated with the response variables.
The latitude and longitude do not seem to be closely correlated with the damage and the intensity, so I will stick with using the magnitude and depth to predict the earthquake’s intensity since the intensity is supposed to be based on these two variables (as well as the type of soil and geologic features in the area).
I started out looking at simple linear regressions between the intensity and the magnitude of the earthquake as well as between the intensity and the depth to see how well the models performed as well as what the p-values for the magnitude and depth are.
Call:
lm(formula = MMI.Int ~ Mag, data = eq_content_w_mmi_mag_depth)
Residuals:
Min 1Q Median 3Q Max
-5.4823 -0.8753 0.1439 1.1439 3.5448
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.31984 0.44440 5.22 2.36e-07 ***
Mag 0.85589 0.06687 12.80 < 2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1.574 on 700 degrees of freedom
Multiple R-squared: 0.1897, Adjusted R-squared: 0.1885
F-statistic: 163.8 on 1 and 700 DF, p-value: < 2.2e-16
plot(eq_content_w_mmi_mag_depth$Mag, eq_content_w_mmi_mag_depth$MMI.Int, xlab ="Magnitude", ylab ="Modified Mercalli Intensity", main ="Earthquake Intensity versus Magnitude")abline(MMIvMag, col ="red")
MMIvMagRes <-resid(MMIvMag)plot(fitted(MMIvMag), MMIvMagRes, xlab ="Fitted Model", ylab ="Residuals", main ="Residuals of the Intensity versus Magnitude Linear Regression")abline(0,0)
Calculate the root mean square error for the linear regression model.
Call:
lm(formula = MMI.Int ~ Focal.Depth..km., data = eq_content_w_mmi_mag_depth)
Residuals:
Min 1Q Median 3Q Max
-6.0734 -1.0342 0.0107 1.0555 4.3187
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 8.129372 0.091314 89.026 < 2e-16 ***
Focal.Depth..km. -0.005601 0.002065 -2.712 0.00685 **
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1.74 on 700 degrees of freedom
Multiple R-squared: 0.0104, Adjusted R-squared: 0.008984
F-statistic: 7.355 on 1 and 700 DF, p-value: 0.006851
plot(eq_content_w_mmi_mag_depth$Focal.Depth..km., eq_content_w_mmi_mag_depth$MMI.Int, xlab ="Earthquake Focal Depth (km)", ylab ="Modified Mercalli Intensity", main ="Earthquake Intensity versus Depth")abline(MMIvDepth, col ="red")
MMIvDepthRes <-resid(MMIvDepth)plot(fitted(MMIvDepth), MMIvDepthRes, xlab ="Fitted Model", ylab ="Residuals", main ="Residuals of the Intensity versus Depth Linear Regression")abline(0,0)
Calculate the root mean square error for the linear regression model.
I wanted to see if there was a dependency between the magnitude and depth of earthquakes to determine whether or not I would need to include the interaction term in my multiple linear regression model.
Call:
lm(formula = Mag ~ Focal.Depth..km., data = eq_content_w_mmi_mag_depth)
Residuals:
Min 1Q Median 3Q Max
-2.48888 -0.61717 -0.07002 0.67247 2.90268
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 6.441730 0.046039 139.920 < 2e-16 ***
Focal.Depth..km. 0.004715 0.001041 4.528 6.99e-06 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.8771 on 700 degrees of freedom
Multiple R-squared: 0.02846, Adjusted R-squared: 0.02707
F-statistic: 20.5 on 1 and 700 DF, p-value: 6.993e-06
plot(eq_content_w_mmi_mag_depth$Focal.Depth..km., eq_content_w_mmi_mag_depth$Mag, xlab ="Earthquake Focal Depth (km)", ylab ="Magnitude", main ="Earthquake Magnitude versus Depth")abline(MagvDepth, col ="red")
Since there is a significant p-value for the focal depth, I needed to include the interaction term between magnitude and depth in my linear regression model.
Call:
lm(formula = MMI.Int ~ Mag + Focal.Depth..km. + Mag:Focal.Depth..km.,
data = eq_content_w_mmi_mag_depth)
Residuals:
Min 1Q Median 3Q Max
-5.5846 -0.7898 0.1769 1.0575 3.7028
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.723030 0.664497 4.098 4.66e-05 ***
Mag 0.840322 0.101573 8.273 6.61e-16 ***
Focal.Depth..km. -0.027511 0.017992 -1.529 0.127
Mag:Focal.Depth..km. 0.002629 0.002675 0.983 0.326
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1.544 on 698 degrees of freedom
Multiple R-squared: 0.2224, Adjusted R-squared: 0.2191
F-statistic: 66.56 on 3 and 698 DF, p-value: < 2.2e-16
MMIvMag_and_Depth_InteractionRes <-resid(MMIvMag_and_Depth_Interaction)plot(fitted(MMIvMag_and_Depth_Interaction), MMIvMag_and_Depth_InteractionRes, xlab ="Fitted Model", ylab ="Residuals", main ="Residuals of the Intensity versus \nMagnitude and Depth Linear Regression")abline(0,0)
Calculate the root mean square error for the multiple linear regression model.
It seems like the residuals for my multiple linear regression model are fairly evenly spread above and below zero and it does not seem to show a particular pattern in the spread of points, so my model seems to be a fairly good fit for predicting the intensity, though the r-squared is a little low at 0.2191. The root mean square error for the model is around 1.540. It also had a residual standard error of 1.544. The multiple linear regression also performed better than the two simple linear regression models which had an r-squared value of 0.1897 and 0.0104, a root mean square error of 1.572 and 1.737 and a residual standard error of 1.574 and 1.74. I did find it interesting how the depth in the multiple linear regression model did not have a significant p-value while the linear regression between just the intensity and the depth did have a significant p-value. This is likely due to the depth being related to the magnitude and therefore appearing to be significant with the linear regression when magnitude is not included, but since the intensity is related to the magnitude rather than the depth, then when the magnitude was added the depth variable was no longer considered to be significant.
Predicting the intensity of an earthquake using k-NN
I next wanted to see if I could create a better model to predict the intensity of the earthquake using k-nearest neighbor. The first step was to split the data into test and training data sets and normalize my variables since the magnitude is in a log scale while the depth is not.
Since the accuracy went up going from k = 3 to k = 5 and went down from k = 5 to k = 7, then the optimal model should either be when k = 4, k = 5 or k = 6.
set.seed(1)classifier_4kNN <-knn(train_scaled, test_scaled, train_set$MMI.Int, k =4)table(classifier_4kNN, test_set$MMI.Int)
Calculate the root mean square error of the k-NN model where k = 6 so that I can compare its performance to the multiple linear regression model’s performance.
The most accurate k-NN model that I got was the one where k = 6 with an accuracy of 23.18%. Looking at the confusion matrix, it seems like the model predicts a wide range of intensities (covering nearly the whole range of intensity values) for earthquakes that had an intensity between 6 and 10 with the majority of the estimates being within a scale of 2 away from the actual intensity value. The root mean square error for this k-NN model is around 2.015, which is more than the root mean square error of 1.540 of the multiple regression model. Based on the root mean square error values, it seems like the multiple linear regression model is a better model for predicting the earthquake intensity than the k-NN model.
Predicting the damage caused by an earthquake
I will now create a new table that will only contain the entries that have values for the intensity, magnitude, depth, deaths and damage description (there were not that many entries with values for the actual damage in millions). The damage description values are:
I start out testing each of the predictor variables individually using a linear regression model to see how well they predict the damage caused by the earthquake.
Call:
lm(formula = Damage.Description ~ Mag, data = eq_content_w_mmi_mag_depth_damage)
Residuals:
Min 1Q Median 3Q Max
-2.2482 -0.6713 0.1081 0.8197 1.8716
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.56742 0.27565 2.058 0.0399 *
Mag 0.33933 0.04136 8.204 1.19e-15 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.9471 on 668 degrees of freedom
(84 observations deleted due to missingness)
Multiple R-squared: 0.09154, Adjusted R-squared: 0.09018
F-statistic: 67.31 on 1 and 668 DF, p-value: 1.192e-15
DamagevMagRes <-resid(DamagevMag)plot(fitted(DamagevMag), DamagevMagRes, xlab ="Fitted Model", ylab ="Residuals", main ="Residuals of the Damage versus Magnitude Linear Regression")abline(0,0)
plot(eq_content_w_mmi_mag_depth_damage$Mag, eq_content_w_mmi_mag_depth_damage$Damage.Description, xlab ="Earthquake Magnitude", ylab ="Earthquake Damage", main ="Earthquake Damage versus Magnitude")abline(DamagevMag, col ="red")
Calculate the root mean square error for the linear regression model.
Call:
lm(formula = Damage.Description ~ Focal.Depth..km., data = eq_content_w_mmi_mag_depth_damage)
Residuals:
Min 1Q Median 3Q Max
-1.9248 -0.8221 0.1243 1.1020 2.0889
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.942643 0.053527 54.975 < 2e-16 ***
Focal.Depth..km. -0.004465 0.001258 -3.549 0.000413 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.9844 on 668 degrees of freedom
(84 observations deleted due to missingness)
Multiple R-squared: 0.01851, Adjusted R-squared: 0.01704
F-statistic: 12.6 on 1 and 668 DF, p-value: 0.0004134
DamagevDepthRes <-resid(DamagevDepth)plot(fitted(DamagevDepth), DamagevDepthRes, xlab ="Fitted Model", ylab ="Residuals", main ="Residuals of the Damage versus Depth Linear Regression")abline(0,0)
plot(eq_content_w_mmi_mag_depth_damage$Focal.Depth..km., eq_content_w_mmi_mag_depth_damage$Damage.Description, xlab ="Earthquake Depth", ylab ="Earthquake Damage", main ="Earthquake Damage versus Depth")abline(DamagevDepth, col ="red")
Calculate the root mean square error for the linear regression model.
Call:
lm(formula = Damage.Description ~ MMI.Int, data = eq_content_w_mmi_mag_depth_damage)
Residuals:
Min 1Q Median 3Q Max
-2.52012 -0.57331 -0.04672 0.71658 2.37350
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.91639 0.16478 5.561 3.88e-08 ***
MMI.Int 0.23670 0.02014 11.753 < 2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.9045 on 668 degrees of freedom
(84 observations deleted due to missingness)
Multiple R-squared: 0.1713, Adjusted R-squared: 0.1701
F-statistic: 138.1 on 1 and 668 DF, p-value: < 2.2e-16
DamagevMMIRes <-resid(DamagevMMI)plot(fitted(DamagevMMI), DamagevMMIRes, xlab ="Fitted Model", ylab ="Residuals", main ="Residuals of the Damage versus Intensity Linear Regression")abline(0,0)
plot(eq_content_w_mmi_mag_depth_damage$MMI.Int, eq_content_w_mmi_mag_depth_damage$Damage.Description, xlab ="Earthquake Intensity", ylab ="Earthquake Damage", main ="Earthquake Damage versus Intensity")abline(DamagevMMI, col ="red")
Calculate the root mean square error for the linear regression model.
The magnitude, depth and intensity all seem to have significant p-values with intensity having the smallest p-value and the lowest root mean square error and residual standard error of the three. Looking at the graphs of the residuals, it seems like there is a pattern in the damage versus magnitude and damage versus intensity graphs where more of the points are above zero on the left and more of them are below zero on the right hand side. For the residual graph for damage versus depth, most of the points are on the right hand side. Since the residual graphs show some patterns, these linear regression models are not the best fit. I will now test the multiple linear regression of all three (including the interaction terms between the three variables since none of them are independent from each other) to see if I can lower the residual standard error, improve the r-squared value of the model and hopefully get a better looking residual graph.
Call:
lm(formula = Damage.Description ~ Mag + Focal.Depth..km. + Mag:Focal.Depth..km. +
MMI.Int + MMI.Int:Mag + MMI.Int:Focal.Depth..km., data = eq_content_w_mmi_mag_depth_damage)
Residuals:
Min 1Q Median 3Q Max
-2.3894 -0.6210 0.0054 0.7013 2.2651
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -1.3676010 1.1855520 -1.154 0.2491
Mag 0.4124889 0.1907048 2.163 0.0309 *
Focal.Depth..km. 0.0010967 0.0120522 0.091 0.9275
MMI.Int 0.3602542 0.1403122 2.568 0.0105 *
Mag:Focal.Depth..km. -0.0000227 0.0020328 -0.011 0.9911
Mag:MMI.Int -0.0237609 0.0216407 -1.098 0.2726
Focal.Depth..km.:MMI.Int -0.0007915 0.0007894 -1.003 0.3164
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.8845 on 663 degrees of freedom
(84 observations deleted due to missingness)
Multiple R-squared: 0.2136, Adjusted R-squared: 0.2065
F-statistic: 30.02 on 6 and 663 DF, p-value: < 2.2e-16
DamagevMag_and_Depth_MMI_InteractionRes <-resid(DamagevMag_and_Depth_MMI_Interaction)plot(fitted(DamagevMag_and_Depth_MMI_Interaction), DamagevMag_and_Depth_MMI_InteractionRes, xlab ="Fitted Model", ylab ="Residuals", main ="Residuals of the Damage versus \nMagnitude, Depth and Intensity Linear Regression")abline(0,0)
Calculate the root mean square error for the multiple linear regression model.
With the multiple linear regression model, only the coefficients for the magnitude and intensity of the earthquake are considered significant based on their p-values. The residual standard error went down slightly from 0.9045 with the damage versus intensity linear regression model to 0.8845. The root mean square error also went down slightly from 0.9032 to 0.8798. The r-squared value also went up slightly from 0.1713 with the damage versus intensity linear regression model to 0.2065 with the multiple linear regression model. This multiple linear regression model still seems to have the pattern in the residual graph where there are more points above zero on the left and more points below zero on the right.
I will next test to see what the multiple linear regression using just the magnitude and intensity as well as the interaction term between the two as predictor variables looks like.
Call:
lm(formula = Damage.Description ~ Mag + MMI.Int + MMI.Int:Mag,
data = eq_content_w_mmi_mag_depth_damage)
Residuals:
Min 1Q Median 3Q Max
-2.3983 -0.6349 -0.0287 0.7425 2.3409
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -1.22075 1.15465 -1.057 0.2908
Mag 0.37372 0.17944 2.083 0.0377 *
MMI.Int 0.36279 0.14142 2.565 0.0105 *
Mag:MMI.Int -0.02505 0.02138 -1.172 0.2417
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.8948 on 666 degrees of freedom
(84 observations deleted due to missingness)
Multiple R-squared: 0.1916, Adjusted R-squared: 0.1879
F-statistic: 52.61 on 3 and 666 DF, p-value: < 2.2e-16
DamagevMag_and_MMI_InteractionRes <-resid(DamagevMag_and_MMI_Interaction)plot(fitted(DamagevMag_and_MMI_Interaction), DamagevMag_and_MMI_InteractionRes, xlab ="Fitted Model", ylab ="Residuals", main ="Residuals of the Damage versus \nMagnitude and Intensity Linear Regression")abline(0,0)
Calculate the root mean square error for the multiple linear regression model.
By removing the depth from the multiple linear regression, the residual standard error goes up slightly from 0.8845 to 0.8948 and the r-squared value goes from 0.2065 to 0.1879. The root mean square error also went up slightly from 0.8798 to 0.8921.
I will next split the data up by the country where the earthquake occurred to see if the linear regression model created for each country is a better fit since each country has its own building codes that can influence how much damage an earthquake of the same magnitude and intensity would cause.
Predicting the damage caused by an earthquake based on country
Here I split up the Location.Name string that contained the country and city where the earthquake occurred so that I could create a column with just the countries where the earthquakes happened. This is so that I can compare the regression lines for predicting earthquake damage and deaths between different countries. There were a few earthquakes that occurred at the boundary between multiple countries, so I picked the first country that was listed in the Location.Name column.
Next I created multiple linear regression models for the countries that had a significant p-value for their coefficient in relation to the damage caused by the earthquakes to see how the damage caused varies across countries.
Call:
lm(formula = Damage.Description ~ Mag + MMI.Int + MMI.Int:Mag +
Mag:Location.Country + MMI.Int:Location.Country + Location.Country,
data = eq_content_w_mmi_mag_depth_damage)
Residuals:
Min 1Q Median 3Q Max
-2.4722 -0.4453 0.0000 0.4955 1.7987
Coefficients: (80 not defined because of singularities)
Estimate Std. Error t value
(Intercept) -2.867914 2.663898 -1.077
Mag 0.328041 0.391990 0.837
MMI.Int 0.611107 0.220166 2.776
Location.CountryALASKA -0.504896 1.486373 -0.340
Location.CountryALBANIA 0.761586 5.154471 0.148
Location.CountryALGERIA -3.356294 4.850925 -0.692
Location.CountryARGENTINA -6.258917 5.075920 -1.233
Location.CountryARMENIA 14.107772 15.881488 0.888
Location.CountryAUSTRALIA 1.032303 0.917009 1.126
Location.CountryAUSTRIA -1.020294 0.894606 -1.140
Location.CountryAZERBAIJAN -2.937068 4.499468 -0.653
Location.CountryAZORES 2.704380 6.675192 0.405
Location.CountryBALKANS NW -1.069394 3.391925 -0.315
Location.CountryBELGIUM 1.618092 0.945785 1.711
Location.CountryBOSNIA -0.401349 0.931969 -0.431
Location.CountryBULGARIA -2.004995 6.774857 -0.296
Location.CountryCALIFORNIA 3.663512 2.915004 1.257
Location.CountryCHILE -2.676248 3.037162 -0.881
Location.CountryCHINA 3.451971 2.634312 1.310
Location.CountryCOLOMBIA 2.035673 3.030964 0.672
Location.CountryCONGO 3.253215 4.426611 0.735
Location.CountryCOSTA RICA 7.153442 7.403034 0.966
Location.CountryCUBA 33.226042 79.384112 0.419
Location.CountryCYPRUS 22.309969 19.114973 1.167
Location.CountryDJIBOUTI -1.616332 0.932550 -1.733
Location.CountryDOMINICAN REPUBLIC -9.118602 30.266005 -0.301
Location.CountryECUADOR 2.776078 2.909443 0.954
Location.CountryEGYPT -1.283281 0.956097 -1.342
Location.CountryEL SALVADOR 6.950856 4.597428 1.512
Location.CountryETHIOPIA -1.600708 0.725128 -2.207
Location.CountryFRANCE -0.950164 0.926890 -1.025
Location.CountryGEORGIA -0.946506 6.811389 -0.139
Location.CountryGHANA -0.631955 0.935863 -0.675
Location.CountryGREECE 4.869053 2.956152 1.647
Location.CountryGREECE, TURKEY 1.248706 0.894796 1.396
Location.CountryGUADELOUPE 0.071198 1.202983 0.059
Location.CountryGUATEMALA -3.908090 4.874240 -0.802
Location.CountryGUINEA -0.600708 0.930510 -0.646
Location.CountryHAITI 4.485501 4.123753 1.088
Location.CountryHONDURAS 1.139903 1.018079 1.120
Location.CountryIDAHO -0.772567 1.019316 -0.758
Location.CountryINDIA 2.332129 3.035332 0.768
Location.CountryINDONESIA 1.587696 2.575033 0.617
Location.CountryIRAN -0.201836 2.573337 -0.078
Location.CountryIRAQ -0.915100 0.950056 -0.963
Location.CountryITALY 1.211499 2.781229 0.436
Location.CountryJAPAN 2.267569 2.973244 0.763
Location.CountryKAZAKHSTAN 20.345712 11.437354 1.779
Location.CountryKYRGYZSTAN 3.180355 6.751276 0.471
Location.CountryMALAYSIA -1.079752 0.862065 -1.253
Location.CountryMARTINIQUE -1.850684 1.101470 -1.680
Location.CountryMEXICO -2.190117 3.315413 -0.661
Location.CountryMONGOLIA -2.810518 1.310980 -2.144
Location.CountryMONTANA -1.299178 1.151493 -1.128
Location.CountryMOROCCO -14.739300 18.135686 -0.813
Location.CountryMOZAMBIQUE 0.184225 0.925272 0.199
Location.CountryMYANMAR (BURMA) 27.864639 20.732881 1.344
Location.CountryNEPAL -2.378425 3.387855 -0.702
Location.CountryNEW ZEALAND -7.713126 6.550420 -1.178
Location.CountryNICARAGUA 1.039230 0.970831 1.070
Location.CountryNORTH CORINTH GULF -0.090424 0.882639 -0.102
Location.CountryOREGON 0.423678 0.860290 0.492
Location.CountryPAKISTAN -2.722624 2.996581 -0.909
Location.CountryPAPUA NEW GUINEA 11.788678 6.899454 1.709
Location.CountryPERU 1.446904 2.516368 0.575
Location.CountryPHILIPPINES 1.508021 2.860478 0.527
Location.CountryPORTUGAL -0.926267 1.024817 -0.904
Location.CountryPUERTO RICO 0.856979 0.887545 0.966
Location.CountryROMANIA -3.687100 5.039726 -0.732
Location.CountryRUSSIA 3.052251 3.319050 0.920
Location.CountrySOLOMON ISLANDS 6.197319 7.001829 0.885
Location.CountrySOUTH AFRICA 4.449909 9.468336 0.470
Location.CountrySOUTH KOREA 1.048351 0.901619 1.163
Location.CountryTAIWAN 3.425613 3.613347 0.948
Location.CountryTAJIKISTAN 1.203954 3.727749 0.323
Location.CountryTHAILAND 2.393559 0.886480 2.700
Location.CountryTHE NETHERLANDS 1.067368 0.937919 1.138
Location.CountryTONGA TRENCH 0.611369 0.992295 0.616
Location.CountryTURKEY 0.656399 2.835581 0.231
Location.CountryTURKMENISTAN 109.703450 40.348310 2.719
Location.CountryUGANDA -0.692970 0.871475 -0.795
Location.CountryUKRAINE 0.305551 0.961497 0.318
Location.CountryUZBEKISTAN 0.368045 0.935863 0.393
Location.CountryVANUATU ISLANDS 0.209823 0.916400 0.229
Location.CountryVENEZUELA -1.000865 3.303193 -0.303
Location.CountryWASHINGTON 1.979055 39.131508 0.051
Location.CountryYEMEN 0.927109 0.883657 1.049
Mag:MMI.Int -0.019090 0.027164 -0.703
Mag:Location.CountryALASKA NA NA NA
Mag:Location.CountryALBANIA 0.412169 0.827734 0.498
Mag:Location.CountryALGERIA 2.757967 1.077640 2.559
Mag:Location.CountryARGENTINA 0.026346 0.759438 0.035
Mag:Location.CountryARMENIA -2.100518 2.439536 -0.861
Mag:Location.CountryAUSTRALIA NA NA NA
Mag:Location.CountryAUSTRIA NA NA NA
Mag:Location.CountryAZERBAIJAN 1.095156 0.890540 1.230
Mag:Location.CountryAZORES 0.380231 0.732876 0.519
Mag:Location.CountryBALKANS NW 0.942590 0.658030 1.432
Mag:Location.CountryBELGIUM NA NA NA
Mag:Location.CountryBOSNIA NA NA NA
Mag:Location.CountryBULGARIA 0.269007 1.104652 0.244
Mag:Location.CountryCALIFORNIA -0.202924 0.479515 -0.423
Mag:Location.CountryCHILE 0.626123 0.480001 1.304
Mag:Location.CountryCHINA 0.002503 0.398905 0.006
Mag:Location.CountryCOLOMBIA -0.321747 0.419963 -0.766
Mag:Location.CountryCONGO -0.520761 0.737311 -0.706
Mag:Location.CountryCOSTA RICA 3.217399 2.272947 1.416
Mag:Location.CountryCUBA -4.988307 11.766853 -0.424
Mag:Location.CountryCYPRUS -3.875737 3.148247 -1.231
Mag:Location.CountryDJIBOUTI NA NA NA
Mag:Location.CountryDOMINICAN REPUBLIC 1.249643 4.608819 0.271
Mag:Location.CountryECUADOR -0.411454 0.501237 -0.821
Mag:Location.CountryEGYPT NA NA NA
Mag:Location.CountryEL SALVADOR -0.002142 0.954341 -0.002
Mag:Location.CountryETHIOPIA NA NA NA
Mag:Location.CountryFRANCE NA NA NA
Mag:Location.CountryGEORGIA 1.874309 4.055574 0.462
Mag:Location.CountryGHANA NA NA NA
Mag:Location.CountryGREECE 0.068932 0.423828 0.163
Mag:Location.CountryGREECE, TURKEY NA NA NA
Mag:Location.CountryGUADELOUPE NA NA NA
Mag:Location.CountryGUATEMALA 1.438504 1.149269 1.252
Mag:Location.CountryGUINEA NA NA NA
Mag:Location.CountryHAITI 2.086847 2.398340 0.870
Mag:Location.CountryHONDURAS NA NA NA
Mag:Location.CountryIDAHO NA NA NA
Mag:Location.CountryINDIA 0.031542 0.467700 0.067
Mag:Location.CountryINDONESIA -0.010686 0.377805 -0.028
Mag:Location.CountryIRAN 0.331031 0.390180 0.848
Mag:Location.CountryIRAQ NA NA NA
Mag:Location.CountryITALY 0.582390 0.481866 1.209
Mag:Location.CountryJAPAN 0.201214 0.420607 0.478
Mag:Location.CountryKAZAKHSTAN -2.811025 1.598461 -1.759
Mag:Location.CountryKYRGYZSTAN 1.433075 1.281179 1.119
Mag:Location.CountryMALAYSIA NA NA NA
Mag:Location.CountryMARTINIQUE NA NA NA
Mag:Location.CountryMEXICO 0.647013 0.499201 1.296
Mag:Location.CountryMONGOLIA NA NA NA
Mag:Location.CountryMONTANA NA NA NA
Mag:Location.CountryMOROCCO 1.733082 2.651222 0.654
Mag:Location.CountryMOZAMBIQUE NA NA NA
Mag:Location.CountryMYANMAR (BURMA) -3.916749 2.962190 -1.322
Mag:Location.CountryNEPAL 0.620182 0.620042 1.000
Mag:Location.CountryNEW ZEALAND 0.232460 0.794064 0.293
Mag:Location.CountryNICARAGUA NA NA NA
Mag:Location.CountryNORTH CORINTH GULF NA NA NA
Mag:Location.CountryOREGON NA NA NA
Mag:Location.CountryPAKISTAN 0.940813 0.470012 2.002
Mag:Location.CountryPAPUA NEW GUINEA -0.732290 1.322670 -0.554
Mag:Location.CountryPERU 0.156009 0.367973 0.424
Mag:Location.CountryPHILIPPINES -0.017627 0.437674 -0.040
Mag:Location.CountryPORTUGAL NA NA NA
Mag:Location.CountryPUERTO RICO NA NA NA
Mag:Location.CountryROMANIA 1.301059 0.762221 1.707
Mag:Location.CountryRUSSIA 0.048022 0.627756 0.076
Mag:Location.CountrySOLOMON ISLANDS 1.043655 1.308043 0.798
Mag:Location.CountrySOUTH AFRICA -0.804165 1.605945 -0.501
Mag:Location.CountrySOUTH KOREA NA NA NA
Mag:Location.CountryTAIWAN -0.560363 0.588105 -0.953
Mag:Location.CountryTAJIKISTAN 0.058923 0.521201 0.113
Mag:Location.CountryTHAILAND NA NA NA
Mag:Location.CountryTHE NETHERLANDS NA NA NA
Mag:Location.CountryTONGA TRENCH NA NA NA
Mag:Location.CountryTURKEY 0.378296 0.483286 0.783
Mag:Location.CountryTURKMENISTAN 29.862855 11.667835 2.559
Mag:Location.CountryUGANDA NA NA NA
Mag:Location.CountryUKRAINE NA NA NA
Mag:Location.CountryUZBEKISTAN NA NA NA
Mag:Location.CountryVANUATU ISLANDS NA NA NA
Mag:Location.CountryVENEZUELA 0.767926 0.533856 1.438
Mag:Location.CountryWASHINGTON -0.175324 5.841332 -0.030
Mag:Location.CountryYEMEN NA NA NA
MMI.Int:Location.CountryALASKA NA NA NA
MMI.Int:Location.CountryALBANIA -0.443602 0.510943 -0.868
MMI.Int:Location.CountryALGERIA -1.590507 0.407389 -3.904
MMI.Int:Location.CountryARGENTINA 0.723748 0.582073 1.243
MMI.Int:Location.CountryARMENIA NA NA NA
MMI.Int:Location.CountryAUSTRALIA NA NA NA
MMI.Int:Location.CountryAUSTRIA NA NA NA
MMI.Int:Location.CountryAZERBAIJAN -0.487263 0.329312 -1.480
MMI.Int:Location.CountryAZORES -0.694832 0.530247 -1.310
MMI.Int:Location.CountryBALKANS NW -0.574115 0.312242 -1.839
MMI.Int:Location.CountryBELGIUM NA NA NA
MMI.Int:Location.CountryBOSNIA NA NA NA
MMI.Int:Location.CountryBULGARIA NA NA NA
MMI.Int:Location.CountryCALIFORNIA -0.246139 0.253258 -0.972
MMI.Int:Location.CountryCHILE -0.349443 0.212372 -1.645
MMI.Int:Location.CountryCHINA -0.429501 0.172635 -2.488
MMI.Int:Location.CountryCOLOMBIA -0.109472 0.257835 -0.425
MMI.Int:Location.CountryCONGO NA NA NA
MMI.Int:Location.CountryCOSTA RICA -3.189114 2.215794 -1.439
MMI.Int:Location.CountryCUBA NA NA NA
MMI.Int:Location.CountryCYPRUS NA NA NA
MMI.Int:Location.CountryDJIBOUTI NA NA NA
MMI.Int:Location.CountryDOMINICAN REPUBLIC NA NA NA
MMI.Int:Location.CountryECUADOR -0.042768 0.264068 -0.162
MMI.Int:Location.CountryEGYPT NA NA NA
MMI.Int:Location.CountryEL SALVADOR -0.964256 0.784714 -1.229
MMI.Int:Location.CountryETHIOPIA NA NA NA
MMI.Int:Location.CountryFRANCE NA NA NA
MMI.Int:Location.CountryGEORGIA -1.322150 2.694300 -0.491
MMI.Int:Location.CountryGHANA NA NA NA
MMI.Int:Location.CountryGREECE -0.662596 0.215734 -3.071
MMI.Int:Location.CountryGREECE, TURKEY NA NA NA
MMI.Int:Location.CountryGUADELOUPE NA NA NA
MMI.Int:Location.CountryGUATEMALA -0.804227 0.563954 -1.426
MMI.Int:Location.CountryGUINEA NA NA NA
MMI.Int:Location.CountryHAITI -2.140860 1.860961 -1.150
MMI.Int:Location.CountryHONDURAS NA NA NA
MMI.Int:Location.CountryIDAHO NA NA NA
MMI.Int:Location.CountryINDIA -0.325082 0.236404 -1.375
MMI.Int:Location.CountryINDONESIA -0.254537 0.169446 -1.502
MMI.Int:Location.CountryIRAN -0.258609 0.191586 -1.350
MMI.Int:Location.CountryIRAQ NA NA NA
MMI.Int:Location.CountryITALY -0.560207 0.224195 -2.499
MMI.Int:Location.CountryJAPAN -0.472365 0.181907 -2.597
MMI.Int:Location.CountryKAZAKHSTAN NA NA NA
MMI.Int:Location.CountryKYRGYZSTAN -1.525803 0.546372 -2.793
MMI.Int:Location.CountryMALAYSIA NA NA NA
MMI.Int:Location.CountryMARTINIQUE NA NA NA
MMI.Int:Location.CountryMEXICO -0.348645 0.194754 -1.790
MMI.Int:Location.CountryMONGOLIA NA NA NA
MMI.Int:Location.CountryMONTANA NA NA NA
MMI.Int:Location.CountryMOROCCO 0.446180 0.365425 1.221
MMI.Int:Location.CountryMOZAMBIQUE NA NA NA
MMI.Int:Location.CountryMYANMAR (BURMA) NA NA NA
MMI.Int:Location.CountryNEPAL -0.289340 0.293062 -0.987
MMI.Int:Location.CountryNEW ZEALAND 0.621061 0.397929 1.561
MMI.Int:Location.CountryNICARAGUA NA NA NA
MMI.Int:Location.CountryNORTH CORINTH GULF NA NA NA
MMI.Int:Location.CountryOREGON NA NA NA
MMI.Int:Location.CountryPAKISTAN -0.476120 0.188740 -2.523
MMI.Int:Location.CountryPAPUA NEW GUINEA -0.926399 0.512334 -1.808
MMI.Int:Location.CountryPERU -0.392435 0.170351 -2.304
MMI.Int:Location.CountryPHILIPPINES -0.262144 0.186704 -1.404
MMI.Int:Location.CountryPORTUGAL NA NA NA
MMI.Int:Location.CountryPUERTO RICO NA NA NA
MMI.Int:Location.CountryROMANIA -0.698938 0.343538 -2.035
MMI.Int:Location.CountryRUSSIA -0.492544 0.466551 -1.056
MMI.Int:Location.CountrySOLOMON ISLANDS -2.090788 0.873123 -2.395
MMI.Int:Location.CountrySOUTH AFRICA NA NA NA
MMI.Int:Location.CountrySOUTH KOREA NA NA NA
MMI.Int:Location.CountryTAIWAN -0.041725 0.226245 -0.184
MMI.Int:Location.CountryTAJIKISTAN -0.228583 0.211130 -1.083
MMI.Int:Location.CountryTHAILAND NA NA NA
MMI.Int:Location.CountryTHE NETHERLANDS NA NA NA
MMI.Int:Location.CountryTONGA TRENCH NA NA NA
MMI.Int:Location.CountryTURKEY -0.425410 0.208118 -2.044
MMI.Int:Location.CountryTURKMENISTAN -32.494661 12.288165 -2.644
MMI.Int:Location.CountryUGANDA NA NA NA
MMI.Int:Location.CountryUKRAINE NA NA NA
MMI.Int:Location.CountryUZBEKISTAN NA NA NA
MMI.Int:Location.CountryVANUATU ISLANDS NA NA NA
MMI.Int:Location.CountryVENEZUELA -0.552434 0.218418 -2.529
MMI.Int:Location.CountryWASHINGTON NA NA NA
MMI.Int:Location.CountryYEMEN NA NA NA
Pr(>|t|)
(Intercept) 0.282191
Mag 0.403076
MMI.Int 0.005718 **
Location.CountryALASKA 0.734239
Location.CountryALBANIA 0.882598
Location.CountryALGERIA 0.489333
Location.CountryARGENTINA 0.218140
Location.CountryARMENIA 0.374803
Location.CountryAUSTRALIA 0.260827
Location.CountryAUSTRIA 0.254633
Location.CountryAZERBAIJAN 0.514215
Location.CountryAZORES 0.685551
Location.CountryBALKANS NW 0.752685
Location.CountryBELGIUM 0.087737 .
Location.CountryBOSNIA 0.666913
Location.CountryBULGARIA 0.767395
Location.CountryCALIFORNIA 0.209428
Location.CountryCHILE 0.378656
Location.CountryCHINA 0.190673
Location.CountryCOLOMBIA 0.502136
Location.CountryCONGO 0.462736
Location.CountryCOSTA RICA 0.334374
Location.CountryCUBA 0.675729
Location.CountryCYPRUS 0.243714
Location.CountryDJIBOUTI 0.083677 .
Location.CountryDOMINICAN REPUBLIC 0.763326
Location.CountryECUADOR 0.340469
Location.CountryEGYPT 0.180145
Location.CountryEL SALVADOR 0.131199
Location.CountryETHIOPIA 0.027739 *
Location.CountryFRANCE 0.305813
Location.CountryGEORGIA 0.889539
Location.CountryGHANA 0.499823
Location.CountryGREECE 0.100175
Location.CountryGREECE, TURKEY 0.163486
Location.CountryGUADELOUPE 0.952829
Location.CountryGUATEMALA 0.423063
Location.CountryGUINEA 0.518858
Location.CountryHAITI 0.277248
Location.CountryHONDURAS 0.263403
Location.CountryIDAHO 0.448856
Location.CountryINDIA 0.442660
Location.CountryINDONESIA 0.537801
Location.CountryIRAN 0.937515
Location.CountryIRAQ 0.335915
Location.CountryITALY 0.663318
Location.CountryJAPAN 0.446031
Location.CountryKAZAKHSTAN 0.075874 .
Location.CountryKYRGYZSTAN 0.637795
Location.CountryMALAYSIA 0.210974
Location.CountryMARTINIQUE 0.093552 .
Location.CountryMEXICO 0.509186
Location.CountryMONGOLIA 0.032534 *
Location.CountryMONTANA 0.259760
Location.CountryMOROCCO 0.416768
Location.CountryMOZAMBIQUE 0.842263
Location.CountryMYANMAR (BURMA) 0.179571
Location.CountryNEPAL 0.482982
Location.CountryNEW ZEALAND 0.239563
Location.CountryNICARAGUA 0.284938
Location.CountryNORTH CORINTH GULF 0.918443
Location.CountryOREGON 0.622596
Location.CountryPAKISTAN 0.364016
Location.CountryPAPUA NEW GUINEA 0.088146 .
Location.CountryPERU 0.565555
Location.CountryPHILIPPINES 0.598297
Location.CountryPORTUGAL 0.366523
Location.CountryPUERTO RICO 0.334736
Location.CountryROMANIA 0.464755
Location.CountryRUSSIA 0.358222
Location.CountrySOLOMON ISLANDS 0.376533
Location.CountrySOUTH AFRICA 0.638578
Location.CountrySOUTH KOREA 0.245495
Location.CountryTAIWAN 0.343570
Location.CountryTAJIKISTAN 0.746854
Location.CountryTHAILAND 0.007170 **
Location.CountryTHE NETHERLANDS 0.255665
Location.CountryTONGA TRENCH 0.538102
Location.CountryTURKEY 0.817033
Location.CountryTURKMENISTAN 0.006780 **
Location.CountryUGANDA 0.426897
Location.CountryUKRAINE 0.750781
Location.CountryUZBEKISTAN 0.694291
Location.CountryVANUATU ISLANDS 0.818991
Location.CountryVENEZUELA 0.762018
Location.CountryWASHINGTON 0.959685
Location.CountryYEMEN 0.294612
Mag:MMI.Int 0.482547
Mag:Location.CountryALASKA NA
Mag:Location.CountryALBANIA 0.618742
Mag:Location.CountryALGERIA 0.010786 *
Mag:Location.CountryARGENTINA 0.972339
Mag:Location.CountryARMENIA 0.389638
Mag:Location.CountryAUSTRALIA NA
Mag:Location.CountryAUSTRIA NA
Mag:Location.CountryAZERBAIJAN 0.219370
Mag:Location.CountryAZORES 0.604118
Mag:Location.CountryBALKANS NW 0.152650
Mag:Location.CountryBELGIUM NA
Mag:Location.CountryBOSNIA NA
Mag:Location.CountryBULGARIA 0.807702
Mag:Location.CountryCALIFORNIA 0.672343
Mag:Location.CountryCHILE 0.192698
Mag:Location.CountryCHINA 0.994997
Mag:Location.CountryCOLOMBIA 0.443964
Mag:Location.CountryCONGO 0.480337
Mag:Location.CountryCOSTA RICA 0.157547
Mag:Location.CountryCUBA 0.671802
Mag:Location.CountryCYPRUS 0.218879
Mag:Location.CountryDJIBOUTI NA
Mag:Location.CountryDOMINICAN REPUBLIC 0.786395
Mag:Location.CountryECUADOR 0.412112
Mag:Location.CountryEGYPT NA
Mag:Location.CountryEL SALVADOR 0.998210
Mag:Location.CountryETHIOPIA NA
Mag:Location.CountryFRANCE NA
Mag:Location.CountryGEORGIA 0.644173
Mag:Location.CountryGHANA NA
Mag:Location.CountryGREECE 0.870867
Mag:Location.CountryGREECE, TURKEY NA
Mag:Location.CountryGUADELOUPE NA
Mag:Location.CountryGUATEMALA 0.211283
Mag:Location.CountryGUINEA NA
Mag:Location.CountryHAITI 0.384657
Mag:Location.CountryHONDURAS NA
Mag:Location.CountryIDAHO NA
Mag:Location.CountryINDIA 0.946259
Mag:Location.CountryINDONESIA 0.977447
Mag:Location.CountryIRAN 0.396623
Mag:Location.CountryIRAQ NA
Mag:Location.CountryITALY 0.227389
Mag:Location.CountryJAPAN 0.632584
Mag:Location.CountryKAZAKHSTAN 0.079268 .
Mag:Location.CountryKYRGYZSTAN 0.263872
Mag:Location.CountryMALAYSIA NA
Mag:Location.CountryMARTINIQUE NA
Mag:Location.CountryMEXICO 0.195547
Mag:Location.CountryMONGOLIA NA
Mag:Location.CountryMONTANA NA
Mag:Location.CountryMOROCCO 0.513614
Mag:Location.CountryMOZAMBIQUE NA
Mag:Location.CountryMYANMAR (BURMA) 0.186698
Mag:Location.CountryNEPAL 0.317691
Mag:Location.CountryNEW ZEALAND 0.769839
Mag:Location.CountryNICARAGUA NA
Mag:Location.CountryNORTH CORINTH GULF NA
Mag:Location.CountryOREGON NA
Mag:Location.CountryPAKISTAN 0.045866 *
Mag:Location.CountryPAPUA NEW GUINEA 0.580072
Mag:Location.CountryPERU 0.671773
Mag:Location.CountryPHILIPPINES 0.967890
Mag:Location.CountryPORTUGAL NA
Mag:Location.CountryPUERTO RICO NA
Mag:Location.CountryROMANIA 0.088463 .
Mag:Location.CountryRUSSIA 0.939053
Mag:Location.CountrySOLOMON ISLANDS 0.425326
Mag:Location.CountrySOUTH AFRICA 0.616775
Mag:Location.CountrySOUTH KOREA NA
Mag:Location.CountryTAIWAN 0.341143
Mag:Location.CountryTAJIKISTAN 0.910034
Mag:Location.CountryTHAILAND NA
Mag:Location.CountryTHE NETHERLANDS NA
Mag:Location.CountryTONGA TRENCH NA
Mag:Location.CountryTURKEY 0.434144
Mag:Location.CountryTURKMENISTAN 0.010781 *
Mag:Location.CountryUGANDA NA
Mag:Location.CountryUKRAINE NA
Mag:Location.CountryUZBEKISTAN NA
Mag:Location.CountryVANUATU ISLANDS NA
Mag:Location.CountryVENEZUELA 0.150939
Mag:Location.CountryWASHINGTON 0.976068
Mag:Location.CountryYEMEN NA
MMI.Int:Location.CountryALASKA NA
MMI.Int:Location.CountryALBANIA 0.385704
MMI.Int:Location.CountryALGERIA 0.000108 ***
MMI.Int:Location.CountryARGENTINA 0.214311
MMI.Int:Location.CountryARMENIA NA
MMI.Int:Location.CountryAUSTRALIA NA
MMI.Int:Location.CountryAUSTRIA NA
MMI.Int:Location.CountryAZERBAIJAN 0.139606
MMI.Int:Location.CountryAZORES 0.190671
MMI.Int:Location.CountryBALKANS NW 0.066561 .
MMI.Int:Location.CountryBELGIUM NA
MMI.Int:Location.CountryBOSNIA NA
MMI.Int:Location.CountryBULGARIA NA
MMI.Int:Location.CountryCALIFORNIA 0.331581
MMI.Int:Location.CountryCHILE 0.100517
MMI.Int:Location.CountryCHINA 0.013178 *
MMI.Int:Location.CountryCOLOMBIA 0.671325
MMI.Int:Location.CountryCONGO NA
MMI.Int:Location.CountryCOSTA RICA 0.150709
MMI.Int:Location.CountryCUBA NA
MMI.Int:Location.CountryCYPRUS NA
MMI.Int:Location.CountryDJIBOUTI NA
MMI.Int:Location.CountryDOMINICAN REPUBLIC NA
MMI.Int:Location.CountryECUADOR 0.871406
MMI.Int:Location.CountryEGYPT NA
MMI.Int:Location.CountryEL SALVADOR 0.219732
MMI.Int:Location.CountryETHIOPIA NA
MMI.Int:Location.CountryFRANCE NA
MMI.Int:Location.CountryGEORGIA 0.623842
MMI.Int:Location.CountryGHANA NA
MMI.Int:Location.CountryGREECE 0.002248 **
MMI.Int:Location.CountryGREECE, TURKEY NA
MMI.Int:Location.CountryGUADELOUPE NA
MMI.Int:Location.CountryGUATEMALA 0.154485
MMI.Int:Location.CountryGUINEA NA
MMI.Int:Location.CountryHAITI 0.250533
MMI.Int:Location.CountryHONDURAS NA
MMI.Int:Location.CountryIDAHO NA
MMI.Int:Location.CountryINDIA 0.169720
MMI.Int:Location.CountryINDONESIA 0.133692
MMI.Int:Location.CountryIRAN 0.177687
MMI.Int:Location.CountryIRAQ NA
MMI.Int:Location.CountryITALY 0.012787 *
MMI.Int:Location.CountryJAPAN 0.009692 **
MMI.Int:Location.CountryKAZAKHSTAN NA
MMI.Int:Location.CountryKYRGYZSTAN 0.005431 **
MMI.Int:Location.CountryMALAYSIA NA
MMI.Int:Location.CountryMARTINIQUE NA
MMI.Int:Location.CountryMEXICO 0.074037 .
MMI.Int:Location.CountryMONGOLIA NA
MMI.Int:Location.CountryMONTANA NA
MMI.Int:Location.CountryMOROCCO 0.222673
MMI.Int:Location.CountryMOZAMBIQUE NA
MMI.Int:Location.CountryMYANMAR (BURMA) NA
MMI.Int:Location.CountryNEPAL 0.323980
MMI.Int:Location.CountryNEW ZEALAND 0.119227
MMI.Int:Location.CountryNICARAGUA NA
MMI.Int:Location.CountryNORTH CORINTH GULF NA
MMI.Int:Location.CountryOREGON NA
MMI.Int:Location.CountryPAKISTAN 0.011961 *
MMI.Int:Location.CountryPAPUA NEW GUINEA 0.071184 .
MMI.Int:Location.CountryPERU 0.021655 *
MMI.Int:Location.CountryPHILIPPINES 0.160930
MMI.Int:Location.CountryPORTUGAL NA
MMI.Int:Location.CountryPUERTO RICO NA
MMI.Int:Location.CountryROMANIA 0.042432 *
MMI.Int:Location.CountryRUSSIA 0.291615
MMI.Int:Location.CountrySOLOMON ISLANDS 0.017010 *
MMI.Int:Location.CountrySOUTH AFRICA NA
MMI.Int:Location.CountrySOUTH KOREA NA
MMI.Int:Location.CountryTAIWAN 0.853758
MMI.Int:Location.CountryTAJIKISTAN 0.279486
MMI.Int:Location.CountryTHAILAND NA
MMI.Int:Location.CountryTHE NETHERLANDS NA
MMI.Int:Location.CountryTONGA TRENCH NA
MMI.Int:Location.CountryTURKEY 0.041475 *
MMI.Int:Location.CountryTURKMENISTAN 0.008444 **
MMI.Int:Location.CountryUGANDA NA
MMI.Int:Location.CountryUKRAINE NA
MMI.Int:Location.CountryUZBEKISTAN NA
MMI.Int:Location.CountryVANUATU ISLANDS NA
MMI.Int:Location.CountryVENEZUELA 0.011741 *
MMI.Int:Location.CountryWASHINGTON NA
MMI.Int:Location.CountryYEMEN NA
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 0.8247 on 494 degrees of freedom
(84 observations deleted due to missingness)
Multiple R-squared: 0.4906, Adjusted R-squared: 0.3102
F-statistic: 2.719 on 175 and 494 DF, p-value: < 2.2e-16
Calculate the root mean square error for the multiple linear regression model.
Looking at the linear regression for the damage caused by the earthquake with respect to the country/state the earthquake occurred in, Armenia, California, China, India, Italy, Japan and Washington had significant p-values. When I looked at the multiple linear regression with the magnitude, intensity and the country where the earthquake happened as well as the interaction variables as predictors, the countries of Ethiopia, Mongolia, Thailand and Turkmenistan had significant p-values. Unfortunately, the countries/states of Armenia, Washington, Ethiopia, Mongolia, Thailand and Turkmenistan only have 3 or fewer entries, so the linear regression model that I make for these countries would not be very good at accurately predicting earthquake damage. I will next look at the multiple linear regression using magnitude and intensity as predictor variables for each of the remaining 5 countries/states to see how the models change and see if these models are better at predicting the damage.
Call:
lm(formula = Damage.Description ~ Mag + MMI.Int + MMI.Int:Mag,
data = eq_California)
Residuals:
Min 1Q Median 3Q Max
-1.0282 -0.3051 0.1806 0.4395 0.7665
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -1.3671 8.0366 -0.170 0.868
Mag 0.4518 1.2236 0.369 0.718
MMI.Int 0.6172 0.9391 0.657 0.522
Mag:MMI.Int -0.0567 0.1385 -0.409 0.689
Residual standard error: 0.5525 on 13 degrees of freedom
Multiple R-squared: 0.2822, Adjusted R-squared: 0.1166
F-statistic: 1.704 on 3 and 13 DF, p-value: 0.2153
CA_DamagevMag_and_MMI_InteractionRes <-resid(CA_DamagevMag_and_MMI_Interaction)plot(fitted(CA_DamagevMag_and_MMI_Interaction), CA_DamagevMag_and_MMI_InteractionRes, xlab ="Fitted Model", ylab ="Residuals", main ="Residuals of the Damage versus \nMagnitude and Intensity Linear Regression")abline(0,0)
Calculate the root mean square error for the multiple linear regression model.
Call:
lm(formula = Damage.Description ~ Mag + MMI.Int + MMI.Int:Mag,
data = eq_China)
Residuals:
Min 1Q Median 3Q Max
-2.23009 -0.40361 0.00789 0.75279 1.15256
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 9.6237 6.0698 1.586 0.121
Mag -1.0898 0.9624 -1.132 0.265
MMI.Int -0.8492 0.6873 -1.236 0.224
Mag:MMI.Int 0.1401 0.1051 1.333 0.191
Residual standard error: 0.8919 on 37 degrees of freedom
(4 observations deleted due to missingness)
Multiple R-squared: 0.1087, Adjusted R-squared: 0.03647
F-statistic: 1.505 on 3 and 37 DF, p-value: 0.2294
CH_DamagevMag_and_MMI_InteractionRes <-resid(CH_DamagevMag_and_MMI_Interaction)plot(fitted(CH_DamagevMag_and_MMI_Interaction), CH_DamagevMag_and_MMI_InteractionRes, xlab ="Fitted Model", ylab ="Residuals", main ="Residuals of the Damage versus \nMagnitude and Intensity Linear Regression")abline(0,0)
Calculate the root mean square error for the multiple linear regression model.
Call:
lm(formula = Damage.Description ~ Mag + MMI.Int + MMI.Int:Mag,
data = eq_India)
Residuals:
Min 1Q Median 3Q Max
-2.1941 -0.4930 0.2845 0.7623 1.1544
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -12.8879 21.0206 -0.613 0.553
Mag 2.1302 3.0234 0.705 0.497
MMI.Int 1.6509 2.3207 0.711 0.493
Mag:MMI.Int -0.2118 0.3259 -0.650 0.530
Residual standard error: 1.103 on 10 degrees of freedom
(2 observations deleted due to missingness)
Multiple R-squared: 0.152, Adjusted R-squared: -0.1024
F-statistic: 0.5975 on 3 and 10 DF, p-value: 0.631
IN_DamagevMag_and_MMI_InteractionRes <-resid(IN_DamagevMag_and_MMI_Interaction)plot(fitted(IN_DamagevMag_and_MMI_Interaction), IN_DamagevMag_and_MMI_InteractionRes, xlab ="Fitted Model", ylab ="Residuals", main ="Residuals of the Damage versus \nMagnitude and Intensity Linear Regression")abline(0,0)
Calculate the root mean square error for the multiple linear regression model.
Call:
lm(formula = Damage.Description ~ Mag + MMI.Int + MMI.Int:Mag,
data = eq_Italy)
Residuals:
Min 1Q Median 3Q Max
-1.2465 -0.7399 0.1472 0.5680 1.7685
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -2.45602 10.77497 -0.228 0.822
Mag 1.03919 1.75806 0.591 0.561
MMI.Int 0.14477 1.26599 0.114 0.910
Mag:MMI.Int -0.03399 0.19876 -0.171 0.866
Residual standard error: 0.9188 on 20 degrees of freedom
(1 observation deleted due to missingness)
Multiple R-squared: 0.2497, Adjusted R-squared: 0.1371
F-statistic: 2.218 on 3 and 20 DF, p-value: 0.1175
IT_DamagevMag_and_MMI_InteractionRes <-resid(IT_DamagevMag_and_MMI_Interaction)plot(fitted(IT_DamagevMag_and_MMI_Interaction), IT_DamagevMag_and_MMI_InteractionRes, xlab ="Fitted Model", ylab ="Residuals", main ="Residuals of the Damage versus \nMagnitude and Intensity Linear Regression")abline(0,0)
Calculate the root mean square error for the multiple linear regression model.
Call:
lm(formula = Damage.Description ~ Mag + MMI.Int + MMI.Int:Mag,
data = eq_Japan)
Residuals:
Min 1Q Median 3Q Max
-2.3497 -0.7833 0.5284 0.7683 1.3074
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -5.0180 11.2386 -0.447 0.660
Mag 1.1647 1.6152 0.721 0.479
MMI.Int 0.7571 1.5496 0.489 0.630
Mag:MMI.Int -0.1076 0.2210 -0.487 0.631
Residual standard error: 1.006 on 21 degrees of freedom
(1 observation deleted due to missingness)
Multiple R-squared: 0.08939, Adjusted R-squared: -0.04069
F-statistic: 0.6872 on 3 and 21 DF, p-value: 0.5699
JN_DamagevMag_and_MMI_InteractionRes <-resid(JN_DamagevMag_and_MMI_Interaction)plot(fitted(JN_DamagevMag_and_MMI_Interaction), JN_DamagevMag_and_MMI_InteractionRes, xlab ="Fitted Model", ylab ="Residuals", main ="Residuals of the Damage versus \nMagnitude and Intensity Linear Regression")abline(0,0)
Calculate the root mean square error for the multiple linear regression model.
Unfortunately, none of the multiple linear regressions that I ran for the five different countries had any significant p-values, so I was not able to make any comparisons about the coefficients for the magnitude and intensity between these countries. This is likely due to the small number of earthquakes that occurred in each country. However, adding the countries as a predictor variable in the multiple linear regression for the whole data set did improve the r-squared value from 0.1879 to 0.3102, the root mean square error to go down from 0.8921 to 0.7081 and the residual standard error to go down from 0.8948 to 0.8247.
Discussion
I wanted to create a model that could predict the earthquake intensity based on variables that are known at the time that the earthquake occurs so that it can be used to quickly estimate the amount of shaking and the damage the earthquake will cause. I made simple linear regression models using either the magnitude or the depth of the earthquake to predict the intensity followed by a multiple linear regression model that used both the magnitude and the depth as well as the interaction term between the two. I then created multiple k-NN models that were based on the depth and magnitude using different k values to find the best one. The best linear regression model was my multiple linear regression model which had an r-squared value of 0.2191 and a root mean square error of 1.540. It also suggested that there is a significant positive relationship between the earthquake magnitude and the earthquake intensity since the p-value for the magnitude variable was 6.61e-16 and the coefficient was 0.8403. The model did not show enough evidence of a relationship between the earthquake depth and the earthquake intensity since the p-value was not less than 0.05, which contradicts what I read that said that the depth did have an impact on the earthquake intensity (Weise 2024). The residual plot did not show an obvious pattern, so it seems like a linear model fits the data fairly well. The best k-NN model was the one with k = 6 which had an accuracy of 0.2318 and a root mean square error of 2.0147. Based on the root mean square error, it seems like the multiple linear regression model is the better model at predicting the earthquake intensity. This could be due to the data appearing to have a linear relationship (based on the residual plot) and the k-NN model is too flexible and is over-fitting to the training data. It could also be due to the fact that the k-NN model is trained using 70% of the earthquakes while the multiple linear regression model is created using all of the earthquakes. In order to improve the multiple linear regression model, it would help to be able to include information about the geologic features and the substrate of the area where the earthquake occurred since that can also impact the earthquake intensity and would likely improve the r-squared value of the model (Weise 2024). Unfortunately, the data set does not include these variables so I was unable to add them to the model.
I also wanted to create a model that could predict the damage done by an earthquake and see how closely the earthquake’s damage was based on the earthquake’s intensity to get a better idea of how well my first model could be used to predict the damage too. I started out exploring the simple linear regression models that predicted the earthquake’s damage based on either the earthquake’s magnitude, depth or intensity. Of these three linear regression models, the one that predcted the earthquake’s damage based on the earthquake’s intensity did the best with an r-squared value of 0.1713 and a root mean square error of 0.9032. The earthquake intensity term also had the lowest p-value of the three predictors and had a positive coefficient, which is to be predicted since the intensity scale includes as part of its description the amount of damage it is causing to buildings with a higher scale being given for more damage caused. I still wanted to see if I could make a model with a higher r-squared value so that it would be more accurate in predicting the damage, so I created a multiple linear regression with the magnitude, depth, intensity and the interaction terms between all of them as predictor variables. The multiple linear regression model had an r-squared value of 0.2065 and a root mean square error of 0.8798. It also showed that only the magnitude and the intensity variables had significant non-zero coefficients with a p-value below 0.05. I decided to make another multiple linear regression model based on just the magnitude, intensity and the interaction term between the two to see how it differed. The multiple linear regression that only looked at the magnitude and intensity had a slightly lower r-squared value of 0.1879 and a slightly higher root mean square error of 0.8921. The next step that I took was creating multiple linear regression models for specific countries to see how the coefficients and the significance of those coefficients of the model change depending on which country the earthquake occurred in. Since the damage the earthquake caused is also dependent on what sort of building codes are followed, then I was expecting that the relationship between the damage done and the magnitude and intensity of the earthquake would change depending on the country. To determine which countries to look at, I created a linear regression model comparing the earthquake damage and the country it occurred in as well as including the country as another predictor in the multiple linear regression model that I created earlier that used the magnitude and the intensity and used the countries that had a significant p-value and at least 10 earthquakes listed. I then ran the multiple linear regression model that used the magnitude and intensity as predictors. I did not want to use the multiple linear regression model that also included the depth to avoid having a model that was too flexible since I was already making models that were fitting the data closely by looking at specific countries. Unfortunately, all of the multiple linear regression models for the five countries I looked at had p-values for the magnitude, intensity and the interaction term that were greater than 0.05, so there was not enough evidence that any of those coefficients were non-zero and I could not make any valid comparisons between each of those models. Each of these countries likely needed more earthquakes included in the sample to show any significant p-values for the predictors. The multiple linear regression model that I made that had the magnitude, intensity and the country (as well as their interaction terms) as predictor variables, however, did perform the best out of all of the models estimating the damage done. Its r-squared value was 0.3102 and its root mean square error was 0.7081. The fact that the intensity of the earthquake in this multiple linear regression model kept a significant p-value while the magnitude no longer had a significant p-value means that there is a positive relationship between intensity of the earthquake and the damage done while the magnitude is only associated with more damage done due to the countries that experienced more damage also tending to have earthquakes with higher magnitude, but it was really the country that the earthquake occurred in that had a more significant impact on the damage experienced from the earthquake. If the data set included information about the building codes and the average age of the buildings in the area that the earthquake occurred, then I would likely be able to improve my model quite a bit more since those factors are more directly related to how susceptible the buildings are to getting damaged than what country the buildings are in.
Impact
The earthquake’s intensity is based on the fraction of people who feel the shaking of the earthquake as well as how much damage is done to the buildings. Since it requires knowing how much damage is done, a damage assessment has to be conducted first to be able to give an accurate intensity score. By creating a model that predicts an earthquake’s intensity based on the earthquake’s magnitude and depth that can be measured as the earthquake is happening, the intensity can be estimated before doing a damage assessment. Since the intensity of the earthquake is the variable that is most closely related to the damage done by an earthquake (out of the earthquake’s magnitude, depth and intensity), then it is important to be able to make an accurate prediction of the intensity quickly to know what areas are likely to experience a lot of damage and therefore have a higher risk of buildings collapsing on people. The predicted intensity of the earthquake as well as the magnitude of the earthquake and the country where the earthquake occurred could then be plugged into my multiple linear regression model to predict the damage done by the earthquake. My models’ r-squared values and root mean square values are probably not good enough to make accurate enough predictions to be actually used, but if more data about the substrate and the building conditions were added to these models, they could potentially be good enough to predict the intensity of the earthquake and the damage done by the earthquake right after the earthquake occurs. This would allow first responders can get a better idea of how much shaking there will be from the earthquake quickly and better devote resources and personel to helping the areas experiencing the most intense earthquakes to save more lives.
References
National Geophysical Data Center. “Natural Hazards Data, Images and Education.” Natural Hazards Data | NCEI, U.S. Department of Commerce, 28 July 2006, www.ngdc.noaa.gov/hazard/.
Weise, Elizabeth. “Earthquakes Happen All the Time, You Just Can’t Feel Them. A Guide to How They’re Measured.” USA Today, Gannett Satellite Information Network, 5 Dec. 2024, www.usatoday.com/story/news/nation/2024/07/29/earthquake-magnitude-intensity-guide/74593604007/.