R/get_predictions_gee.R

Defines functions get_predictions_gee

get_predictions_gee <- function(model, terms, ...) {
  prdat <- stats::predict(
    model,
    type = "response",
    ...
  )

  mf <- insight::get_data(model, source = "frame", verbose = FALSE)[, terms, drop = FALSE]

  # copy predictions
  mf$predicted <- as.vector(prdat)

  # No CI
  mf$conf.low <- NA
  mf$conf.high <- NA

  unique(mf)
}

Try the ggeffects package in your browser

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

ggeffects documentation built on Sept. 12, 2024, 7:41 a.m.