R/bs.design.R

Defines functions bs.design

Documented in bs.design

bs.design <-
function(x,nk,degree){
    xl= min(x)-0.00001
    xr = max(x)+0.00001
    dx = (xr-xl)/(nk-1)
    knots = seq(xl- degree*dx,xr+degree*dx,by=dx )
    bs = spline.des(knots,x,degree+1)$design
    return(bs)
  }

Try the bshazard package in your browser

Any scripts or data that you put into this service are public.

bshazard documentation built on May 2, 2019, 5:58 a.m.