R/predict.pspline.face.r

predict.pspline.face <- function(object,argvals.new,...){
  
  #require(splines)
  stopifnot(class(object)=="pspline.face")
  
  knots <- object$knots
  p <- object$p
  B = spline.des(knots=knots, x = argvals.new, ord = p+1,outer.ok = TRUE,sparse=TRUE)$design
  return(as.vector(B%*%object$theta))
  
}

Try the face package in your browser

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

face documentation built on May 2, 2019, 6:47 a.m.