df_md {mmrm}R Documentation

Calculation of Degrees of Freedom for Multi-Dimensional Contrast

Description

[Experimental] Calculates the estimate, standard error, degrees of freedom, t statistic and p-value for one-dimensional contrast, depending on the method used in mmrm().

Usage

df_md(object, contrast)

Arguments

object

(mmrm)
the MMRM fit.

contrast

(matrix)
numeric contrast matrix, if given a numeric then this is coerced to a row vector. Note that this should not include elements for singular coefficient estimates, i.e. only refer to the actually estimated coefficients.

Value

List with num_df, denom_df, f_stat and p_val (2-sided p-value).

Examples

object <- mmrm(
  formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
  data = fev_data
)
contrast <- matrix(data = 0, nrow = 2, ncol = length(object$beta_est))
contrast[1, 2] <- contrast[2, 3] <- 1
df_md(object, contrast)

[Package mmrm version 0.3.11 Index]