bnbigw {bernor} | R Documentation |
Evaluate the big W matrix for Monte Carlo maximum likelihood for Bernoulli regression model with normal random effects.
bnbigw(y, beta, sigma, nmiss, x, z, i, model, nbatch = 100, weigh)
y |
a zero-one-valued (Bernoulli) matrix, the response. |
beta |
the fixed effect vector. |
sigma |
the scale parameter vector for the fixed effects. |
nmiss |
integer, the number of simulations of the missing data. |
x |
the model matrix for fixed effects. |
z |
the model matrix for random effects. |
i |
the index vector for random effects. |
model |
the model for the importance sampling distribution,
an object of class model produced by the |
nbatch |
the number of batch means. |
weigh |
weights. Positive integer valued vector of
length |
.Random.seed
must be the same as before the bnlogl
calculation for this calculation to be relevant.
the big W matrix
data(salam) attach(salam) beta <- c(0.91, -3.01, -0.49, 3.54) sigma <- c(1.18, 0.98) moo <- model("gauss", length(i), 1) nmiss <- 100 set.seed(42) bnlogl(y, beta, sigma, nmiss, x, z, i, moo, deriv = 3) set.seed(42) bnbigw(y, beta, sigma, nmiss, x, z, i, moo)