R/marginal.prodlim.R

Defines functions marginal.formula marginal.prodlim marginal.default marginal

marginal <- function(object){
  UseMethod("marginal",object)
}

marginal.default <- function(object){
  ff <- object$call$formula
  dd <- eval(object$call$data)
  fff <- update(ff,".~1")
  prodlim::prodlim(fff,data=dd)
}


marginal.prodlim <- function(object){
  cc <- object$call
  ff <- cc$formula
  cc$formula <- update(ff,".~1")
  eval(cc)
}

marginal.formula <- function(object){
    update(object,".~1")
}

Try the pec package in your browser

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

pec documentation built on April 11, 2023, 5:55 p.m.