Description Usage Arguments Details Value See Also Examples
fit multivariate Bernoulli mixed-effects model using Laplacian approximation.
1 2 | mvbme(x, y, z, maxOrder = 2,
output = 0, printIter = 100)
|
x |
input design matrix. |
y |
output binary matrix with number of columns equal to the number of outcomes per observation. |
z |
random effect design matrix. |
maxOrder |
maximum order of interactions to be considered in outcomes. |
output |
with values 0 or 1, indicating whether the fitting process is muted or not. |
printIter |
Number of iterations to be printed if output is true. |
The mvbme
utilize the class structure of the underlying C++
code and fitted the model with Laplacian approximation.
An object of class mvbfit
, for which some methods are
available.
mvblps
, unifit
, stepfit
, mvb.simu
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.