R/plot.ss.R

Defines functions plot.ss

Documented in plot.ss

plot.ss <-
  function(x, n = 201, ci = TRUE, xseq = NULL, ...){
    if(is.null(xseq)) {
      xseq <- seq(x$fit$min, x$fit$min + x$fit$range, length.out = n)
    }
    df <- x$df
    x <- predict(object = x, x = xseq)
    if(!ci) x$se <- 0
    if(!any(names(list(...)) == "main")){
      main <- paste0("Smoothing Spline (df = ", round(df,2),")")
      plotci(x, main = main, ...)
    } else {
      plotci(x, ...)
    }
  }

Try the npreg package in your browser

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

npreg documentation built on July 21, 2022, 1:06 a.m.