Given a generalized linear model, the Davies' test can be employed to test for a non-constant regression parameter
in the linear predictor.
Usage
davies.test(ogg, term, k = 10,
alternative = c("two.sided", "less", "greater"))
Arguments
ogg
a fitted model returned by glm or lm.
term
a character string to mean the segmented variable being tested.
k
number of points where the test should be evaluated. See details.
alternative
a character string specifying the alternative hypothesis.
Value
A list with class 'htest' containing the following components:
methodtitle (character)
data.namethe regression model and the segmented variable being tested
statisticthe point at which the maximum (or the minimum if alternative="less") occurs
parameternumber of evaluation points
p.valuethe adjusted p-value
Warning
Currently davies.test does not work if the fitted model ogg
has been built without the argument data.
Details
davies.test tests for a non zero difference-in-slope parameter of a segmented
relationship. Roughtly speaking, the procedure computes k `naive' (i.e. assuming
fixed and known the breakpoint) Wald statistics for the difference-in-slope,
seeks the `best' value (according to the alternative hypothesis), and then corrects the selected
(minimum) p-value. The k evaluation points are the quantiles of the variable term.
References
Davies, R.B. (1987) Hypothesis testing when a nuisance parameter is present only under the alternative.
Biometrika74, 33--43.