R/smooth.construct.nu.smooth.spec.R

Defines functions smooth.construct.nu.smooth.spec

smooth.construct.nu.smooth.spec <-
function(object, data, knots)
{
  if(is.null(object$xt$weights))
    h <- NULL
  else
    h <- object$xt$weights
  B <- smooth.construct.ps.smooth.spec(object, data, knots)
  class(B) <- "nu.smooth"
  X <- B$X
  if(is.null(h))
    h <- rep(1, nrow(X))
  R <- NULL
  for(i in 1L:ncol(X))  {
    x <- X[,i] * h
    R <- cbind(R, x/sum(x))
  }
  B$X <- R

  return(B)
}

Try the R2BayesX package in your browser

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

R2BayesX documentation built on Dec. 5, 2017, 3:01 p.m.