Automatically assigns geometric-mixture values and checks that a valid modelform is used
Source:R/Utility.R
Def_modelform_fix.RdDef_modelform_fix checks and assigns default values for modelform options
Arguments
- control
list of parameters controlling the convergence, see Def_Control() for options or vignette("Control_Options")
- model_control
controls which alternative model options are used, see Def_model_control() for options and vignette("Control_Options") for further details
- modelform
string specifying the model type: M, ME, A, PA, PAE, GMIX, GMIX-R, GMIX-E
- term_n
term numbers for each element of the model
See also
Other Data Cleaning Functions:
Check_Dupe_Columns(),
Check_Trunc(),
Check_Verbose(),
Convert_Model_Eq(),
Correct_Formula_Order(),
Date_Shift(),
Def_Control(),
Def_Control_Guess(),
Def_model_control(),
Event_Count_Gen(),
Event_Time_Gen(),
Joint_Multiple_Events(),
Replace_Missing(),
Time_Since(),
factorize(),
factorize_par(),
gen_time_dep(),
interact_them()
Examples
library(data.table)
control <- list(
"ncores" = 2, "lr" = 0.75, "maxiter" = 5,
"ties" = "breslow", "double_step" = 1
)
control <- Def_Control(control)
model_control <- list("single" = TRUE)
model_control <- Def_model_control(model_control)
term_n <- c(0, 1, 1)
modelform <- "a"
val <- Def_modelform_fix(control, model_control, modelform, term_n)
model_control <- val$model_control
modelform <- val$modelform