Description Usage Arguments Details Value Note Author(s) See Also Examples
Computes the severity of the HauckDonner effect for each regression coefficient of a VGLM regression.
1 2 3 
x, y 
Numeric vectors;

dy, ddy 
Numeric vectors;
the first and second derivatives of the Wald statistics.
They can be computed by 
allofit 
Logical. If 
severity.table 
Character vector with 7 values.
The last value is used for initialization.
Usually users should not assign anything to
arguments 
tol0 
Numeric. Any estimate whose absolute value is less than

This function is roughandready.
It is possible to use the first two derivatives obtained
from hdeff
to categorize the severity of the
the HauckDonner effect (HDE).
It is effectively assumed that, starting at the origin and
going right,
the curve is made up of a convex segment followed by
a concave segment and then the convex segment.
Midway in the concave segment the derivative is 0, and
beyond that the HDE is really manifest because the
derivative is negative.
For "none"
the estimate lies on the convex
part of the curve near the origin, hence there is no HDE at all.
For "faint"
and "weak"
the estimate lies on the
concave part of the curve but the Wald statistic is still
increasing as estimate gets away from 0, hence it is only
a mild HDE.
For "moderate"
, "strong"
and "extreme"
the Wald statistic is
decreasing as the estimate gets away from 0, hence it
really does exhibit the HDE.
It is recommended that lrt.stat
be used to compute
LRT pvalues, as they do not suffer from the HDE.
By default this function returns a labelled vector with
elements selected from
severity.table
.
If allofit = TRUE
then Yee (2018) gives details
about the other list components: a quantity called
zeta
is the normal line projected onto the xaxis,
and its first derivative gives additional
information about the position
of the estimate along the curve.
This function is likely to change in the short future because it is experimental and far from complete. Improvements are intended.
See hdeff
; Yee (2018) gives details on VGLM
HDE detection, severity measures, two tipping points (1/4 and 3/5),
parameter space partitioning into several regions, and
a bound for the HDE for 1parameter binary regression, etc.
Thomas W. Yee.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  deg < 4 # myfun is a function that approximates the HDE
myfun < function(x, deriv = 0) switch(as.character(deriv),
'0' = x^deg * exp(x),
'1' = (deg * x^(deg1)  x^deg) * exp(x),
'2' = (deg*(deg1)*x^(deg2)  2*deg*x^(deg1) + x^deg)*exp(x))
xgrid < seq(0, 10, length = 101)
ansm < hdeffsev(xgrid, myfun(xgrid), myfun(xgrid, deriv = 1),
myfun(xgrid, deriv = 2), allofit = TRUE)
digg < 4
cbind(severity = ansm$sev,
fun = round(myfun(xgrid), digg),
deriv1 = round(myfun(xgrid, deriv = 1), digg),
deriv2 = round(myfun(xgrid, deriv = 2), digg),
zderiv1 = round(1 + (myfun(xgrid, deriv = 1))^2 +
myfun(xgrid, deriv = 2) * myfun(xgrid), digg))

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.