R/plot.profile.brglm.R

`pairs.profile.brglm` <-
function (x, colours = 2:3, ...) 
{
    if (is.null(x$profilesBR)) {
        pairs(x$profilesML, colours = colours,
               title = "Ordinary deviance", ...)
    }
    else {
        pairs(x$profilesML, colours = colours,
               title = "Ordinary deviance", ...)
        getOption("device")()
        fit <- x$profilesBR$fit
        tt <- if (fit$pl | all(fit$family$link == "logit"))
              "Penalized deviance"
              else 
              "Modified score statistic"
        pairs(x$profilesBR, colours = colours,
               title = tt, ...)
    }
}

`plot.profile.brglm` <-
function (x, signed = FALSE, interpolate = TRUE,
          n.interpolations = 100, print.grid.points = FALSE, ...) 
{
    if (is.null(x$profilesBR)) {
        plot(x$profilesML,
             cis = NULL, signed = signed,
             interpolate = interpolate,
             n.interpolations = n.interpolations,
             print.grid.points = print.grid.points, 
             title = "Ordinary deviance", ...)
    }
    else {
        plot(x$profilesML,
             cis = NULL, signed = signed,
             interpolate = interpolate, 
             n.interpolations = n.interpolations,
             print.grid.points = print.grid.points,
             title = "Ordinary deviance", ...)
        getOption("device")()
        fit <- x$profilesBR$fit
        tt <- if (fit$pl | all(fit$family$link == "logit"))
              "Penalized deviance"
              else
              "Modified score statistic"
        plot(x$profilesBR,
             cis = NULL, signed = signed,
             interpolate = interpolate, 
             n.interpolations = n.interpolations,
             print.grid.points = print.grid.points, 
             title = tt, ...)
    }
}

Try the brglm package in your browser

Any scripts or data that you put into this service are public.

brglm documentation built on May 2, 2019, 5:20 p.m.