


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Material Type: Notes; Professor: Oliveira; Class: SP-STA: Clinical Trials; Subject: Statistics; University: University of Texas - San Antonio; Term: Unknown 1989;
Typology: Study notes
1 / 4
This page cannot be seen from the preview
Don't miss anything!
This handout illustrates some methods for model selection: AIC, BIC and cross validation.
Cross Validation.
Consider again the spatial rainfall data set “darwinw.dat”. We entertain four models for this data set. The models have all a constant mean function and no nugget, but they differ in the semivariogram function:
Model 1: Power exponential model with θ 2 = 1 (kappa in geoR) ; Model 2: Power exponential model with θ 2 = 1.5 ; Model 3: Mat´ern model with θ 2 = 1 ; Model 4: Rational quadratic with θ 2 = 2 ;
library(geoR)
darwin.wls1 <- variofit(darwin.mom9, cov.model = "exp", ini = c(800,10),
darwin.wls4 <- variofit(darwin.mom9, cov.model = "powered.exp", ini = c(800,10),
darwin.wls5 <- variofit(darwin.mom9, cov.model = "matern", ini = c(100,5),
darwin.wls6 <- variofit(darwin.mom9, cov.model = "cauchy", ini = c(100,1),
darwin.wls1$value ; darwin.wls4$value ; darwin.wls5$value ; darwin.wls6$value [1] 7. [1] 4. [1] 4. [1] 3.
plot(darwin.mom9, xlab = "distance (km)", ylab = "semivariogram (mm^2)",
lines(darwin.wls1) lines(darwin.wls4, lty = 2) lines(darwin.wls5, lty = 3) lines(darwin.wls6, lty = 4) legend(1,400,c("model", "power exp. theta_2 = 1", "power exp. theta_2 = 1.5",
dev.print(file = "fig7.1.ps")
0 2 4 6 8 10
0
100
200
300
400
Several models fitted to the darwin data by WLS
distance (km)
semivariogram (mm^2)
modelpower exp. theta_2 = 1 power exp. theta_2 = 1.5matern theta_2 = 1 rational quadratic theta_2 = 2
Figure 1:
mean(darwin.cv1$error^2) ; mean(darwin.cv4$error^2) [1] 47. [1] 48. mean(darwin.cv5$error^2) ; mean(darwin.cv6$error^2) [1] 48. [1] 60.
datalook.f(cbind(darwin.gdat$coords, round(darwin.cv1$std.error, 2)),
dev.print(file = "file = fig7.2.ps")
mean(darwin.cv1$error) [1] 0.
2 4 6 8 10
2
4
6
8
10
Standardized prediction residuals in Darwin using model 1
x−coord.
y−coord.
−0.71 0.
−1. 0.11 −0.
0.89 0.
−0.
0.87 −0.39 −0.
−0.79 (^) 0.25 −0.
2.1 0. −0.58 −0.
−1.
−0. −0.
0.2 0.
Figure 2: