Performs a test of convergence based on the L2 norm of
the change in the parameter estimates.
Usage
conv.test(theta1, theta2, epsilon)
Arguments
theta1
vector of parameter estimates at previous
step.
theta2
vector of parameter estimates at current
step.
epsilon
positive convergence tolerance.
Value
A logical; TRUE if
sqrt(sum((theta1-theta2)**2))/sqrt(sum(theta1**2)) <
epsilon; FALSE otherwise.
Details
This is used as the convergence test in the
logbin fitting functions: it is passed as
convfn.user to turboem.
It is used instead of a test based on deviance (such as
that applied in glm.fit), which may report
convergence at a point away from the actual optimum when
the EM algorithm converges slowly.