Re: [R] spline basis

2015-06-22 Thread David Winsemius
On Jun 22, 2015, at 1:09 PM, Glenn Schultz wrote: > I have the following code which creates a spline function > > x <- c(1, 12, 24, 36, 60, 120, 200, 240, 300, 360) > y <- c(.2, 8, 8, 8, 8, 8, 8, 8, 18, 50) > > > Baseline <- cbind(x,y) > Turnover <- splinefun(Baseline[,1], Baseline[,2], method

[R] spline basis

2015-06-22 Thread Glenn Schultz
I have the following code which creates a spline function x <- c(1, 12, 24, 36, 60, 120, 200, 240, 300, 360) y <- c(.2, 8, 8, 8, 8, 8, 8, 8, 18, 50) Baseline <- cbind(x,y) Turnover <- splinefun(Baseline[,1], Baseline[,2], method = "natural") plot(Turnover(seq(1, 360, 1)), type = "l") If I chan