R/ERMadjustment.R

ERMadjustment <- function(ERM, n){
    D <- length(ERM)
    ind <- (D%/%2):D
    y <- ERM[ind]/n
    var <- ind
    model <- stats::lm(y~var)
    lambda <- -model$coefficient["var"]*n
    return(lambda)
}

Try the jointseg package in your browser

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

jointseg documentation built on May 2, 2019, 6:10 a.m.