R/prediction_gee.R

Defines functions prediction.gee

Documented in prediction.gee

#' @rdname prediction
#' @export
prediction.gee <- function(model, calculate_se = FALSE, ...) {
    
    pred <- make_data_frame(fitted = predict(model, ...))
    pred[["se.fitted"]] <- NA_real_
    
    # variance(s) of average predictions
    vc <- NA_real_
    
    # output
    structure(pred, 
              class = c("prediction", "data.frame"),
              at = NULL,
              type = NA_character_,
              call = if ("call" %in% names(model)) model[["call"]] else NULL,
              model_class = class(model),
              row.names = seq_len(nrow(pred)),
              vcov = vc,
              jacobian = NULL,
              weighted = FALSE)
}
leeper/prediction documentation built on Jan. 1, 2020, 6:10 p.m.