R/chooseK.R

chooseK <- function(lambda, rse, n, c){
    D <- length(rse)
    pen <- lambda*(1:D)*(c+log(n/1:D))/n
    DHat <- which.min(rse/n+pen)
    return(DHat)
}

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.