MoE method for bivdph Class
# S4 method for bivdph
MoE(
x,
formula,
y,
data,
alpha_vecs = NULL,
weight = numeric(0),
stepsEM = 1000,
every = 10,
rand_init = TRUE
)
An object of class sph.
An object of class bivdph.
A regression formula.
A matrix of observations.
A data frame of covariates.
Matrix of initial probabilities.
Vector of weights.
Number of EM steps to be performed.
Number of iterations between likelihood display updates.
Random initiation in the R-step.
x <- bivdph(dimensions = c(3, 3))
n <- 100
responses <- cbind(rpois(n, 3) + 1, rbinom(n, 5, 0.5))
covariates <- data.frame(age = sample(18:65, n, replace = TRUE) / 100, income = runif(n, 0, 0.99))
f <- responses ~ age + income
MoE(x = x, formula = f, y = responses, data = covariates, stepsEM = 20)
Run the code above in your browser using DataLab