logLik.oem | R Documentation |
log likelihood function for fitted oem objects
log likelihood function for fitted cross validation oem
objects
log likelihood function for fitted cross validation oem
objects
## S3 method for class 'oem' logLik(object, which.model = 1, ...) ## S3 method for class 'cv.oem' logLik(object, which.model = 1, ...) ## S3 method for class 'xval.oem' logLik(object, which.model = 1, ...)
object |
fitted "oem" model object. |
which.model |
If multiple penalties are fit and returned in the same |
... |
not used |
set.seed(123) n.obs <- 2000 n.vars <- 50 true.beta <- c(runif(15, -0.25, 0.25), rep(0, n.vars - 15)) x <- matrix(rnorm(n.obs * n.vars), n.obs, n.vars) y <- rnorm(n.obs, sd = 3) + x %*% true.beta fit <- oem(x = x, y = y, penalty = c("lasso", "mcp"), compute.loss = TRUE) logLik(fit) logLik(fit, which.model = "mcp") fit <- cv.oem(x = x, y = y, penalty = c("lasso", "mcp"), compute.loss = TRUE, nlambda = 25) logLik(fit) logLik(fit, which.model = "mcp") fit <- xval.oem(x = x, y = y, penalty = c("lasso", "mcp"), compute.loss = TRUE, nlambda = 25) logLik(fit) logLik(fit, which.model = "mcp")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.