R/basis.R

Defines functions basis

### Construct a sieve space of nonlinear trajectory
### KNOTS: use every 100/(Kn+1)th quantiles of observed Y measuring time;
basis <- 
function(nl.fixed, degree=3, n.knots=3,bdr){
  bsq= (1:n.knots)/(n.knots+1);      
  inner.knots= quantile(nl.fixed, prob=bsq)
  bs(nl.fixed,degree,inner.knots,intercept=TRUE,Boundary.knots=bdr)
}

Try the JointModel package in your browser

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

JointModel documentation built on May 2, 2019, 12:40 p.m.