Last chance! 50% off unlimited learning
Sale ends in
davies.test(ogg, term, k = 10,
alternative = c("two.sided", "less", "greater"))
glm
or lm
.alternative="less"
) occursdavies.test
does not work if the fitted model ogg
has been built without the argument data
.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
.set.seed(20)
z<-runif(100)
x<-rnorm(100,2)
y<-2+10*pmax(z-.5,0)+rnorm(100,0,2)
o<-lm(y~z+x)
davies.test(o,"z")
davies.test(o,"x")
Run the code above in your browser using DataLab