MoE,dph-method {matrixdist}R Documentation

MoE method for dph Class

Description

MoE method for dph Class

Usage

## S4 method for signature 'dph'
MoE(
  x,
  formula,
  data,
  alpha_vecs = NULL,
  weight = numeric(0),
  stepsEM = 1000,
  every = 10,
  rand_init = TRUE,
  maxWts = 1000
)

Arguments

x

An object of class dph.

formula

A regression formula.

data

A data frame.

alpha_vecs

Matrix of initial probabilities.

weight

Vector of weights.

stepsEM

Number of EM steps to be performed.

every

Number of iterations between likelihood display updates.

rand_init

Random initiation in the R-step.

maxWts

Maximal number of weights in the nnet function.

Value

An object of class sph.

Examples

x <- dph(structure = "general")
n <- 100
responses <- rpois(n, 3) + 1
covariate <- data.frame(age = sample(18:65, n, replace = TRUE) / 100, income = runif(n, 0, 0.99))
f <- responses ~ age + income # regression formula
MoE(x = x, formula = f, y = responses, data = covariate, stepsEM = 20)

[Package matrixdist version 1.1.9 Index]