File: rc_boot.q

package info (click to toggle)
sm 2.2-6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,540 kB
  • sloc: f90: 259; ansic: 21; makefile: 2
file content (13 lines) | stat: -rw-r--r-- 413 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
with(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)
})