$$ \begin{aligned} \text{Surv(interval, event) ~ name + ... + factor(name)} \\ \text{'Survival(interval, event) ~ subterm(name, factor(name), term_number) + ... + term_model()'} \end{aligned} $$
The factor option can be used with or without a baseline specified. By default, no baseline is used. A baseline can be added by changing 'factor(name)' to 'factor(name;baseline=level)'. If a valid baseline is used, the proper factor will not be included in the model expression or the final datatable returned. If an invalid baseline is used a warning is thrown and no baseline is used. The following expressions are equivalent. ```{r} term_n <- c(0, 0, 1) tform <- c("loglin", "loglin", "lin") names <- c("dose0", "dose1", "dose2") modelform <- "M" tstart <- "t0" tend <- "t1" event <- "lung" Model_Eq <- "cox(t0, t1, lung) ~ loglinear(dose0, dose1, 0) + linear(dose2, 1) + multiplicative()" Model_Eq <- "cox(t0, t1, lung) ~ loglinear(dose0, dose1) + linear(dose2, 1)" df <- data.table("dose0" = 1:4, "dose1" = 2:5, "dose2" = 3:6) Convert_Model_Eq(Model_Eq, df) ``` Different model formulas and subterm types are being added as needed. Please contact the developer if the methods you want to use have not yet been added. The following tables cover the subterms and term models that are currently implemented. Every option listed has multiple equivalent aliases that all refer to the same subterm or model formula. | Subterm Type | Equivalent Aliases | | :---------: | :----------: | | plin | "plin", "plinear", "product-linear" | | lin | "lin", "linear" | | loglin | "loglin", "loglinear", "log-linear" | | loglin_slope/loglin_top | "loglin-dose", "loglinear-dose", "log-linear-dose" | | lin_slope/lin_top | "lin-dose", "linear-dose", "linear-piecewise" | | quad_slope | "quadratic", "quad", "quad-dose", "quadratic-dose" | | step_slope/step_int | "step-dose", "step-piecewise" | | lin_quad_slope/lin_quad_int | "lin-quad-dose", "linear-quadratic-dose", "linear-quadratic-piecewise" | | lin_exp_slope/lin_exp_int/lin_exp_exp_slope | "lin-exp-dose", "linear-exponential-dose", "linear-exponential-piecewise" | | Term Type | Equivalent Aliases | | :---------: | :----------: | | M | "m", "me", "multiplicative", "multiplicative-excess" | | A | "a", "additive" | | PA | "pa", "product-additive" | | PAE | "pae", "product-additive-excess" | | GMIX | "gmix","geometric-mixture" | | GMIX-R | "gmix-r","relative-geometric-mixture" | | GMIX-E | "gmix-e","excess-geometric-mixture" |RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4