tabulate_gee {tern.gee} | R Documentation |
Tabulation of a GEE Model
Description
Functions to produce tables from a fitted GEE produced with fit_gee()
.
Usage
## S3 method for class 'tern_gee'
as.rtable(x, type = c("coef", "cov"), ...)
s_lsmeans_logistic(df, .in_ref_col)
a_lsmeans_logistic(df, .in_ref_col)
summarize_gee_logistic(
lyt,
...,
table_names = "lsmeans_logistic_summary",
.stats = NULL,
.formats = NULL,
.indent_mods = NULL,
.labels = NULL
)
Arguments
x |
( |
type |
( |
... |
additional arguments for methods. |
df |
( |
.in_ref_col |
( |
lyt |
( |
table_names |
( |
.stats |
( |
.formats |
(named |
.indent_mods |
(named |
.labels |
(named |
Value
The functions have different purposes:
-
as.rtable()
returns either the coefficient table or the covariance matrix as anrtables
object. -
s_lsmeans_logistic()
returns several least square mean statistics from the GEE. -
a_lsmeans_logistic()
is the formatted analysis function and returns the formatted statistics. -
summarize_gee_logistic()
is the analyze function and returns the modifiedrtables
layout.
Functions
-
as.rtable(tern_gee)
: Extracts the coefficient table or covariance matrix estimate from atern_gee
object. -
s_lsmeans_logistic()
: Statistics function which extracts estimates from alsmeans()
data frame based on a logistic GEE model. -
a_lsmeans_logistic()
: Formatted Analysis function which can be further customized by callingrtables::make_afun()
on it. It is used asafun
inrtables::analyze()
. -
summarize_gee_logistic()
: Analyze function for tabulating least-squares means estimates from logistic GEE least square mean results.
Examples
library(dplyr)
df <- fev_data %>%
mutate(AVAL = as.integer(fev_data$FEV1 > 30))
df_counts <- df %>%
select(USUBJID, ARMCD) %>%
unique()
lsmeans_df <- lsmeans(fit_gee(vars = vars_gee(arm = "ARMCD"), data = df))
s_lsmeans_logistic(lsmeans_df[1, ], .in_ref_col = TRUE)
s_lsmeans_logistic(lsmeans_df[2, ], .in_ref_col = FALSE)
basic_table() %>%
split_cols_by("ARMCD") %>%
add_colcounts() %>%
summarize_gee_logistic(
.in_ref_col = FALSE
) %>%
build_table(lsmeans_df, alt_counts_df = df_counts)