Learn R Programming

blendedLink (version 1.0)

pvalue.cutover: p-value of hypothesis test that the cutover of a blended link is equal to a specific value

Description

This function calculates an asymptotic chi-square likelihood ratio hypothesis test of a specified null hypothesis for the cutover.

Usage

pvalue.cutover(data, formula, link1, link2, cutover0, eps = 0.01)

Arguments

data
a data frame containing the variables in the model.
formula
an object of class formula, a symbolic description of the model to be fitted, see help(glm)
link1
Character string indicating the link function to be used up to the cutover
link2
Character string indicating the link function to be used above the cutover
cutover0
The hypothesized value of the cutover at which the link function switches smoothly from link1 to link2. Must be strictly greater than 0 and strictly less than 1.
eps
A tuning parameter. The MLE of the cutover is restricted to the range eps to (1-eps). Usually eps=0 is appropriate, but occasionally a small positive value may be needed to avoid numerical problems in the maximisation of the likelihood.

Value

The p-value of a test of the null hypothesis that cutover=cutover0.

Details

Binary regression is assumed. Not suitable when the null value is on the boundary (i.e. when cutover0 is 0 or 1).

Examples

Run this code
pvalue.cutover(y~x1+x2 , data=loglogit.example,link1="log",link2="logit",
cutover0=0.8)

Run the code above in your browser using DataLab