# NOT RUN {
# }
# NOT RUN {
set.seed(1)
x <- rep(1:300, each=5)
a <- 8; b <- 0.05; c <- -1e-4
y <- (a + b * x + c *x^2) * (x <= -0.5*b/c) + (a + -b^2/(4 * c)) * (x > -0.5 * b/c) +
rnorm(length(x), sd=0.1)
d <- cbind(x,y)
ans <- f.quad.plateau(d, start=list(a = 7, b = 0.02, c = 1e-5),
plus_minus=10, n.start=10, msg=FALSE)
boot.resid.quad.plateau(ans, d, x.range=seq(0,280,by=40),
B=1e1-1, plus_minus = 1e2, n.start=1000, print.progress=TRUE) # use larger B for inference
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab