R/biweight.R

biweight <- function(ty,M,c){
  if (ty<=c){
    w <- 0
  } else if (ty>c & ty<M){
    w <- (1-((ty-M)/(c-M))^2)^2
  } else if (ty>=M){
    w <- 1
  }
}

Try the sprm package in your browser

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

sprm documentation built on May 2, 2019, 9:57 a.m.