formula <- y ~ -1 + x1 + x2 + x3
the$k <- 2
stv <- setNames(c(0.2,0,1,1,1),c(colnames(simulated_data_norm)[3:5],c("sigma","theta")))
x <- model.matrix(formula,simulated_data_norm)
y <- simulated_data_norm$y
w <- 1
model <- FLXMRhyreg(formula = formula,
family=c("hyreg"),
type = simulated_data_norm$type,
stv = stv,
type_cont = "TTO",
type_dich = "DCE_A",
opt_method = "L-BFGS-B",
control = list(iter.max = 1000, verbose = 4),
offset = NULL,
optimizer = "optim",
variables_both = names(stv)[!is.element(names(stv),c("sigma","theta"))],
variables_cont = NULL,
variables_dich = NULL,
lower = -Inf,
upper = Inf,
)
Run the code above in your browser using DataLab