conv.test {addreg} | R Documentation |
Convergence Test Based on L2 Norm
Description
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. |
Details
This is used as the convergence test in the
addreg
fitting functions, because the EM
algorithm may converge slowly such that the test based on
the deviance used in glm.fit
(see
glm.control
) may report convergence at a
point away from the actual optimum.
Value
A logical; TRUE
if
sqrt(sum((theta1-theta2)**2))/sqrt(sum(theta1**2)) <
epsilon
, FALSE
otherwise.
Author(s)
Mark W. Donoghoe markdonoghoe@gmail.com
Examples
theta.old <- c(4,5,6)
theta.new <- c(4.05,5,6)
conv.test(theta.old, theta.new, 0.01)
conv.test(theta.old, theta.new, 0.005)
[Package addreg version 3.0 Index]