Title: pH of Norwegian Lakes
1pH of Norwegian Lakes
2Questions about Norwegian lake data
- Is there spatial autocorrelation in pH values?
- How can we interpolate and smooth those values?
- Is there a relationship between pH and SO4,
taking into account spatial autocorrelations in
both variables?
3Empirical variogram
- Gamma is half the average squared difference
between pairs of lakes a certain distance apart - Measures variance among sites as a function of
distance - Also called semivariogram
- File?Load module, spatial
- Spatial?Empirical variogram
- Save results
4Theoretical variogram
Gaussian function
Sill
Nugget
Range
5Different variogram models
Spherical
Exponential
Power
Linear
6Kriging
- Minimum mean-squared-error method of spatial
prediction - Interpolates and smoothes
- Named after South African mining engineer D.G.
Krige - Uses a theoretical variogram
- Have to fit and save the theoretical variogram
first - Produces a smooth surface that fits the data
7pH 1981 (spherical)
8pH vs. log(SO4)
Call lm(formula pH.1981 log.SO4.1981, data
NorwegianLakes, na.action na.exclude)Residual
s Min 1Q Median 3Q Max
-0.8395 -0.3505 -0.09316 0.469 1.091Coefficients
Value Std. Error t value
Pr(gtt) (Intercept) 5.8138 0.1848
31.4617 0.0000log.SO4.1981 -0.3987 0.1532
-2.6020 0.0129Residual standard error
0.5405 on 40 degrees of freedomMultiple
R-Squared 0.1448 F-statistic 6.77 on 1 and 40
degrees of freedom, the p-value is 0.01293
9Variogram of regression residuals
10Regression residuals (Gaussian)
11(No Transcript)
12Generalized least squares
Generalized least squares fit by REML Model
pH.1981 log.SO4.1981 Data NorwegianLakes
AIC BIC logLik 67.23832 75.68271
-28.61916 Correlation Structure Gaussian
spatial correlation Parameter estimate(s)
range nugget 3.280039 0.1515198 Coefficients
Value Std.Error t-value
p-value (Intercept) 5.003645 0.6357757 7.870142
lt.0001 log.SO4.1981 0.149088 0.2549993 0.584659
0.5621 Correlation (Intr)
log.SO4.1981 -0.522 Standardized residuals
Min Q1 Med Q3 Max
-0.7402349 -0.293257 0.1383428 0.6385882
1.628523 Residual standard error 0.9694203
Degrees of freedom 42 total 40 residual
13GLS spherical model
Correlation Structure Spherical spatial
correlation Parameter estimate(s) range
nugget 0.1004627 0.1035139 Coefficients
Value Std.Error t-value p-value
(Intercept) 5.813815 0.18479 31.46173
lt.0001 log.SO4.1981 -0.398698 0.15323 -2.60196
0.0129
14Log(SO4) (Gaussian)
15(No Transcript)