Skip to contents

Def_model_control checks and assigns default values for modelform options

Usage

Def_modelform_fix(control, model_control, modelform, term_n)

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

Value

returns a filled list

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