splinetrials_subgroup_analysis object
Source: R/ncs_analysis_subgroup.R
splinetrials_subgroup_analysis-class.Rdncs_analysis_subgroup() returns an object of class
splinetrials_subgroup_analysis: a named list with three to seven elements.
between and within
These are each tibbles, and they share many of the same
columns and values but are sorted in a different order. Each contains one row
per unique combination of arm, time_scheduled_label, and subgroup found
in the data (see the arguments of ncs_analysis_subgroup()). The values
in columns arm through change_p_value as well as correlation and
optimizer are identical. The two tables' treatment effect analysis results
columns differ in name and content, with between's columns bearing the
prefix diff_subgroup_ and within's columns bearing the prefix diff_arm_
(see the Treatment effects section of ncs_analysis_subgroup()).
Lastly, only within contains the percent slowing analysis results.
between
A 30-column tibble sorted by time, then by arm, then
by subgroup.
Columns:
arm: values ofdata[[arm]].time: values ofdata[[time_scheduled_label]].subgroup: values ofdata[[subgroup]].n: number of times the combination appears in data.est: mean ofdata[[response]].sd: standard deviation ofdata[[response]].se: standard error ofdata[[response]](i.e.,sd / sqrt(n)).lower: lower bound of confidence interval.upper: upper bound of confidence interval.response_est: estimated marginal mean.response_se: standard error ofresponse_est.response_df: degrees of freedom used to calculate the confidence interval forresponse_est.response_lower: lower bound of confidence interval forresponse_est.response_upper: upper bound of confidence interval forresponse_est.change_est: estimated change from baseline.change_se: standard error ofchange_est.change_df: degrees of freedom used for calculating the confidence interval for and testing the significance ofchange_est.change_lower: lower bound of confidence interval forchange_est.change_upper: upper bound of confidence interval forchange_est.change_test_statistic: test statistic measuring the significance ofchange_est.change_p_value: p-value for the significance ofchange_est.diff_subgroup_est: treatment effect ofsubgroupwithinarm.diff_subgroup_se: standard error ofdiff_subgroup_est.diff_subgroup_df: degrees of freedom used for calculating the confidence interval for and testing the significance ofdiff_subgroup_est.diff_subgroup_lower: lower bound of confidence interval fordiff_subgroup_est.diff_subgroup_upper: upper bound of confidence interval fordiff_subgroup_est.diff_subgroup_test_statistic: test statistic measuring the significance ofdiff_subgroup_est.diff_subgroup_p_value: p-value for the significance ofdiff_subgroup_est.correlation: the covariance structure of the analysis model. This is the same value repeated for each row.optimizer: invariablymmrm+tmbto indicate thatmmrm::mmrm()(which uses theTMBpackage) was used to fit the model.
within
A 33-column tibble sorted by subgroup, then by arm,
then by time.
Columns:
arm: values ofdata[[arm]].time: values ofdata[[time_scheduled_label]].subgroup: values ofdata[[subgroup]].n: number of times the combination appears in data.est: mean ofdata[[response]].sd: standard deviation ofdata[[response]].se: standard error ofdata[[response]](i.e.,sd / sqrt(n)).lower: lower bound of confidence interval.upper: upper bound of confidence interval.response_est: estimated marginal mean.response_se: standard error ofresponse_est.response_df: degrees of freedom used for calculating the confidence interval forresponse_est.response_lower: lower bound of confidence interval forresponse_est.response_upper: upper bound of confidence interval forresponse_est.change_est: estimated change from baseline.change_se: standard error ofchange_est.change_df: degrees of freedom for calculating the confidence interval for and estimating the significance ofchange_est.change_lower: lower bound of confidence interval forchange_est.change_upper: upper bound of confidence interval forchange_est.change_test_statistic: test statistic measuring the significance ofchange_est.change_p_value: p-value for the significance ofchange_est.diff_arm_est: treatment effect ofarmwithinsubgroup.diff_arm_se: standard error ofdiff_arm_est.diff_arm_df: degrees of freedom for calculating the confidence interval for and testing the significance ofdiff_arm_est.diff_arm_lower: lower bound of confidence interval fordiff_arm_est.diff_arm_upper: upper bound of confidence interval fordiff_arm_est.diff_arm_test_statistic: test statistic measuring the significance ofdiff_arm_est.diff_arm_p_value: p-value for the significance ofdiff_arm_est.percent_slowing_est: estimated percent slowing.percent_slowing_lower: lower bound of confidence interval forpercent_slowing_est.percent_slowing_upper: upper bound of confidence interval forpercent_slowing_est.correlation: the covariance structure of the analysis model. This is the same value repeated for each row.optimizer: invariablymmrm+tmbto indicate thatmmrm::mmrm()(which uses theTMBpackage) was used to fit the model.
type3
A tibble with a row for each term in the model (not
counting any intercepts). Contains the following six columns:
effect: the name of the model term.chisquare_test_statistic: the Chi-squared test statistic measuring the significance of the model term.df: the degrees of freedom used for testing the significance of the model term.p_value: the p-value for the significance of the model term.correlation: the covariance structure of the analysis model. This is the same value repeated for each row.optimizer: invariablymmrm+tmbto indicate thatmmrm::mmrm()(which uses theTMBpackage) was used to fit the model.
interaction
This element is only present if subgroup_interaction_test = TRUE.
A 2 by 10 data frame with class anova.mmrm. The first row represents the
"reduced" model and the second row represents the "full" model. The columns
are as follows:
model:c("reduced model", "full model"), identifying the model associated with each row.aic: the AIC of the model.bic: the BIC of the model.loglik: the log likelihood of the model.-2*log(l): equal to-2 * loglik.test_statistic: the test statistic used for testing the significance of the second-order interaction term(s) between the spline time,subgroup, andarm. This value is the second element of the column; the first element is always a missing value.df: the degrees of freedom used for testing the significance of the second-order interaction term(s) between the spline term,subgroup, andarm. This value is the second element of the column; the first element is always a missing value.p_value: the p-value for the significance of the second-order interaction term(s) between the spline term,subgroup, andarm. This value is the second element of the column; the first element is always a missing value.correlation: the covariance structure of the analysis model. This is the same value repeated for each row.optimizer: invariablymmrm+tmbto indicate thatmmrm::mmrm()(which uses theTMBpackage) was used to fit the model.
analysis_model
This element is only present if return_models = TRUE.
An mmrm object: the fitted model used to perform analyses
that produced the between, within, and type3 results.
full and reduced
These elements are only present if subgroup_interaction_test = TRUE and
return_models = TRUE.
Both are mmrm objects: the two maximum-likelihood-estimated
models used to perform the subgroup interaction test whose results are in the
interaction element. See the Subgroup interaction test section of
ncs_analysis_subgroup().
See also
The function ncs_analysis_subgroup(), which produces objects of
this class.