logLik.oem {oem} | R Documentation |
log likelihood function for fitted oem objects
Description
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
Usage
## 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, ...)
Arguments
object |
fitted "oem" model object. |
which.model |
If multiple penalties are fit and returned in the same |
... |
not used |
Examples
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")
[Package oem version 2.0.11 Index]