From 6e60465c59323d81e94d4dc1d0124f483ec5b9b9 Mon Sep 17 00:00:00 2001 From: gmelloni Date: Thu, 11 Jan 2024 14:05:51 -0500 Subject: [PATCH] Added cumincglm quasi glm class option --- R/toyexample.R | 11 +++++++++++ R/wrapper_int.R | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/R/toyexample.R b/R/toyexample.R index f09de98..03b6bd2 100644 --- a/R/toyexample.R +++ b/R/toyexample.R @@ -2,6 +2,17 @@ # Testing multiple knots # ########################## +# library(eventglm) +# library(survival) +# library(rms) +# data(cancer) +# cancer$sex <- ifelse(cancer$sex==2 , 0 , cancer$sex) +# myformula <- Surv(time, status) ~ age*sex +# cuminc <- cumincglm(myformula, data=cancer, time = 365, link = "identity", model.censoring="coxph") +# cumincINT <- intEST( var2values = 40:80 +# , model = cuminc , data = cancer , var1 ="sex", var2="age" +# , ci=TRUE , conf = 0.95 , ci.method = "delta" , R=100) +# plotINT(cumincINT) # library(rms) # library(mlbench) # data(PimaIndiansDiabetes) diff --git a/R/wrapper_int.R b/R/wrapper_int.R index 5eed451..b56ea2e 100644 --- a/R/wrapper_int.R +++ b/R/wrapper_int.R @@ -66,7 +66,7 @@ intEST <- function(var2values , model , data , var1 , var2 } } else if(any(c("Glm" , "glm") %in% modelClass)){ family <- model$family$family - if(family == "gaussian"){ + if(family %in% c("gaussian","quasi")){ if(isRCS){ argg[[1]] <- as.name("rcsLIN") } else {