Link object where the link function equals a specified link function for values of the mean up to a specified cutoff, and a smooth linear-rescaling of a different link function when the mean is above the cutoff
This function produces a blended object for a specified cutover and link functions for use in binary regression using glm or glm2.
blendedLink(link1, link2, cutover)
Character string indicating the link function to be used up to the cutover
Character string indicating the link function to be used above the 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
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.