Learn R Programming

broom (version 0.4.5)

geeglm_tidiers: Tidying methods for generalized estimating equations models

Description

These methods tidy the coefficients of generalized estimating equations models of the geeglm class from functions of the geepack package.

Usage

# S3 method for geeglm
tidy(x, conf.int = FALSE, conf.level = 0.95,
  exponentiate = FALSE, quick = FALSE, ...)

Arguments

x

An object of class geeglm, such as from geeglm

conf.int

whether to include a confidence interval

conf.level

confidence level of the interval, used only if conf.int=TRUE

exponentiate

whether to exponentiate the coefficient estimates and confidence intervals (typical for log distributions)

quick

whether to compute a smaller and faster version, containing only the term and estimate columns.

...

Additional arguments to be passed to other methods. Currently not used.

Value

All tidying methods return a data.frame without rownames. The structure depends on the method chosen.

tidy.geeglm returns one row for each coefficient, with five columns:

term

The term in the linear model being estimated and tested

estimate

The estimated coefficient

std.error

The standard error from the GEE model

statistic

Wald statistic

p.value

two-sided p-value

If conf.int=TRUE, it also includes columns for conf.low and conf.high, computed with confint.geeglm (included as part of broom).

Details

If conf.int=TRUE, the confidence interval is computed with the confint.geeglm function.

While tidy is supported for "geeglm" objects, augment and glance are not.

If you have missing values in your model data, you may need to refit the model with na.action = na.exclude or deal with the missingness in the data beforehand.

Examples

Run this code
# NOT RUN {
if (require('geepack')) {
    data(state)
    ds <- data.frame(state.region, state.x77)

    geefit <- geeglm(Income ~ Frost + Murder, id = state.region,
                     data = ds, family = gaussian,
                     corstr = 'exchangeable')

    tidy(geefit)
    tidy(geefit, quick = TRUE)
    tidy(geefit, conf.int = TRUE)
}

# }

Run the code above in your browser using DataLab