Description Details Author(s) Examples
Functionality for multivairate Bernoulli distribution including log-linear models, lasso variable selection and mixed effects models.
Package: | MVB |
Type: | Package |
Version: | 1.0 |
Date: | 2012-03-21 |
License: | GPL (>=2) |
Bin Dai <daibin at stat dot wisc dot edu>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # fit a simple MVB log-linear model
n <- 1000
p <- 5
kk <- 2
tt <- NULL
alter <- 1
for (i in 1:kk) {
vec <- rep(0, p)
vec[i] <- alter
alter <- alter * (-1)
tt <- cbind(tt, vec)
}
tt <- 1.5 * tt
tt <- cbind(tt, c(rep(0, p - 1), 1))
x <- matrix(rnorm(n * p, 0, 4), n, p)
res <- mvb.simu(tt, x, K = kk, rep(.5, 2))
fitMVB <- mvbfit(x, res$response, output = 1)
|
Loading required package: Rcpp
Loading required package: RcppArmadillo
fit started
iteration 0 gpnorm = 2.47016
iteration 8 gpnorm = 2.26266e-08
*** Converged ***
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.