You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (tempcall$family=="binomial") {if(!(tempcall$link%in% c("logit", "probit", "cauchit", "log", "cloglog"))) stop("No valid link function specified for family = binomial (\"logit\", \"probit\", \"cauchit\", \"log\", \"cloglog\")")}
22
-
if (tempcall$family=="ordinal" ) {if(!(tempcall$link%in% c("logit", "probit", "cauchit", "cloglog"))) stop("No valid link function specified for family = binomial (\"logit\", \"probit\", \"cauchit\", \"cloglog\")")}
22
+
if (tempcall$family=="ordinal" ) {if(!(tempcall$link%in% c("logit", "probit", "cauchit", "cloglog"))) stop("No valid link function specified for family = ordinal (\"logit\", \"probit\", \"cauchit\", \"cloglog\")")}
23
23
if (!("denominator"%in% names(tempcall))) stop("No denominator model specified")
24
24
if (!is.null(tempcall$numerator) &!is(eval(tempcall$numerator), "formula")) stop("Invalid numerator formula specified")
25
25
if (!is.null(tempcall$denominator) &!is(eval(tempcall$denominator), "formula")) stop("Invalid denominator formula specified")
26
26
if (!("id"%in% names(tempcall))) stop("No patient id specified")
27
27
if (tempcall$family=="survival"&!("tstart"%in% names(tempcall))) stop("No tstart specified, is necessary for family = \"survival\"")
28
28
if (!("timevar"%in% names(tempcall))) stop("No timevar specified")
29
29
if (!("type"%in% names(tempcall))) stop("No type specified (\"first\" or \"all\")")
30
-
if (!(tempcall$type%in% c("first", "all"))) stop("No type specified (\"first\"or \"all\")")
30
+
if (!(tempcall$type%in% c("first", "all", "cens"))) stop("No type specified (\"first\", \"all\"or \"cens\")")
31
31
if (tempcall$family%in% c("survival", "multinomial", "ordinal") &tempcall$type=="all") stop(paste("Type \"all\" not yet implemented for family = ", deparse(tempcall$family, width.cutoff=500), sep=""))
32
+
if (tempcall$family%in% c("multinomial", "ordinal", "gaussian") &tempcall$type=="cens") stop(paste("Type \"cens\" not yet implemented for family = ", deparse(tempcall$family, width.cutoff=500), sep=""))
32
33
if (tempcall$family%in% c("gaussian") &tempcall$type=="first") stop(paste("Type \"first\" not implemented for family = ", deparse(tempcall$family, width.cutoff=500), sep=""))
33
34
if (tempcall$family%in% c("gaussian") &!("numerator"%in% names(tempcall))) stop("Numerator necessary for family = \"gaussian\"")
34
35
if (!("data"%in% names(tempcall))) stop("No data specified")
@@ -51,17 +52,17 @@ ipwtm <- function(
51
52
exposure=data[,as.character(tempcall$exposure)]
52
53
)
53
54
#make selection variable, time points up to first switch from lowest value, or all time points
54
-
if (type=="first"& (family=="binomial"|family=="survival"))
55
+
if (type%in% c("first", "cens")& (family=="binomial"|family=="survival"))
0 commit comments