View source: R/pmrm_marginals.R
| pmrm_marginals | R Documentation |
Report the estimates and standard errors of marginal means
at each study arm and visit. The assumed visit times should have been
given in the marginals argument of the model-fitting function.
Use the type argument to choose
marginal means of the outcomes, marginal estimates of change from
baseline, and marginal estimates of treatment effects.
pmrm_marginals(fit, type = c("outcome", "change", "effect"), confidence = 0.95)
fit |
A |
type |
Character string.
|
confidence |
A numeric from 0 to 1 with the confidence level for confidence intervals. |
A tibble with one row per marginal mean and columns with the
estimate, standard error, 2-sided confidence bounds, and indicator
columns.
Some estimates, standard errors, and confidence bounds may be NA_real_
if they correspond to the reference level subtracted out in
change-from-baseline or treatment effect calculations.
Other estimates:
VarCorr.pmrm_fit(),
coef.pmrm_fit(),
tidy.pmrm_fit(),
vcov.pmrm_fit()
set.seed(0L)
simulation <- pmrm_simulate_decline_proportional(
visit_times = seq_len(5L) - 1,
gamma = c(1, 2)
)
fit <- pmrm_model_decline_proportional(
data = simulation,
outcome = "y",
time = "t",
patient = "patient",
visit = "visit",
arm = "arm",
covariates = ~ w_1 + w_2
)
pmrm_marginals(fit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.