Hello I'm using function gam from package mgcv to fit splines. When I try to make a prediction slightly beyond the original 'x' range, I get this error:
> A = runif(50,1,149) > B = sqrt(A) + rnorm(50) > range(A) [1] 3.289136 145.342961 > > > fit1 = gam(B ~ s(A, bs="ps"), outer.ok=TRUE) > predict(fit1, newdata=data.frame(A=149.9), outer.ok=TRUE) Error in splineDesign(knots, x, ord, derivs, outer.ok = outer.ok) : the 'x' data must be in the range 3.14708 to 145.485 unless you set 'outer.ok = TRUE' > I've inserted the argument 'outer.ok=TRUE' as you can see, but it hasn't helped. How can I obtain this prediction? Thanks, Philip Gautier Dept. of Mathematics and Statistics American University, Washington, DC ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.