Question
The file rain.txt linked below contains a data set of the average yearly rainfall at a set of 100 locations across Switzerland. There are four
The filerain.txtlinked below contains a data set of the average yearly rainfall at a set of 100 locations across Switzerland. There are four variables associated with each observation: x is the x-coordinate of the location, y is the y-coordinate of the location, rainfall is the average yearly rainfall value at the location (measured in millimeters), and altitude is the altitude of the location (in feet). Convert the altitude values to miles before answering the following questions. Note: You do not need to project the data (i.e., distances between locations can be calculated directly using the x, y coordinates given in the data set).
rain.txt
a. Construct exploratory plots showing the spatial variation in rainfall and altitude in the region. Briefly describe the spatial patterning (i.e., does there appear to be spatial dependence?) in average rainfall and altitude. Usexandyfor axis labels.
b.Fit a linear regression model of the square root of rainfall on altitude, and summarize the fitted model by reporting the estimated regression equation and the estimated error variance. What proportion of variation in the square root of rainfall is explained by altitude?
c.Calculate the Euclidean distance between all pairs of observation locations and make a relative frequency (probability) histogram of these distances. Use a binwidth of 20 miles. Do not include the distances between individual points with themselves.
d. Consider distance bins [0,20), [20,40), [40,60), [60,80), [80, 100), [100,120), [120,140), [140,160), [160,180), [180, 200), [200,220), [220,240), [240,260), [260,280), [280, 300). For each distance bin, calculate the correlation between all pairs of residuals from your fitted model corresponding to locations whose distance falls within the bin's limits. Make a scatter plot of the correlation between residuals and the center of the bins. Use color or point size to indicate the number of pairs of locations whose distance falls into each bin.
e.Explain why there are fewer pairs of locations in the longer-distance bins. (Hint: Why do you expect more pairs of locations in the [80, 100) than in the [280,300) bin even without looking at the histogram of pairwise distances?)
2.
The filerain.txtlinked below contains a data set of the average yearly rainfall at a set of 100 locations across Switzerland. There are four variables associated with each observation: x is the x-coordinate of the location, y is the y-coordinate of the location, rainfall is the average yearly rainfall value at the location (measured in millimeters), and altitude is the altitude of the location (in feet). Convert the altitude values to miles before answering the following questions. Note: You do not need to project the data (i.e., distances between locations can be calculated directly using the x, y coordinates given in the data set).
rain.txt
f.Use the likfit() function in geoR to fit a normal spatial linear regression model with an exponential covariance structure of the square-root of rainfall on altitude. Assume that the nugget effect is zero (i.e.,). Provide the numerical value of the estimated intercept (), slope (), and covariance parameters ().
g. Add the fitted exponential correlation to the plot you made in part d.
h. Report the AIC values for both the non-spatial and spatial regression models. Based on the AIC, which model do you believe better fits the data, the non-spatial or spatial regression model?
i. What information (in addition to coordinates) would you need to predict rainfall atunmonitoredlocations in the study region? (Hint: Think about why you are not able to make a plot similar to the last plot in the DEMO-kriging.R example?)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started