Description Usage Arguments Details Value Examples

This function produces a blended object for a specified cutover and link functions for use in binary regression using glm or glm2.

1 | ```
blendedLink(link1, link2, cutover)
``` |

`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 |

`cutover` |
The link function switches smoothly from link1 to link2 |

This function returns a link function which which equals link function link1 for values of the fitted probability below cutover. When the fitted probability is greater than cutover, a linearly scaled user-specified linkis used. The linear scaling is such that the new link is smooth (link and first derivative both continuous). The main use of the function is to use an easily interpretable link in binary regression up to a cutoff (e.g. log), and a more traditional link which asymptotes to 1 above the cutoff (e.g. logit). The advantage is that the exponentiated regression coefficients can be interpreted as relative risks for individuals whose probability is up to cutover both with and without the risk factor. In practice this is usually the great majority of cases. The function is not normally called directly. Instead, glm or glm2 should be used (preferably the latter to avoid fitting problems), as per the example below.

An object of class "link-glm", with link name "blended".

1 2 3 | ```
example.binary.regression <- glm(y~x1+x2 , data=loglogit.example,
family = binomial(link=blendedLink("log","logit",0.8)))
summary(example.binary.regression)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.