Convert an object of class "hglm_model" into a ROI optimization problem (OP).
## S3 method for class 'hglm_model'as.OP(x)
Arguments
x: an object inheriting from "hglm_model".
Returns
A ROI object of class "OP".
Details
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.
Examples
dat <- rhglm(100, c(1,2,-3,4,5,-6))# Use hglm with option dry_runmodel <- hglm(y ~ ., data = dat, dry_run =TRUE)op <- as.OP(model)# User hglm_modelx <- model.matrix(y ~ ., data = dat)model <- hglm_model(x, dat[["y"]])op <- as.OP(model)