File: rc_boot.q

package info (click to toggle)
sm 2.0.14-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 992 kB
  • ctags: 26
  • sloc: fortran: 133; sh: 28; makefile: 13
file content (12 lines) | stat: -rw-r--r-- 416 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
provide.data(radioc)
x <- Cal.age[Cal.age>2000 & Cal.age<3000]
y <-  Rc.age[Cal.age>2000 & Cal.age<3000]
plot(x, y, xlab="Calendar.age", ylab="Radiocarbon.age",
        type="n")
model <- sm.regression(x, y, h=30, eval.points=x,
        display="none")
mhat <- model$estimate
r    <- y - mhat
r    <- r - mean(r)
for (i in 1:50) sm.regression(x, mhat + sample(r, replace=TRUE),
        h=30, add=TRUE, col=6, lty=2)