bnbigw {bernor}R Documentation

Big W Matrix

Description

Evaluate the big W matrix for Monte Carlo maximum likelihood for Bernoulli regression model with normal random effects.

Usage

bnbigw(y, beta, sigma, nmiss, x, z, i, model, nbatch = 100, weigh)

Arguments

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 model function.
nbatch the number of batch means.
weigh weights. Positive integer valued vector of length ncol(y). May be missing in which case all weights one is assumed.

Details

.Random.seed must be the same as before the bnlogl calculation for this calculation to be relevant.

Value

the big W matrix

See Also

bnlogl.

Examples

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)

[Package bernor version 0.3-6 Index]