R/penalty.nom.R

Defines functions penalty.nom

Documented in penalty.nom

penalty.nom <- 
  function(x, K = NULL){
    # Nominal Smoothing Spline Penalty
    # Nathaniel E. Helwig (helwig@umn.edu)
    # Update: 2021-04-09
    
    if(is.null(K)) K <- length(unique(x))
    outer(x, x, FUN = "==") - 1/K
    
  }

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.