R/coef.stepmented.r

Defines functions coef.stepmented

coef.stepmented <-function(object, include.psi=TRUE, ...){
  #browser()
  b<- object$coefficients #solo coeffs lineari (senza psi)
  if(!all(match( colnames(object$psi.rounded), names(b), 0)>0)) {
    psi<- object$psi.rounded[1,]
    names(psi)<-colnames(object$psi.rounded)
    b <- c(b, psi)
  }
  if(!include.psi) {
    b[match( colnames(object$psi.rounded), names(b), 0)] <-0
  }
  b
}

Try the segmented package in your browser

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

segmented documentation built on Oct. 25, 2024, 5:07 p.m.