Defines functions getNullModel

getNullModel <- function(formula,data,response.type){
    nullform <- stats::reformulate("1",response=formula[[2]])
    nullfit <- switch(response.type,
                          list("Null model"=stats::glm(nullform,data,family="binomial"))
                          stop("FIXME: Need to adapt a function for the empirical distribution function or glm.")
                          list("Null model"=prodlim::prodlim(nullform,data))
                          list("Null model"=prodlim::prodlim(nullform,data))
    nullfit[[1]]$call$data <- NULL
    nullfit[[1]]$formula <- NULL

Try the riskRegression package in your browser

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

riskRegression documentation built on Jan. 13, 2021, 11:12 a.m.