Skip to contents

Perform Rubin's pooling on a list of imputed generalized linear models.

Usage

dh.pool(
  imputed_glm = NULL,
  type = NULL,
  coh_names = NULL,
  family = NULL,
  exponentiate = FALSE
)

Arguments

imputed_glm

A list of imputed generalized linear models.

type

Character specifying type of object provided in model. Can be either "glm_ipd", "glm_slma" or "lmer_slma".

coh_names

Character vector of cohorts included in imputed_glm. Note this must be in the same order as the cohorts were included in the model.

family

Specifies the family used in the analysis where type is "glm_ipd" or "glm_slma". Options are "gaussian" or "binomial", with default "gaussian".

exponentiate

Optionally, specify whether estimates from binomial models should be exponentiated, ie returned as odds ratios. This argument is ignored if type is "gaussian".

Value

A tibble containing Rubin's pooled estimates and confidence intervals.

Details

This function performs Rubin's pooling on a list of imputed generalized linear models. It extracts coefficients using specified parameters, tidies the coefficients, and then performs pooling.