tabulate_gee | R Documentation |
Functions to produce tables from a fitted GEE produced with fit_gee()
.
## 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
)
x |
( |
type |
( |
... |
additional arguments for methods. |
df |
( |
.in_ref_col |
( |
lyt |
( |
table_names |
( |
.stats |
( |
.formats |
(named |
.indent_mods |
(named |
.labels |
(named |
The functions have different purposes:
as.rtable()
returns either the coefficient table or the covariance matrix as an
rtables
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 modified rtables
layout.
as.rtable(tern_gee)
: Extracts the coefficient table or covariance matrix estimate from a tern_gee
object.
s_lsmeans_logistic()
: Statistics function which extracts estimates from a
lsmeans()
data frame based on a logistic GEE model.
a_lsmeans_logistic()
: Formatted Analysis function which can be further customized by calling
rtables::make_afun()
on it. It is used as afun
in rtables::analyze()
.
summarize_gee_logistic()
: Analyze function for tabulating least-squares means estimates
from logistic GEE least square mean results.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.