as.OP.hglm_model | R Documentation |
Convert an object of class "hglm_model"
into a ROI optimization problem (OP
).
## S3 method for class 'hglm_model'
as.OP(x)
x |
an object inheriting from |
This function is mainly for internal use and advanced users which want of
alter the model object or the underlying optimization problem.
This function converts the model object created by hglm_model
into a conic optimization problem solveable via ROI_solve
.
A ROI object of class "OP"
.
dat <- rhglm(100, c(1, 2, -3, 4, 5, -6))
# Use hglm with option dry_run
model <- hglm(y ~ ., data = dat, dry_run = TRUE)
op <- as.OP(model)
# User hglm_model
x <- model.matrix(y ~ ., data = dat)
model <- hglm_model(x, dat[["y"]])
op <- as.OP(model)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.