log likelihood function for fitted vennLasso objects

# S3 method for vennLasso
logLik(object, ...)

Arguments

object

fitted "vennLasso" model object.

...

not used

Examples

library(Matrix) set.seed(123) n.obs <- 200 n.vars <- 50 true.beta.mat <- array(NA, dim = c(3, n.vars)) true.beta.mat[1,] <- c(-0.5, -1, 0, 0, 2, rep(0, n.vars - 5)) true.beta.mat[2,] <- c(0.5, 0.5, -0.5, -0.5, 1, -1, rep(0, n.vars - 6)) true.beta.mat[3,] <- c(0, 0, 1, 1, -1, rep(0, n.vars - 5)) rownames(true.beta.mat) <- c("1,0", "1,1", "0,1") true.beta <- as.vector(t(true.beta.mat)) x.sub1 <- matrix(rnorm(n.obs * n.vars), n.obs, n.vars) x.sub2 <- matrix(rnorm(n.obs * n.vars), n.obs, n.vars) x.sub3 <- matrix(rnorm(n.obs * n.vars), n.obs, n.vars) x <- as.matrix(rbind(x.sub1, x.sub2, x.sub3)) conditions <- as.matrix(cbind(c(rep(1, 2 * n.obs), rep(0, n.obs)), c(rep(0, n.obs), rep(1, 2 * n.obs)))) y <- rnorm(n.obs * 3, sd = 3) + drop(as.matrix(bdiag(x.sub1, x.sub2, x.sub3)) %*% true.beta) fit <- vennLasso(x = x, y = y, groups = conditions) logLik(fit)
#> [1] -1623.132 -1623.132 -1623.132 -1623.132 -1623.132 -1623.132 -1623.132 #> [8] -1623.132 -1623.136 -1623.135 -1623.134 -1616.206 -1609.312 -1603.395 #> [15] -1598.349 -1594.067 -1588.921 -1582.909 -1574.806 -1567.636 -1560.037 #> [22] -1551.775 -1543.933 -1537.018 -1530.888 -1525.003 -1519.904 -1515.154 #> [29] -1510.140 -1504.955 -1498.696 -1492.489 -1486.951 -1481.300 -1475.878 #> [36] -1470.397 -1465.155 -1460.363 -1456.094 -1452.064 -1448.435 -1445.239 #> [43] -1442.486 -1440.122 -1438.086 -1436.281 -1434.673 -1433.227 -1431.973 #> [50] -1430.902 -1429.990 -1429.206 -1428.541 -1427.979 -1427.500 -1427.095 #> [57] -1426.754 -1426.468 -1426.228 -1426.023 -1425.852 -1425.708 -1425.588 #> [64] -1425.488 -1425.404 -1425.335 -1425.276 -1425.228 -1425.188 -1425.154 #> [71] -1425.126 -1425.103 -1425.083 -1425.067 -1425.054 -1425.042 -1425.033 #> [78] -1425.025 -1425.018 -1425.013 -1425.008 -1425.004 -1425.001 -1424.999 #> [85] -1424.997 -1424.995 -1424.993 -1424.992 -1424.991 -1424.990 -1424.990 #> [92] -1424.989 -1424.988 -1424.988 -1424.988 -1424.987 -1424.987 -1424.987 #> [99] -1424.987 -1424.987