From 7a56ab7ab7a290cfb2340c09e2aae0bf061dcde9 Mon Sep 17 00:00:00 2001 From: danielinteractive Date: Sat, 9 Nov 2024 09:17:59 +0000 Subject: [PATCH] [actions skip] Built site for mmrm@108618ed18923a436e5f28c44ea6ac9f97743d9c --- latest-tag/404.html | 16 +- latest-tag/CONTRIBUTING.html | 323 +++++++++++------ latest-tag/PULL_REQUEST_TEMPLATE.html | 68 ++-- latest-tag/articles/algorithm.html | 16 +- latest-tag/articles/between_within.html | 16 +- latest-tag/articles/coef_vcov.html | 16 +- latest-tag/articles/covariance.html | 16 +- latest-tag/articles/empirical_wls.html | 16 +- latest-tag/articles/hypothesis_testing.html | 16 +- latest-tag/articles/index.html | 131 ++++--- latest-tag/articles/introduction.html | 16 +- latest-tag/articles/kenward.html | 16 +- .../articles/methodological_introduction.html | 16 +- latest-tag/articles/mmrm_review_methods.html | 16 +- latest-tag/articles/package_structure.html | 16 +- latest-tag/articles/predict.html | 16 +- latest-tag/articles/satterthwaite.html | 16 +- latest-tag/authors.html | 74 ++-- latest-tag/index.html | 16 +- latest-tag/news/index.html | 276 ++++++++++----- latest-tag/reference/Anova.mmrm.html | 95 +++-- latest-tag/reference/COV_TYPES.html | 82 +++-- latest-tag/reference/as.cov_struct.html | 134 +++++--- latest-tag/reference/bcva_data.html | 89 +++-- latest-tag/reference/cached_mmrm_results.html | 89 +++-- latest-tag/reference/car_add_mmrm.html | 89 +++-- .../reference/check_package_version.html | 89 +++-- latest-tag/reference/component.html | 105 ++++-- latest-tag/reference/cov_struct.html | 104 ++++-- latest-tag/reference/cov_type_abbr.html | 86 +++-- latest-tag/reference/cov_type_name.html | 86 +++-- latest-tag/reference/covariance_types.html | 195 ++++++++--- latest-tag/reference/df_1d.html | 96 ++++-- latest-tag/reference/df_md.html | 96 ++++-- latest-tag/reference/drop_elements.html | 89 +++-- .../emit_tidymodels_register_msg.html | 76 ++-- latest-tag/reference/emmeans_support.html | 80 +++-- latest-tag/reference/emp_start.html | 107 ++++-- latest-tag/reference/fev_data.html | 89 +++-- latest-tag/reference/fill_names.html | 86 +++-- latest-tag/reference/fit_mmrm.html | 117 +++++-- .../reference/fit_single_optimizer.html | 120 +++++-- latest-tag/reference/flat_expr.html | 120 +++++-- latest-tag/reference/format.cov_struct.html | 89 +++-- latest-tag/reference/format_symbols.html | 90 +++-- latest-tag/reference/formula_rhs.html | 94 +++-- .../reference/h_add_covariance_terms.html | 92 +++-- latest-tag/reference/h_add_terms.html | 95 +++-- latest-tag/reference/h_coef_table.html | 86 +++-- .../reference/h_confirm_large_levels.html | 90 +++-- .../h_construct_model_frame_inputs.html | 106 ++++-- latest-tag/reference/h_default_value.html | 93 +++-- latest-tag/reference/h_df_1d_bw.html | 89 +++-- latest-tag/reference/h_df_1d_kr.html | 93 +++-- latest-tag/reference/h_df_1d_res.html | 93 +++-- latest-tag/reference/h_df_1d_sat.html | 93 +++-- latest-tag/reference/h_df_bw_calc.html | 93 +++-- latest-tag/reference/h_df_md_bw.html | 89 +++-- latest-tag/reference/h_df_md_from_1d.html | 89 +++-- latest-tag/reference/h_df_md_kr.html | 89 +++-- latest-tag/reference/h_df_md_res.html | 89 +++-- latest-tag/reference/h_df_md_sat.html | 89 +++-- latest-tag/reference/h_df_min_bw.html | 89 +++-- latest-tag/reference/h_df_to_tibble.html | 92 +++-- .../reference/h_drop_covariance_terms.html | 89 +++-- latest-tag/reference/h_drop_levels.html | 92 +++-- latest-tag/reference/h_extra_levels.html | 83 +++-- .../reference/h_extract_covariance_terms.html | 86 +++-- .../h_first_contain_categorical.html | 89 +++-- latest-tag/reference/h_get_contrast.html | 95 +++-- latest-tag/reference/h_get_cov_default.html | 93 +++-- latest-tag/reference/h_get_empirical.html | 109 ++++-- latest-tag/reference/h_get_index.html | 86 +++-- latest-tag/reference/h_get_kr_comp.html | 103 ++++-- latest-tag/reference/h_get_na_action.html | 73 ++-- latest-tag/reference/h_get_optimizers.html | 110 ++++-- latest-tag/reference/h_get_prediction.html | 105 ++++-- .../reference/h_get_prediction_variance.html | 89 +++-- latest-tag/reference/h_get_sim_per_subj.html | 89 +++-- .../reference/h_get_theta_from_cov.html | 89 +++-- latest-tag/reference/h_gradient.html | 93 +++-- latest-tag/reference/h_jac_list.html | 92 +++-- latest-tag/reference/h_kr_df.html | 106 ++++-- latest-tag/reference/h_md_denom_df.html | 89 +++-- .../reference/h_mmrm_tmb_assert_start.html | 86 +++-- .../reference/h_mmrm_tmb_check_conv.html | 89 +++-- latest-tag/reference/h_mmrm_tmb_data.html | 117 +++++-- .../reference/h_mmrm_tmb_extract_cov.html | 99 ++++-- latest-tag/reference/h_mmrm_tmb_fit.html | 109 ++++-- .../reference/h_mmrm_tmb_formula_parts.html | 96 ++++-- .../reference/h_mmrm_tmb_parameters.html | 95 +++-- latest-tag/reference/h_newdata_add_pred.html | 98 ++++-- latest-tag/reference/h_obtain_lvls.html | 92 +++-- latest-tag/reference/h_optimizer_fun.html | 86 +++-- latest-tag/reference/h_partial_fun_args.html | 95 +++-- latest-tag/reference/h_print_aic_list.html | 86 +++-- latest-tag/reference/h_print_call.html | 92 +++-- latest-tag/reference/h_print_cov.html | 89 +++-- latest-tag/reference/h_quad_form.html | 102 ++++-- .../reference/h_reconcile_cov_struct.html | 89 +++-- latest-tag/reference/h_record_all_output.html | 103 ++++-- latest-tag/reference/h_register_s3.html | 99 ++++-- .../reference/h_residuals_normalized.html | 86 +++-- latest-tag/reference/h_residuals_pearson.html | 86 +++-- .../reference/h_residuals_response.html | 86 +++-- latest-tag/reference/h_split_control.html | 93 +++-- .../reference/h_summarize_all_fits.html | 86 +++-- latest-tag/reference/h_tbl_confint_terms.html | 89 +++-- latest-tag/reference/h_test_1d.html | 96 ++++-- latest-tag/reference/h_test_md.html | 99 ++++-- .../h_tmb_warn_non_deterministic.html | 80 +++-- latest-tag/reference/h_tr.html | 86 +++-- latest-tag/reference/h_valid_formula.html | 86 +++-- latest-tag/reference/h_var_adj.html | 105 ++++-- latest-tag/reference/h_warn_na_action.html | 73 ++-- latest-tag/reference/h_within_or_between.html | 93 +++-- latest-tag/reference/index.html | 224 ++++++++---- latest-tag/reference/is_infix.html | 94 +++-- latest-tag/reference/mmrm-package.html | 99 ++++-- latest-tag/reference/mmrm.html | 124 ++++--- latest-tag/reference/mmrm_control.html | 161 ++++++--- latest-tag/reference/mmrm_methods.html | 122 +++++-- latest-tag/reference/mmrm_tidiers.html | 123 ++++--- latest-tag/reference/mmrm_tmb_methods.html | 180 +++++++--- latest-tag/reference/parsnip_add_mmrm.html | 92 +++-- latest-tag/reference/position_symbol.html | 96 ++++-- latest-tag/reference/print.cov_struct.html | 89 +++-- latest-tag/reference/reexports.html | 80 +++-- .../reference/refit_multiple_optimizers.html | 98 ++++-- latest-tag/reference/register_on_load.html | 95 +++-- latest-tag/reference/std_start.html | 98 ++++-- latest-tag/reference/tmb_cov_type.html | 86 +++-- latest-tag/reference/validate_cov_struct.html | 86 +++-- main/404.html | 16 +- main/CONTRIBUTING.html | 323 +++++++++++------ main/PULL_REQUEST_TEMPLATE.html | 68 ++-- main/articles/algorithm.html | 16 +- main/articles/between_within.html | 16 +- main/articles/coef_vcov.html | 16 +- main/articles/covariance.html | 16 +- main/articles/empirical_wls.html | 16 +- main/articles/hypothesis_testing.html | 16 +- main/articles/index.html | 131 ++++--- main/articles/introduction.html | 16 +- main/articles/kenward.html | 16 +- .../articles/methodological_introduction.html | 16 +- main/articles/mmrm_review_methods.html | 16 +- main/articles/package_structure.html | 16 +- main/articles/predict.html | 16 +- main/articles/satterthwaite.html | 16 +- main/authors.html | 74 ++-- main/index.html | 16 +- main/news/index.html | 288 +++++++++++----- main/reference/Anova.mmrm.html | 95 +++-- main/reference/COV_TYPES.html | 82 +++-- main/reference/as.cov_struct.html | 134 +++++--- main/reference/bcva_data.html | 89 +++-- main/reference/cached_mmrm_results.html | 89 +++-- main/reference/car_add_mmrm.html | 89 +++-- main/reference/check_package_version.html | 89 +++-- main/reference/component.html | 105 ++++-- main/reference/cov_struct.html | 104 ++++-- main/reference/cov_type_abbr.html | 86 +++-- main/reference/cov_type_name.html | 86 +++-- main/reference/covariance_types.html | 195 ++++++++--- main/reference/df_1d.html | 96 ++++-- main/reference/df_md.html | 96 ++++-- main/reference/drop_elements.html | 89 +++-- .../emit_tidymodels_register_msg.html | 76 ++-- main/reference/emmeans_support.html | 80 +++-- main/reference/emp_start.html | 107 ++++-- main/reference/fev_data.html | 89 +++-- main/reference/fill_names.html | 86 +++-- main/reference/fit_mmrm.html | 117 +++++-- main/reference/fit_single_optimizer.html | 120 +++++-- main/reference/flat_expr.html | 120 +++++-- main/reference/format.cov_struct.html | 89 +++-- main/reference/format_symbols.html | 90 +++-- main/reference/formula_rhs.html | 94 +++-- main/reference/h_add_covariance_terms.html | 92 +++-- main/reference/h_add_terms.html | 95 +++-- main/reference/h_coef_table.html | 86 +++-- main/reference/h_confirm_large_levels.html | 90 +++-- .../h_construct_model_frame_inputs.html | 106 ++++-- main/reference/h_default_value.html | 93 +++-- main/reference/h_df_1d_bw.html | 89 +++-- main/reference/h_df_1d_kr.html | 93 +++-- main/reference/h_df_1d_res.html | 93 +++-- main/reference/h_df_1d_sat.html | 93 +++-- main/reference/h_df_bw_calc.html | 93 +++-- main/reference/h_df_md_bw.html | 89 +++-- main/reference/h_df_md_from_1d.html | 89 +++-- main/reference/h_df_md_kr.html | 89 +++-- main/reference/h_df_md_res.html | 89 +++-- main/reference/h_df_md_sat.html | 89 +++-- main/reference/h_df_min_bw.html | 89 +++-- main/reference/h_df_to_tibble.html | 92 +++-- main/reference/h_drop_covariance_terms.html | 89 +++-- main/reference/h_drop_levels.html | 92 +++-- main/reference/h_extra_levels.html | 83 +++-- .../reference/h_extract_covariance_terms.html | 86 +++-- .../h_first_contain_categorical.html | 89 +++-- main/reference/h_get_contrast.html | 95 +++-- main/reference/h_get_cov_default.html | 93 +++-- main/reference/h_get_empirical.html | 109 ++++-- main/reference/h_get_index.html | 86 +++-- main/reference/h_get_kr_comp.html | 103 ++++-- main/reference/h_get_na_action.html | 73 ++-- main/reference/h_get_optimizers.html | 110 ++++-- main/reference/h_get_prediction.html | 105 ++++-- main/reference/h_get_prediction_variance.html | 89 +++-- main/reference/h_get_sim_per_subj.html | 89 +++-- main/reference/h_get_theta_from_cov.html | 89 +++-- main/reference/h_gradient.html | 93 +++-- main/reference/h_jac_list.html | 92 +++-- main/reference/h_kr_df.html | 106 ++++-- main/reference/h_md_denom_df.html | 89 +++-- main/reference/h_mmrm_tmb_assert_start.html | 86 +++-- main/reference/h_mmrm_tmb_check_conv.html | 89 +++-- main/reference/h_mmrm_tmb_data.html | 117 +++++-- main/reference/h_mmrm_tmb_extract_cov.html | 99 ++++-- main/reference/h_mmrm_tmb_fit.html | 109 ++++-- main/reference/h_mmrm_tmb_formula_parts.html | 96 ++++-- main/reference/h_mmrm_tmb_parameters.html | 95 +++-- main/reference/h_newdata_add_pred.html | 98 ++++-- main/reference/h_obtain_lvls.html | 92 +++-- main/reference/h_optimizer_fun.html | 86 +++-- main/reference/h_partial_fun_args.html | 95 +++-- main/reference/h_print_aic_list.html | 86 +++-- main/reference/h_print_call.html | 92 +++-- main/reference/h_print_cov.html | 89 +++-- main/reference/h_quad_form.html | 102 ++++-- main/reference/h_reconcile_cov_struct.html | 89 +++-- main/reference/h_record_all_output.html | 103 ++++-- main/reference/h_register_s3.html | 99 ++++-- main/reference/h_residuals_normalized.html | 86 +++-- main/reference/h_residuals_pearson.html | 86 +++-- main/reference/h_residuals_response.html | 86 +++-- main/reference/h_split_control.html | 93 +++-- main/reference/h_summarize_all_fits.html | 86 +++-- main/reference/h_tbl_confint_terms.html | 89 +++-- main/reference/h_test_1d.html | 96 ++++-- main/reference/h_test_md.html | 99 ++++-- main/reference/h_tmb_version_sufficient.html | 76 ++-- .../h_tmb_warn_non_deterministic.html | 80 +++-- main/reference/h_tr.html | 86 +++-- main/reference/h_valid_formula.html | 86 +++-- main/reference/h_var_adj.html | 105 ++++-- main/reference/h_warn_na_action.html | 73 ++-- main/reference/h_within_or_between.html | 93 +++-- main/reference/index.html | 224 ++++++++---- main/reference/is_infix.html | 94 +++-- main/reference/mmrm-package.html | 99 ++++-- main/reference/mmrm.html | 124 ++++--- main/reference/mmrm_control.html | 161 ++++++--- main/reference/mmrm_methods.html | 122 +++++-- main/reference/mmrm_tidiers.html | 123 ++++--- main/reference/mmrm_tmb_methods.html | 180 +++++++--- main/reference/parsnip_add_mmrm.html | 92 +++-- main/reference/position_symbol.html | 96 ++++-- main/reference/print.cov_struct.html | 89 +++-- main/reference/reexports.html | 80 +++-- main/reference/refit_multiple_optimizers.html | 98 ++++-- main/reference/register_on_load.html | 95 +++-- main/reference/std_start.html | 98 ++++-- main/reference/tmb_cov_type.html | 86 +++-- main/reference/validate_cov_struct.html | 86 +++-- v0.2.2/404.html | 16 +- v0.2.2/CONTRIBUTING.html | 325 ++++++++++++------ v0.2.2/PULL_REQUEST_TEMPLATE.html | 70 ++-- v0.2.2/articles/algorithm.html | 16 +- v0.2.2/articles/covariance.html | 16 +- v0.2.2/articles/index.html | 92 +++-- v0.2.2/articles/introduction.html | 16 +- v0.2.2/articles/kenward.html | 16 +- v0.2.2/articles/package_structure.html | 16 +- v0.2.2/articles/satterthwaite.html | 16 +- v0.2.2/authors.html | 76 ++-- v0.2.2/index.html | 16 +- v0.2.2/news/index.html | 119 +++++-- v0.2.2/reference/component.html | 103 ++++-- v0.2.2/reference/covariance_types.html | 179 ++++++++-- v0.2.2/reference/df_1d.html | 94 +++-- v0.2.2/reference/df_md.html | 94 +++-- v0.2.2/reference/emmeans_support.html | 82 +++-- v0.2.2/reference/fev_data.html | 91 +++-- v0.2.2/reference/fit_mmrm.html | 97 ++++-- v0.2.2/reference/fit_single_optimizer.html | 97 ++++-- v0.2.2/reference/free_cores.html | 94 +++-- v0.2.2/reference/h_coef_table.html | 87 +++-- v0.2.2/reference/h_covbeta_fun.html | 91 +++-- v0.2.2/reference/h_df_1d_kr.html | 91 +++-- v0.2.2/reference/h_df_1d_list.html | 91 +++-- v0.2.2/reference/h_df_1d_sat.html | 91 +++-- v0.2.2/reference/h_df_md_from_1d.html | 87 +++-- v0.2.2/reference/h_df_md_kr.html | 91 +++-- v0.2.2/reference/h_df_md_list.html | 91 +++-- v0.2.2/reference/h_df_md_sat.html | 91 +++-- v0.2.2/reference/h_get_kr_comp.html | 101 ++++-- v0.2.2/reference/h_get_optimizers.html | 102 ++++-- v0.2.2/reference/h_gradient.html | 91 +++-- v0.2.2/reference/h_jac_col_as_matrix.html | 87 +++-- v0.2.2/reference/h_jac_list.html | 87 +++-- v0.2.2/reference/h_kr_df.html | 98 ++++-- v0.2.2/reference/h_md_denom_df.html | 90 +++-- v0.2.2/reference/h_mmrm_tmb_assert_start.html | 87 +++-- v0.2.2/reference/h_mmrm_tmb_check_conv.html | 87 +++-- v0.2.2/reference/h_mmrm_tmb_data.html | 97 ++++-- v0.2.2/reference/h_mmrm_tmb_extract_cov.html | 91 +++-- .../reference/h_mmrm_tmb_extract_terms.html | 97 ++++-- v0.2.2/reference/h_mmrm_tmb_extract_vars.html | 94 +++-- v0.2.2/reference/h_mmrm_tmb_fit.html | 98 ++++-- .../reference/h_mmrm_tmb_formula_parts.html | 94 +++-- v0.2.2/reference/h_mmrm_tmb_parameters.html | 87 +++-- v0.2.2/reference/h_optimizer_fun.html | 87 +++-- v0.2.2/reference/h_partial_fun_args.html | 90 +++-- v0.2.2/reference/h_print_aic_list.html | 84 +++-- v0.2.2/reference/h_print_call.html | 84 +++-- v0.2.2/reference/h_print_cov.html | 84 +++-- v0.2.2/reference/h_quad_form.html | 97 ++++-- v0.2.2/reference/h_record_all_output.html | 98 ++++-- v0.2.2/reference/h_split_control.html | 91 +++-- v0.2.2/reference/h_summarize_all_fits.html | 87 +++-- v0.2.2/reference/h_tr.html | 87 +++-- v0.2.2/reference/h_var_adj.html | 91 +++-- v0.2.2/reference/index.html | 198 +++++++---- v0.2.2/reference/mmrm-package.html | 101 ++++-- v0.2.2/reference/mmrm.html | 107 ++++-- v0.2.2/reference/mmrm_control.html | 97 ++++-- v0.2.2/reference/mmrm_methods.html | 117 +++++-- v0.2.2/reference/mmrm_tmb_methods.html | 108 ++++-- .../reference/refit_multiple_optimizers.html | 93 +++-- v0.3.0/404.html | 16 +- v0.3.0/CONTRIBUTING.html | 325 ++++++++++++------ v0.3.0/PULL_REQUEST_TEMPLATE.html | 70 ++-- v0.3.0/articles/algorithm.html | 16 +- v0.3.0/articles/between_within.html | 16 +- v0.3.0/articles/coef_vcov.html | 16 +- v0.3.0/articles/covariance.html | 16 +- v0.3.0/articles/empirical_wls.html | 16 +- v0.3.0/articles/index.html | 130 +++++-- v0.3.0/articles/introduction.html | 16 +- v0.3.0/articles/kenward.html | 16 +- .../articles/methodological_introduction.html | 16 +- v0.3.0/articles/mmrm_review_methods.html | 16 +- v0.3.0/articles/package_structure.html | 16 +- v0.3.0/articles/predict.html | 16 +- v0.3.0/articles/satterthwaite.html | 16 +- v0.3.0/authors.html | 76 ++-- v0.3.0/index.html | 16 +- v0.3.0/news/index.html | 150 +++++--- v0.3.0/reference/COV_TYPES.html | 84 +++-- v0.3.0/reference/as.cov_struct.html | 129 +++++-- v0.3.0/reference/bcva_data.html | 91 +++-- v0.3.0/reference/cached_mmrm_results.html | 91 +++-- v0.3.0/reference/check_package_version.html | 87 +++-- v0.3.0/reference/component.html | 103 ++++-- v0.3.0/reference/cov_struct.html | 93 +++-- v0.3.0/reference/cov_type_abbr.html | 87 +++-- v0.3.0/reference/cov_type_name.html | 87 +++-- v0.3.0/reference/covariance_types.html | 185 ++++++++-- v0.3.0/reference/df_1d.html | 94 +++-- v0.3.0/reference/df_md.html | 94 +++-- v0.3.0/reference/drop_elements.html | 87 +++-- .../emit_tidymodels_register_msg.html | 78 +++-- v0.3.0/reference/emmeans_support.html | 82 +++-- v0.3.0/reference/fev_data.html | 91 +++-- v0.3.0/reference/fill_names.html | 87 +++-- v0.3.0/reference/fit_mmrm.html | 97 ++++-- v0.3.0/reference/fit_single_optimizer.html | 97 ++++-- v0.3.0/reference/flat_expr.html | 121 +++++-- v0.3.0/reference/format.cov_struct.html | 87 +++-- v0.3.0/reference/format_symbols.html | 91 +++-- v0.3.0/reference/formula_rhs.html | 95 +++-- v0.3.0/reference/h_add_covariance_terms.html | 90 +++-- v0.3.0/reference/h_add_terms.html | 90 +++-- v0.3.0/reference/h_coef_table.html | 87 +++-- v0.3.0/reference/h_confirm_large_levels.html | 88 +++-- .../h_construct_model_frame_inputs.html | 98 ++++-- v0.3.0/reference/h_default_value.html | 95 +++-- v0.3.0/reference/h_df_1d_bw.html | 87 +++-- v0.3.0/reference/h_df_1d_kr.html | 91 +++-- v0.3.0/reference/h_df_1d_res.html | 91 +++-- v0.3.0/reference/h_df_1d_sat.html | 91 +++-- v0.3.0/reference/h_df_bw_calc.html | 94 +++-- v0.3.0/reference/h_df_md_bw.html | 87 +++-- v0.3.0/reference/h_df_md_from_1d.html | 87 +++-- v0.3.0/reference/h_df_md_kr.html | 87 +++-- v0.3.0/reference/h_df_md_res.html | 87 +++-- v0.3.0/reference/h_df_md_sat.html | 87 +++-- v0.3.0/reference/h_df_min_bw.html | 87 +++-- v0.3.0/reference/h_df_to_tibble.html | 93 +++-- v0.3.0/reference/h_drop_covariance_terms.html | 90 +++-- .../reference/h_extract_covariance_terms.html | 87 +++-- v0.3.0/reference/h_factor_ref.html | 87 +++-- v0.3.0/reference/h_get_cov_default.html | 91 +++-- v0.3.0/reference/h_get_empirical.html | 98 ++++-- v0.3.0/reference/h_get_kr_comp.html | 101 ++++-- v0.3.0/reference/h_get_optimizers.html | 102 ++++-- v0.3.0/reference/h_get_prediction.html | 97 ++++-- .../reference/h_get_prediction_variance.html | 84 +++-- v0.3.0/reference/h_get_sim_per_subj.html | 84 +++-- v0.3.0/reference/h_gradient.html | 91 +++-- v0.3.0/reference/h_jac_list.html | 87 +++-- v0.3.0/reference/h_kr_df.html | 98 ++++-- v0.3.0/reference/h_md_denom_df.html | 90 +++-- v0.3.0/reference/h_mmrm_tmb_assert_start.html | 87 +++-- v0.3.0/reference/h_mmrm_tmb_check_conv.html | 87 +++-- v0.3.0/reference/h_mmrm_tmb_data.html | 97 ++++-- v0.3.0/reference/h_mmrm_tmb_extract_cov.html | 91 +++-- v0.3.0/reference/h_mmrm_tmb_fit.html | 101 ++++-- .../reference/h_mmrm_tmb_formula_parts.html | 94 +++-- v0.3.0/reference/h_mmrm_tmb_parameters.html | 87 +++-- v0.3.0/reference/h_newdata_add_pred.html | 87 +++-- v0.3.0/reference/h_optimizer_fun.html | 87 +++-- v0.3.0/reference/h_partial_fun_args.html | 90 +++-- v0.3.0/reference/h_print_aic_list.html | 84 +++-- v0.3.0/reference/h_print_call.html | 84 +++-- v0.3.0/reference/h_print_cov.html | 84 +++-- v0.3.0/reference/h_quad_form.html | 97 ++++-- v0.3.0/reference/h_reconcile_cov_struct.html | 87 +++-- v0.3.0/reference/h_record_all_output.html | 98 ++++-- v0.3.0/reference/h_residuals_normalized.html | 87 +++-- v0.3.0/reference/h_residuals_pearson.html | 87 +++-- v0.3.0/reference/h_residuals_response.html | 87 +++-- v0.3.0/reference/h_split_control.html | 91 +++-- v0.3.0/reference/h_summarize_all_fits.html | 87 +++-- v0.3.0/reference/h_tbl_confint_terms.html | 87 +++-- v0.3.0/reference/h_test_1d.html | 91 +++-- v0.3.0/reference/h_test_md.html | 91 +++-- v0.3.0/reference/h_tr.html | 87 +++-- v0.3.0/reference/h_valid_formula.html | 87 +++-- v0.3.0/reference/h_var_adj.html | 91 +++-- v0.3.0/reference/h_warn_na_action.html | 75 ++-- v0.3.0/reference/h_within_or_between.html | 91 +++-- v0.3.0/reference/index.html | 209 +++++++---- v0.3.0/reference/is_infix.html | 95 +++-- v0.3.0/reference/mmrm-package.html | 101 ++++-- v0.3.0/reference/mmrm.html | 107 ++++-- v0.3.0/reference/mmrm_control.html | 104 ++++-- v0.3.0/reference/mmrm_methods.html | 120 +++++-- v0.3.0/reference/mmrm_tidiers.html | 103 ++++-- v0.3.0/reference/mmrm_tmb_methods.html | 118 +++++-- v0.3.0/reference/parsnip_add_mmrm.html | 93 +++-- v0.3.0/reference/position_symbol.html | 91 +++-- v0.3.0/reference/print.cov_struct.html | 87 +++-- v0.3.0/reference/reexports.html | 82 +++-- .../reference/refit_multiple_optimizers.html | 93 +++-- v0.3.0/reference/register_on_load.html | 87 +++-- v0.3.0/reference/tmb_cov_type.html | 87 +++-- v0.3.0/reference/validate_cov_struct.html | 87 +++-- v0.3.1/404.html | 16 +- v0.3.1/CONTRIBUTING.html | 325 ++++++++++++------ v0.3.1/PULL_REQUEST_TEMPLATE.html | 70 ++-- v0.3.1/articles/algorithm.html | 16 +- v0.3.1/articles/between_within.html | 16 +- v0.3.1/articles/coef_vcov.html | 16 +- v0.3.1/articles/covariance.html | 16 +- v0.3.1/articles/empirical_wls.html | 16 +- v0.3.1/articles/index.html | 130 +++++-- v0.3.1/articles/introduction.html | 16 +- v0.3.1/articles/kenward.html | 16 +- .../articles/methodological_introduction.html | 16 +- v0.3.1/articles/mmrm_review_methods.html | 16 +- v0.3.1/articles/package_structure.html | 16 +- v0.3.1/articles/predict.html | 16 +- v0.3.1/articles/satterthwaite.html | 16 +- v0.3.1/authors.html | 76 ++-- v0.3.1/index.html | 16 +- v0.3.1/news/index.html | 150 +++++--- v0.3.1/reference/COV_TYPES.html | 84 +++-- v0.3.1/reference/as.cov_struct.html | 129 +++++-- v0.3.1/reference/bcva_data.html | 91 +++-- v0.3.1/reference/cached_mmrm_results.html | 91 +++-- v0.3.1/reference/check_package_version.html | 87 +++-- v0.3.1/reference/component.html | 103 ++++-- v0.3.1/reference/cov_struct.html | 93 +++-- v0.3.1/reference/cov_type_abbr.html | 87 +++-- v0.3.1/reference/cov_type_name.html | 87 +++-- v0.3.1/reference/covariance_types.html | 185 ++++++++-- v0.3.1/reference/df_1d.html | 94 +++-- v0.3.1/reference/df_md.html | 94 +++-- v0.3.1/reference/drop_elements.html | 87 +++-- .../emit_tidymodels_register_msg.html | 78 +++-- v0.3.1/reference/emmeans_support.html | 82 +++-- v0.3.1/reference/fev_data.html | 91 +++-- v0.3.1/reference/fill_names.html | 87 +++-- v0.3.1/reference/fit_mmrm.html | 97 ++++-- v0.3.1/reference/fit_single_optimizer.html | 97 ++++-- v0.3.1/reference/flat_expr.html | 121 +++++-- v0.3.1/reference/format.cov_struct.html | 87 +++-- v0.3.1/reference/format_symbols.html | 91 +++-- v0.3.1/reference/formula_rhs.html | 95 +++-- v0.3.1/reference/h_add_covariance_terms.html | 90 +++-- v0.3.1/reference/h_add_terms.html | 90 +++-- v0.3.1/reference/h_coef_table.html | 87 +++-- v0.3.1/reference/h_confirm_large_levels.html | 88 +++-- .../h_construct_model_frame_inputs.html | 98 ++++-- v0.3.1/reference/h_default_value.html | 95 +++-- v0.3.1/reference/h_df_1d_bw.html | 87 +++-- v0.3.1/reference/h_df_1d_kr.html | 91 +++-- v0.3.1/reference/h_df_1d_res.html | 91 +++-- v0.3.1/reference/h_df_1d_sat.html | 91 +++-- v0.3.1/reference/h_df_bw_calc.html | 94 +++-- v0.3.1/reference/h_df_md_bw.html | 87 +++-- v0.3.1/reference/h_df_md_from_1d.html | 87 +++-- v0.3.1/reference/h_df_md_kr.html | 87 +++-- v0.3.1/reference/h_df_md_res.html | 87 +++-- v0.3.1/reference/h_df_md_sat.html | 87 +++-- v0.3.1/reference/h_df_min_bw.html | 87 +++-- v0.3.1/reference/h_df_to_tibble.html | 93 +++-- v0.3.1/reference/h_drop_covariance_terms.html | 90 +++-- .../reference/h_extract_covariance_terms.html | 87 +++-- v0.3.1/reference/h_factor_ref.html | 87 +++-- v0.3.1/reference/h_get_cov_default.html | 91 +++-- v0.3.1/reference/h_get_empirical.html | 98 ++++-- v0.3.1/reference/h_get_kr_comp.html | 101 ++++-- v0.3.1/reference/h_get_optimizers.html | 102 ++++-- v0.3.1/reference/h_get_prediction.html | 97 ++++-- .../reference/h_get_prediction_variance.html | 84 +++-- v0.3.1/reference/h_get_sim_per_subj.html | 84 +++-- v0.3.1/reference/h_gradient.html | 91 +++-- v0.3.1/reference/h_jac_list.html | 87 +++-- v0.3.1/reference/h_kr_df.html | 98 ++++-- v0.3.1/reference/h_md_denom_df.html | 90 +++-- v0.3.1/reference/h_mmrm_tmb_assert_start.html | 87 +++-- v0.3.1/reference/h_mmrm_tmb_check_conv.html | 87 +++-- v0.3.1/reference/h_mmrm_tmb_data.html | 97 ++++-- v0.3.1/reference/h_mmrm_tmb_extract_cov.html | 91 +++-- v0.3.1/reference/h_mmrm_tmb_fit.html | 101 ++++-- .../reference/h_mmrm_tmb_formula_parts.html | 94 +++-- v0.3.1/reference/h_mmrm_tmb_parameters.html | 87 +++-- v0.3.1/reference/h_newdata_add_pred.html | 87 +++-- v0.3.1/reference/h_optimizer_fun.html | 87 +++-- v0.3.1/reference/h_partial_fun_args.html | 90 +++-- v0.3.1/reference/h_print_aic_list.html | 84 +++-- v0.3.1/reference/h_print_call.html | 84 +++-- v0.3.1/reference/h_print_cov.html | 84 +++-- v0.3.1/reference/h_quad_form.html | 97 ++++-- v0.3.1/reference/h_reconcile_cov_struct.html | 87 +++-- v0.3.1/reference/h_record_all_output.html | 98 ++++-- v0.3.1/reference/h_residuals_normalized.html | 87 +++-- v0.3.1/reference/h_residuals_pearson.html | 87 +++-- v0.3.1/reference/h_residuals_response.html | 87 +++-- v0.3.1/reference/h_split_control.html | 91 +++-- v0.3.1/reference/h_summarize_all_fits.html | 87 +++-- v0.3.1/reference/h_tbl_confint_terms.html | 87 +++-- v0.3.1/reference/h_test_1d.html | 91 +++-- v0.3.1/reference/h_test_md.html | 91 +++-- v0.3.1/reference/h_tr.html | 87 +++-- v0.3.1/reference/h_valid_formula.html | 87 +++-- v0.3.1/reference/h_var_adj.html | 91 +++-- v0.3.1/reference/h_warn_na_action.html | 75 ++-- v0.3.1/reference/h_within_or_between.html | 91 +++-- v0.3.1/reference/index.html | 209 +++++++---- v0.3.1/reference/is_infix.html | 95 +++-- v0.3.1/reference/mmrm-package.html | 101 ++++-- v0.3.1/reference/mmrm.html | 107 ++++-- v0.3.1/reference/mmrm_control.html | 104 ++++-- v0.3.1/reference/mmrm_methods.html | 120 +++++-- v0.3.1/reference/mmrm_tidiers.html | 103 ++++-- v0.3.1/reference/mmrm_tmb_methods.html | 118 +++++-- v0.3.1/reference/parsnip_add_mmrm.html | 93 +++-- v0.3.1/reference/position_symbol.html | 91 +++-- v0.3.1/reference/print.cov_struct.html | 87 +++-- v0.3.1/reference/reexports.html | 82 +++-- .../reference/refit_multiple_optimizers.html | 93 +++-- v0.3.1/reference/register_on_load.html | 87 +++-- v0.3.1/reference/tmb_cov_type.html | 87 +++-- v0.3.1/reference/validate_cov_struct.html | 87 +++-- v0.3.10/404.html | 16 +- v0.3.10/CONTRIBUTING.html | 325 ++++++++++++------ v0.3.10/PULL_REQUEST_TEMPLATE.html | 70 ++-- v0.3.10/articles/algorithm.html | 16 +- v0.3.10/articles/between_within.html | 16 +- v0.3.10/articles/coef_vcov.html | 16 +- v0.3.10/articles/covariance.html | 16 +- v0.3.10/articles/empirical_wls.html | 16 +- v0.3.10/articles/hypothesis_testing.html | 16 +- v0.3.10/articles/index.html | 133 ++++--- v0.3.10/articles/introduction.html | 16 +- v0.3.10/articles/kenward.html | 16 +- .../articles/methodological_introduction.html | 16 +- v0.3.10/articles/mmrm_review_methods.html | 16 +- v0.3.10/articles/package_structure.html | 16 +- v0.3.10/articles/predict.html | 16 +- v0.3.10/articles/satterthwaite.html | 16 +- v0.3.10/authors.html | 76 ++-- v0.3.10/index.html | 16 +- v0.3.10/news/index.html | 208 +++++++---- v0.3.10/reference/Anova.mmrm.html | 87 +++-- v0.3.10/reference/COV_TYPES.html | 84 +++-- v0.3.10/reference/as.cov_struct.html | 129 +++++-- v0.3.10/reference/bcva_data.html | 91 +++-- v0.3.10/reference/cached_mmrm_results.html | 91 +++-- v0.3.10/reference/car_add_mmrm.html | 90 +++-- v0.3.10/reference/check_package_version.html | 87 +++-- v0.3.10/reference/component.html | 103 ++++-- v0.3.10/reference/cov_struct.html | 93 +++-- v0.3.10/reference/cov_type_abbr.html | 87 +++-- v0.3.10/reference/cov_type_name.html | 87 +++-- v0.3.10/reference/covariance_types.html | 185 ++++++++-- v0.3.10/reference/df_1d.html | 94 +++-- v0.3.10/reference/df_md.html | 94 +++-- v0.3.10/reference/drop_elements.html | 87 +++-- .../emit_tidymodels_register_msg.html | 78 +++-- v0.3.10/reference/emmeans_support.html | 82 +++-- v0.3.10/reference/emp_start.html | 93 +++-- v0.3.10/reference/fev_data.html | 91 +++-- v0.3.10/reference/fill_names.html | 87 +++-- v0.3.10/reference/fit_mmrm.html | 97 ++++-- v0.3.10/reference/fit_single_optimizer.html | 97 ++++-- v0.3.10/reference/flat_expr.html | 121 +++++-- v0.3.10/reference/format.cov_struct.html | 87 +++-- v0.3.10/reference/format_symbols.html | 91 +++-- v0.3.10/reference/formula_rhs.html | 95 +++-- v0.3.10/reference/h_add_covariance_terms.html | 90 +++-- v0.3.10/reference/h_add_terms.html | 90 +++-- v0.3.10/reference/h_coef_table.html | 87 +++-- v0.3.10/reference/h_confirm_large_levels.html | 88 +++-- .../h_construct_model_frame_inputs.html | 98 ++++-- v0.3.10/reference/h_default_value.html | 95 +++-- v0.3.10/reference/h_df_1d_bw.html | 87 +++-- v0.3.10/reference/h_df_1d_kr.html | 91 +++-- v0.3.10/reference/h_df_1d_res.html | 91 +++-- v0.3.10/reference/h_df_1d_sat.html | 91 +++-- v0.3.10/reference/h_df_bw_calc.html | 94 +++-- v0.3.10/reference/h_df_md_bw.html | 87 +++-- v0.3.10/reference/h_df_md_from_1d.html | 87 +++-- v0.3.10/reference/h_df_md_kr.html | 87 +++-- v0.3.10/reference/h_df_md_res.html | 87 +++-- v0.3.10/reference/h_df_md_sat.html | 87 +++-- v0.3.10/reference/h_df_min_bw.html | 87 +++-- v0.3.10/reference/h_df_to_tibble.html | 93 +++-- .../reference/h_drop_covariance_terms.html | 90 +++-- .../reference/h_extract_covariance_terms.html | 87 +++-- v0.3.10/reference/h_factor_ref.html | 87 +++-- v0.3.10/reference/h_get_contrast.html | 87 +++-- v0.3.10/reference/h_get_cov_default.html | 91 +++-- v0.3.10/reference/h_get_empirical.html | 98 ++++-- v0.3.10/reference/h_get_kr_comp.html | 101 ++++-- v0.3.10/reference/h_get_optimizers.html | 102 ++++-- v0.3.10/reference/h_get_prediction.html | 97 ++++-- .../reference/h_get_prediction_variance.html | 84 +++-- v0.3.10/reference/h_get_sim_per_subj.html | 84 +++-- v0.3.10/reference/h_get_theta_from_cov.html | 87 +++-- v0.3.10/reference/h_gradient.html | 91 +++-- v0.3.10/reference/h_jac_list.html | 87 +++-- v0.3.10/reference/h_kr_df.html | 98 ++++-- v0.3.10/reference/h_md_denom_df.html | 90 +++-- .../reference/h_mmrm_tmb_assert_start.html | 87 +++-- v0.3.10/reference/h_mmrm_tmb_check_conv.html | 87 +++-- v0.3.10/reference/h_mmrm_tmb_data.html | 97 ++++-- v0.3.10/reference/h_mmrm_tmb_extract_cov.html | 91 +++-- v0.3.10/reference/h_mmrm_tmb_fit.html | 101 ++++-- .../reference/h_mmrm_tmb_formula_parts.html | 94 +++-- v0.3.10/reference/h_mmrm_tmb_parameters.html | 87 +++-- v0.3.10/reference/h_newdata_add_pred.html | 87 +++-- v0.3.10/reference/h_optimizer_fun.html | 87 +++-- v0.3.10/reference/h_partial_fun_args.html | 90 +++-- v0.3.10/reference/h_print_aic_list.html | 84 +++-- v0.3.10/reference/h_print_call.html | 84 +++-- v0.3.10/reference/h_print_cov.html | 84 +++-- v0.3.10/reference/h_quad_form.html | 97 ++++-- v0.3.10/reference/h_reconcile_cov_struct.html | 87 +++-- v0.3.10/reference/h_record_all_output.html | 98 ++++-- v0.3.10/reference/h_register_s3.html | 95 +++-- v0.3.10/reference/h_residuals_normalized.html | 87 +++-- v0.3.10/reference/h_residuals_pearson.html | 87 +++-- v0.3.10/reference/h_residuals_response.html | 87 +++-- v0.3.10/reference/h_split_control.html | 91 +++-- v0.3.10/reference/h_summarize_all_fits.html | 87 +++-- v0.3.10/reference/h_tbl_confint_terms.html | 87 +++-- v0.3.10/reference/h_test_1d.html | 91 +++-- v0.3.10/reference/h_test_md.html | 91 +++-- v0.3.10/reference/h_tr.html | 87 +++-- v0.3.10/reference/h_valid_formula.html | 87 +++-- v0.3.10/reference/h_var_adj.html | 91 +++-- v0.3.10/reference/h_warn_na_action.html | 75 ++-- v0.3.10/reference/h_within_or_between.html | 91 +++-- v0.3.10/reference/index.html | 226 ++++++++---- v0.3.10/reference/is_infix.html | 95 +++-- v0.3.10/reference/mmrm-package.html | 101 ++++-- v0.3.10/reference/mmrm.html | 107 ++++-- v0.3.10/reference/mmrm_control.html | 141 ++++++-- v0.3.10/reference/mmrm_methods.html | 120 +++++-- v0.3.10/reference/mmrm_tidiers.html | 103 ++++-- v0.3.10/reference/mmrm_tmb_methods.html | 118 +++++-- v0.3.10/reference/parsnip_add_mmrm.html | 93 +++-- v0.3.10/reference/position_symbol.html | 91 +++-- v0.3.10/reference/print.cov_struct.html | 87 +++-- v0.3.10/reference/reexports.html | 82 +++-- .../reference/refit_multiple_optimizers.html | 93 +++-- v0.3.10/reference/register_on_load.html | 87 +++-- v0.3.10/reference/std_start.html | 90 +++-- v0.3.10/reference/tmb_cov_type.html | 87 +++-- v0.3.10/reference/validate_cov_struct.html | 87 +++-- v0.3.11/404.html | 16 +- v0.3.11/CONTRIBUTING.html | 325 ++++++++++++------ v0.3.11/PULL_REQUEST_TEMPLATE.html | 70 ++-- v0.3.11/articles/algorithm.html | 16 +- v0.3.11/articles/between_within.html | 16 +- v0.3.11/articles/coef_vcov.html | 16 +- v0.3.11/articles/covariance.html | 16 +- v0.3.11/articles/empirical_wls.html | 16 +- v0.3.11/articles/hypothesis_testing.html | 16 +- v0.3.11/articles/index.html | 133 ++++--- v0.3.11/articles/introduction.html | 16 +- v0.3.11/articles/kenward.html | 16 +- .../articles/methodological_introduction.html | 16 +- v0.3.11/articles/mmrm_review_methods.html | 16 +- v0.3.11/articles/package_structure.html | 16 +- v0.3.11/articles/predict.html | 16 +- v0.3.11/articles/satterthwaite.html | 16 +- v0.3.11/authors.html | 76 ++-- v0.3.11/index.html | 16 +- v0.3.11/news/index.html | 221 ++++++++---- v0.3.11/reference/Anova.mmrm.html | 87 +++-- v0.3.11/reference/COV_TYPES.html | 84 +++-- v0.3.11/reference/as.cov_struct.html | 129 +++++-- v0.3.11/reference/bcva_data.html | 91 +++-- v0.3.11/reference/cached_mmrm_results.html | 91 +++-- v0.3.11/reference/car_add_mmrm.html | 90 +++-- v0.3.11/reference/check_package_version.html | 87 +++-- v0.3.11/reference/component.html | 103 ++++-- v0.3.11/reference/cov_struct.html | 93 +++-- v0.3.11/reference/cov_type_abbr.html | 87 +++-- v0.3.11/reference/cov_type_name.html | 87 +++-- v0.3.11/reference/covariance_types.html | 185 ++++++++-- v0.3.11/reference/df_1d.html | 94 +++-- v0.3.11/reference/df_md.html | 94 +++-- v0.3.11/reference/drop_elements.html | 87 +++-- .../emit_tidymodels_register_msg.html | 78 +++-- v0.3.11/reference/emmeans_support.html | 82 +++-- v0.3.11/reference/emp_start.html | 93 +++-- v0.3.11/reference/fev_data.html | 91 +++-- v0.3.11/reference/fill_names.html | 87 +++-- v0.3.11/reference/fit_mmrm.html | 97 ++++-- v0.3.11/reference/fit_single_optimizer.html | 97 ++++-- v0.3.11/reference/flat_expr.html | 121 +++++-- v0.3.11/reference/format.cov_struct.html | 87 +++-- v0.3.11/reference/format_symbols.html | 91 +++-- v0.3.11/reference/formula_rhs.html | 95 +++-- v0.3.11/reference/h_add_covariance_terms.html | 90 +++-- v0.3.11/reference/h_add_terms.html | 90 +++-- v0.3.11/reference/h_coef_table.html | 87 +++-- v0.3.11/reference/h_confirm_large_levels.html | 88 +++-- .../h_construct_model_frame_inputs.html | 98 ++++-- v0.3.11/reference/h_default_value.html | 95 +++-- v0.3.11/reference/h_df_1d_bw.html | 87 +++-- v0.3.11/reference/h_df_1d_kr.html | 91 +++-- v0.3.11/reference/h_df_1d_res.html | 91 +++-- v0.3.11/reference/h_df_1d_sat.html | 91 +++-- v0.3.11/reference/h_df_bw_calc.html | 94 +++-- v0.3.11/reference/h_df_md_bw.html | 87 +++-- v0.3.11/reference/h_df_md_from_1d.html | 87 +++-- v0.3.11/reference/h_df_md_kr.html | 87 +++-- v0.3.11/reference/h_df_md_res.html | 87 +++-- v0.3.11/reference/h_df_md_sat.html | 87 +++-- v0.3.11/reference/h_df_min_bw.html | 87 +++-- v0.3.11/reference/h_df_to_tibble.html | 93 +++-- .../reference/h_drop_covariance_terms.html | 90 +++-- .../reference/h_extract_covariance_terms.html | 87 +++-- v0.3.11/reference/h_factor_ref.html | 87 +++-- v0.3.11/reference/h_get_contrast.html | 87 +++-- v0.3.11/reference/h_get_cov_default.html | 91 +++-- v0.3.11/reference/h_get_empirical.html | 98 ++++-- v0.3.11/reference/h_get_kr_comp.html | 101 ++++-- v0.3.11/reference/h_get_optimizers.html | 102 ++++-- v0.3.11/reference/h_get_prediction.html | 97 ++++-- .../reference/h_get_prediction_variance.html | 84 +++-- v0.3.11/reference/h_get_sim_per_subj.html | 84 +++-- v0.3.11/reference/h_get_theta_from_cov.html | 87 +++-- v0.3.11/reference/h_gradient.html | 91 +++-- v0.3.11/reference/h_jac_list.html | 87 +++-- v0.3.11/reference/h_kr_df.html | 98 ++++-- v0.3.11/reference/h_md_denom_df.html | 90 +++-- .../reference/h_mmrm_tmb_assert_start.html | 87 +++-- v0.3.11/reference/h_mmrm_tmb_check_conv.html | 87 +++-- v0.3.11/reference/h_mmrm_tmb_data.html | 97 ++++-- v0.3.11/reference/h_mmrm_tmb_extract_cov.html | 91 +++-- v0.3.11/reference/h_mmrm_tmb_fit.html | 101 ++++-- .../reference/h_mmrm_tmb_formula_parts.html | 94 +++-- v0.3.11/reference/h_mmrm_tmb_parameters.html | 87 +++-- v0.3.11/reference/h_newdata_add_pred.html | 87 +++-- v0.3.11/reference/h_optimizer_fun.html | 87 +++-- v0.3.11/reference/h_partial_fun_args.html | 90 +++-- v0.3.11/reference/h_print_aic_list.html | 84 +++-- v0.3.11/reference/h_print_call.html | 84 +++-- v0.3.11/reference/h_print_cov.html | 84 +++-- v0.3.11/reference/h_quad_form.html | 97 ++++-- v0.3.11/reference/h_reconcile_cov_struct.html | 87 +++-- v0.3.11/reference/h_record_all_output.html | 98 ++++-- v0.3.11/reference/h_register_s3.html | 95 +++-- v0.3.11/reference/h_residuals_normalized.html | 87 +++-- v0.3.11/reference/h_residuals_pearson.html | 87 +++-- v0.3.11/reference/h_residuals_response.html | 87 +++-- v0.3.11/reference/h_split_control.html | 91 +++-- v0.3.11/reference/h_summarize_all_fits.html | 87 +++-- v0.3.11/reference/h_tbl_confint_terms.html | 87 +++-- v0.3.11/reference/h_test_1d.html | 91 +++-- v0.3.11/reference/h_test_md.html | 91 +++-- v0.3.11/reference/h_tr.html | 87 +++-- v0.3.11/reference/h_valid_formula.html | 87 +++-- v0.3.11/reference/h_var_adj.html | 91 +++-- v0.3.11/reference/h_warn_na_action.html | 75 ++-- v0.3.11/reference/h_within_or_between.html | 91 +++-- v0.3.11/reference/index.html | 226 ++++++++---- v0.3.11/reference/is_infix.html | 95 +++-- v0.3.11/reference/mmrm-package.html | 101 ++++-- v0.3.11/reference/mmrm.html | 107 ++++-- v0.3.11/reference/mmrm_control.html | 141 ++++++-- v0.3.11/reference/mmrm_methods.html | 120 +++++-- v0.3.11/reference/mmrm_tidiers.html | 103 ++++-- v0.3.11/reference/mmrm_tmb_methods.html | 118 +++++-- v0.3.11/reference/parsnip_add_mmrm.html | 93 +++-- v0.3.11/reference/position_symbol.html | 91 +++-- v0.3.11/reference/print.cov_struct.html | 87 +++-- v0.3.11/reference/reexports.html | 82 +++-- .../reference/refit_multiple_optimizers.html | 93 +++-- v0.3.11/reference/register_on_load.html | 87 +++-- v0.3.11/reference/std_start.html | 90 +++-- v0.3.11/reference/tmb_cov_type.html | 87 +++-- v0.3.11/reference/validate_cov_struct.html | 87 +++-- v0.3.12/404.html | 16 +- v0.3.12/CONTRIBUTING.html | 319 +++++++++++------ v0.3.12/PULL_REQUEST_TEMPLATE.html | 64 +++- v0.3.12/articles/algorithm.html | 16 +- v0.3.12/articles/between_within.html | 16 +- v0.3.12/articles/coef_vcov.html | 16 +- v0.3.12/articles/covariance.html | 16 +- v0.3.12/articles/empirical_wls.html | 16 +- v0.3.12/articles/hypothesis_testing.html | 16 +- v0.3.12/articles/index.html | 127 +++++-- v0.3.12/articles/introduction.html | 16 +- v0.3.12/articles/kenward.html | 16 +- .../articles/methodological_introduction.html | 16 +- v0.3.12/articles/mmrm_review_methods.html | 16 +- v0.3.12/articles/package_structure.html | 16 +- v0.3.12/articles/predict.html | 16 +- v0.3.12/articles/satterthwaite.html | 16 +- v0.3.12/authors.html | 70 ++-- v0.3.12/index.html | 16 +- v0.3.12/news/index.html | 237 +++++++++---- v0.3.12/reference/Anova.mmrm.html | 81 +++-- v0.3.12/reference/COV_TYPES.html | 78 +++-- v0.3.12/reference/as.cov_struct.html | 123 +++++-- v0.3.12/reference/bcva_data.html | 85 +++-- v0.3.12/reference/cached_mmrm_results.html | 85 +++-- v0.3.12/reference/car_add_mmrm.html | 84 +++-- v0.3.12/reference/check_package_version.html | 81 +++-- v0.3.12/reference/component.html | 97 ++++-- v0.3.12/reference/cov_struct.html | 87 +++-- v0.3.12/reference/cov_type_abbr.html | 81 +++-- v0.3.12/reference/cov_type_name.html | 81 +++-- v0.3.12/reference/covariance_types.html | 179 ++++++++-- v0.3.12/reference/df_1d.html | 88 +++-- v0.3.12/reference/df_md.html | 88 +++-- v0.3.12/reference/drop_elements.html | 81 +++-- .../emit_tidymodels_register_msg.html | 72 ++-- v0.3.12/reference/emmeans_support.html | 76 ++-- v0.3.12/reference/emp_start.html | 87 +++-- v0.3.12/reference/fev_data.html | 85 +++-- v0.3.12/reference/fill_names.html | 81 +++-- v0.3.12/reference/fit_mmrm.html | 91 +++-- v0.3.12/reference/fit_single_optimizer.html | 91 +++-- v0.3.12/reference/flat_expr.html | 115 +++++-- v0.3.12/reference/format.cov_struct.html | 81 +++-- v0.3.12/reference/format_symbols.html | 85 +++-- v0.3.12/reference/formula_rhs.html | 89 +++-- v0.3.12/reference/h_add_covariance_terms.html | 84 +++-- v0.3.12/reference/h_add_terms.html | 84 +++-- v0.3.12/reference/h_coef_table.html | 81 +++-- v0.3.12/reference/h_confirm_large_levels.html | 85 +++-- .../h_construct_model_frame_inputs.html | 92 +++-- v0.3.12/reference/h_default_value.html | 85 +++-- v0.3.12/reference/h_df_1d_bw.html | 81 +++-- v0.3.12/reference/h_df_1d_kr.html | 85 +++-- v0.3.12/reference/h_df_1d_res.html | 85 +++-- v0.3.12/reference/h_df_1d_sat.html | 85 +++-- v0.3.12/reference/h_df_bw_calc.html | 88 +++-- v0.3.12/reference/h_df_md_bw.html | 81 +++-- v0.3.12/reference/h_df_md_from_1d.html | 81 +++-- v0.3.12/reference/h_df_md_kr.html | 81 +++-- v0.3.12/reference/h_df_md_res.html | 81 +++-- v0.3.12/reference/h_df_md_sat.html | 81 +++-- v0.3.12/reference/h_df_min_bw.html | 81 +++-- v0.3.12/reference/h_df_to_tibble.html | 87 +++-- .../reference/h_drop_covariance_terms.html | 84 +++-- .../reference/h_extract_covariance_terms.html | 81 +++-- v0.3.12/reference/h_factor_ref.html | 84 +++-- v0.3.12/reference/h_factor_ref_data.html | 84 +++-- v0.3.12/reference/h_get_contrast.html | 81 +++-- v0.3.12/reference/h_get_cov_default.html | 88 +++-- v0.3.12/reference/h_get_empirical.html | 92 +++-- v0.3.12/reference/h_get_kr_comp.html | 95 +++-- v0.3.12/reference/h_get_optimizers.html | 96 ++++-- v0.3.12/reference/h_get_prediction.html | 91 +++-- .../reference/h_get_prediction_variance.html | 78 +++-- v0.3.12/reference/h_get_sim_per_subj.html | 78 +++-- v0.3.12/reference/h_get_theta_from_cov.html | 84 +++-- v0.3.12/reference/h_gradient.html | 85 +++-- v0.3.12/reference/h_jac_list.html | 81 +++-- v0.3.12/reference/h_kr_df.html | 92 +++-- v0.3.12/reference/h_md_denom_df.html | 84 +++-- .../reference/h_mmrm_tmb_assert_start.html | 81 +++-- v0.3.12/reference/h_mmrm_tmb_check_conv.html | 81 +++-- v0.3.12/reference/h_mmrm_tmb_data.html | 91 +++-- v0.3.12/reference/h_mmrm_tmb_extract_cov.html | 85 +++-- v0.3.12/reference/h_mmrm_tmb_fit.html | 95 +++-- .../reference/h_mmrm_tmb_formula_parts.html | 88 +++-- v0.3.12/reference/h_mmrm_tmb_parameters.html | 81 +++-- v0.3.12/reference/h_newdata_add_pred.html | 81 +++-- v0.3.12/reference/h_optimizer_fun.html | 81 +++-- v0.3.12/reference/h_partial_fun_args.html | 84 +++-- v0.3.12/reference/h_print_aic_list.html | 78 +++-- v0.3.12/reference/h_print_call.html | 78 +++-- v0.3.12/reference/h_print_cov.html | 78 +++-- v0.3.12/reference/h_quad_form.html | 91 +++-- v0.3.12/reference/h_reconcile_cov_struct.html | 81 +++-- v0.3.12/reference/h_record_all_output.html | 92 +++-- v0.3.12/reference/h_register_s3.html | 85 +++-- v0.3.12/reference/h_residuals_normalized.html | 81 +++-- v0.3.12/reference/h_residuals_pearson.html | 81 +++-- v0.3.12/reference/h_residuals_response.html | 81 +++-- v0.3.12/reference/h_split_control.html | 85 +++-- v0.3.12/reference/h_summarize_all_fits.html | 81 +++-- v0.3.12/reference/h_tbl_confint_terms.html | 81 +++-- v0.3.12/reference/h_test_1d.html | 85 +++-- v0.3.12/reference/h_test_md.html | 85 +++-- v0.3.12/reference/h_tr.html | 81 +++-- v0.3.12/reference/h_valid_formula.html | 81 +++-- v0.3.12/reference/h_var_adj.html | 85 +++-- v0.3.12/reference/h_warn_na_action.html | 69 +++- v0.3.12/reference/h_within_or_between.html | 85 +++-- v0.3.12/reference/index.html | 220 ++++++++---- v0.3.12/reference/is_infix.html | 89 +++-- v0.3.12/reference/mmrm-package.html | 95 +++-- v0.3.12/reference/mmrm.html | 101 ++++-- v0.3.12/reference/mmrm_control.html | 135 ++++++-- v0.3.12/reference/mmrm_methods.html | 114 ++++-- v0.3.12/reference/mmrm_tidiers.html | 97 ++++-- v0.3.12/reference/mmrm_tmb_methods.html | 112 ++++-- v0.3.12/reference/parsnip_add_mmrm.html | 87 +++-- v0.3.12/reference/position_symbol.html | 85 +++-- v0.3.12/reference/print.cov_struct.html | 81 +++-- v0.3.12/reference/reexports.html | 76 ++-- .../reference/refit_multiple_optimizers.html | 87 +++-- v0.3.12/reference/register_on_load.html | 81 +++-- v0.3.12/reference/std_start.html | 84 +++-- v0.3.12/reference/tmb_cov_type.html | 81 +++-- v0.3.12/reference/validate_cov_struct.html | 81 +++-- v0.3.13/404.html | 16 +- v0.3.13/CONTRIBUTING.html | 323 +++++++++++------ v0.3.13/PULL_REQUEST_TEMPLATE.html | 68 ++-- v0.3.13/articles/algorithm.html | 16 +- v0.3.13/articles/between_within.html | 16 +- v0.3.13/articles/coef_vcov.html | 16 +- v0.3.13/articles/covariance.html | 16 +- v0.3.13/articles/empirical_wls.html | 16 +- v0.3.13/articles/hypothesis_testing.html | 16 +- v0.3.13/articles/index.html | 131 ++++--- v0.3.13/articles/introduction.html | 16 +- v0.3.13/articles/kenward.html | 16 +- .../articles/methodological_introduction.html | 16 +- v0.3.13/articles/mmrm_review_methods.html | 16 +- v0.3.13/articles/package_structure.html | 16 +- v0.3.13/articles/predict.html | 16 +- v0.3.13/articles/satterthwaite.html | 16 +- v0.3.13/authors.html | 74 ++-- v0.3.13/index.html | 16 +- v0.3.13/news/index.html | 262 +++++++++----- v0.3.13/reference/Anova.mmrm.html | 95 +++-- v0.3.13/reference/COV_TYPES.html | 82 +++-- v0.3.13/reference/as.cov_struct.html | 134 +++++--- v0.3.13/reference/bcva_data.html | 89 +++-- v0.3.13/reference/cached_mmrm_results.html | 89 +++-- v0.3.13/reference/car_add_mmrm.html | 89 +++-- v0.3.13/reference/check_package_version.html | 89 +++-- v0.3.13/reference/component.html | 105 ++++-- v0.3.13/reference/cov_struct.html | 104 ++++-- v0.3.13/reference/cov_type_abbr.html | 86 +++-- v0.3.13/reference/cov_type_name.html | 86 +++-- v0.3.13/reference/covariance_types.html | 195 ++++++++--- v0.3.13/reference/df_1d.html | 96 ++++-- v0.3.13/reference/df_md.html | 96 ++++-- v0.3.13/reference/drop_elements.html | 89 +++-- .../emit_tidymodels_register_msg.html | 76 ++-- v0.3.13/reference/emmeans_support.html | 80 +++-- v0.3.13/reference/emp_start.html | 107 ++++-- v0.3.13/reference/fev_data.html | 89 +++-- v0.3.13/reference/fill_names.html | 86 +++-- v0.3.13/reference/fit_mmrm.html | 117 +++++-- v0.3.13/reference/fit_single_optimizer.html | 120 +++++-- v0.3.13/reference/flat_expr.html | 120 +++++-- v0.3.13/reference/format.cov_struct.html | 89 +++-- v0.3.13/reference/format_symbols.html | 90 +++-- v0.3.13/reference/formula_rhs.html | 94 +++-- v0.3.13/reference/h_add_covariance_terms.html | 92 +++-- v0.3.13/reference/h_add_terms.html | 95 +++-- v0.3.13/reference/h_coef_table.html | 86 +++-- v0.3.13/reference/h_confirm_large_levels.html | 90 +++-- .../h_construct_model_frame_inputs.html | 106 ++++-- v0.3.13/reference/h_default_value.html | 93 +++-- v0.3.13/reference/h_df_1d_bw.html | 89 +++-- v0.3.13/reference/h_df_1d_kr.html | 93 +++-- v0.3.13/reference/h_df_1d_res.html | 93 +++-- v0.3.13/reference/h_df_1d_sat.html | 93 +++-- v0.3.13/reference/h_df_bw_calc.html | 93 +++-- v0.3.13/reference/h_df_md_bw.html | 89 +++-- v0.3.13/reference/h_df_md_from_1d.html | 89 +++-- v0.3.13/reference/h_df_md_kr.html | 89 +++-- v0.3.13/reference/h_df_md_res.html | 89 +++-- v0.3.13/reference/h_df_md_sat.html | 89 +++-- v0.3.13/reference/h_df_min_bw.html | 89 +++-- v0.3.13/reference/h_df_to_tibble.html | 92 +++-- .../reference/h_drop_covariance_terms.html | 89 +++-- v0.3.13/reference/h_drop_levels.html | 92 +++-- v0.3.13/reference/h_extra_levels.html | 83 +++-- .../reference/h_extract_covariance_terms.html | 86 +++-- .../h_first_contain_categorical.html | 89 +++-- v0.3.13/reference/h_get_contrast.html | 95 +++-- v0.3.13/reference/h_get_cov_default.html | 93 +++-- v0.3.13/reference/h_get_empirical.html | 109 ++++-- v0.3.13/reference/h_get_index.html | 86 +++-- v0.3.13/reference/h_get_kr_comp.html | 103 ++++-- v0.3.13/reference/h_get_na_action.html | 73 ++-- v0.3.13/reference/h_get_optimizers.html | 110 ++++-- v0.3.13/reference/h_get_prediction.html | 105 ++++-- .../reference/h_get_prediction_variance.html | 89 +++-- v0.3.13/reference/h_get_sim_per_subj.html | 89 +++-- v0.3.13/reference/h_get_theta_from_cov.html | 89 +++-- v0.3.13/reference/h_gradient.html | 93 +++-- v0.3.13/reference/h_jac_list.html | 92 +++-- v0.3.13/reference/h_kr_df.html | 106 ++++-- v0.3.13/reference/h_md_denom_df.html | 89 +++-- .../reference/h_mmrm_tmb_assert_start.html | 86 +++-- v0.3.13/reference/h_mmrm_tmb_check_conv.html | 89 +++-- v0.3.13/reference/h_mmrm_tmb_data.html | 117 +++++-- v0.3.13/reference/h_mmrm_tmb_extract_cov.html | 99 ++++-- v0.3.13/reference/h_mmrm_tmb_fit.html | 109 ++++-- .../reference/h_mmrm_tmb_formula_parts.html | 96 ++++-- v0.3.13/reference/h_mmrm_tmb_parameters.html | 95 +++-- v0.3.13/reference/h_newdata_add_pred.html | 98 ++++-- v0.3.13/reference/h_obtain_lvls.html | 92 +++-- v0.3.13/reference/h_optimizer_fun.html | 86 +++-- v0.3.13/reference/h_partial_fun_args.html | 95 +++-- v0.3.13/reference/h_print_aic_list.html | 86 +++-- v0.3.13/reference/h_print_call.html | 92 +++-- v0.3.13/reference/h_print_cov.html | 89 +++-- v0.3.13/reference/h_quad_form.html | 102 ++++-- v0.3.13/reference/h_reconcile_cov_struct.html | 89 +++-- v0.3.13/reference/h_record_all_output.html | 103 ++++-- v0.3.13/reference/h_register_s3.html | 99 ++++-- v0.3.13/reference/h_residuals_normalized.html | 86 +++-- v0.3.13/reference/h_residuals_pearson.html | 86 +++-- v0.3.13/reference/h_residuals_response.html | 86 +++-- v0.3.13/reference/h_split_control.html | 93 +++-- v0.3.13/reference/h_summarize_all_fits.html | 86 +++-- v0.3.13/reference/h_tbl_confint_terms.html | 89 +++-- v0.3.13/reference/h_test_1d.html | 96 ++++-- v0.3.13/reference/h_test_md.html | 99 ++++-- .../reference/h_tmb_warn_optimization.html | 80 +++-- v0.3.13/reference/h_tr.html | 86 +++-- v0.3.13/reference/h_valid_formula.html | 86 +++-- v0.3.13/reference/h_var_adj.html | 105 ++++-- v0.3.13/reference/h_warn_na_action.html | 73 ++-- v0.3.13/reference/h_within_or_between.html | 93 +++-- v0.3.13/reference/index.html | 224 ++++++++---- v0.3.13/reference/is_infix.html | 94 +++-- v0.3.13/reference/mmrm-package.html | 99 ++++-- v0.3.13/reference/mmrm.html | 124 ++++--- v0.3.13/reference/mmrm_control.html | 161 ++++++--- v0.3.13/reference/mmrm_methods.html | 122 +++++-- v0.3.13/reference/mmrm_tidiers.html | 123 ++++--- v0.3.13/reference/mmrm_tmb_methods.html | 180 +++++++--- v0.3.13/reference/parsnip_add_mmrm.html | 92 +++-- v0.3.13/reference/position_symbol.html | 96 ++++-- v0.3.13/reference/print.cov_struct.html | 89 +++-- v0.3.13/reference/reexports.html | 80 +++-- .../reference/refit_multiple_optimizers.html | 98 ++++-- v0.3.13/reference/register_on_load.html | 95 +++-- v0.3.13/reference/std_start.html | 98 ++++-- v0.3.13/reference/tmb_cov_type.html | 86 +++-- v0.3.13/reference/validate_cov_struct.html | 86 +++-- v0.3.14/404.html | 16 +- v0.3.14/CONTRIBUTING.html | 323 +++++++++++------ v0.3.14/PULL_REQUEST_TEMPLATE.html | 68 ++-- v0.3.14/articles/algorithm.html | 16 +- v0.3.14/articles/between_within.html | 16 +- v0.3.14/articles/coef_vcov.html | 16 +- v0.3.14/articles/covariance.html | 16 +- v0.3.14/articles/empirical_wls.html | 16 +- v0.3.14/articles/hypothesis_testing.html | 16 +- v0.3.14/articles/index.html | 131 ++++--- v0.3.14/articles/introduction.html | 16 +- v0.3.14/articles/kenward.html | 16 +- .../articles/methodological_introduction.html | 16 +- v0.3.14/articles/mmrm_review_methods.html | 16 +- v0.3.14/articles/package_structure.html | 16 +- v0.3.14/articles/predict.html | 16 +- v0.3.14/articles/satterthwaite.html | 16 +- v0.3.14/authors.html | 74 ++-- v0.3.14/index.html | 16 +- v0.3.14/news/index.html | 276 ++++++++++----- v0.3.14/reference/Anova.mmrm.html | 95 +++-- v0.3.14/reference/COV_TYPES.html | 82 +++-- v0.3.14/reference/as.cov_struct.html | 134 +++++--- v0.3.14/reference/bcva_data.html | 89 +++-- v0.3.14/reference/cached_mmrm_results.html | 89 +++-- v0.3.14/reference/car_add_mmrm.html | 89 +++-- v0.3.14/reference/check_package_version.html | 89 +++-- v0.3.14/reference/component.html | 105 ++++-- v0.3.14/reference/cov_struct.html | 104 ++++-- v0.3.14/reference/cov_type_abbr.html | 86 +++-- v0.3.14/reference/cov_type_name.html | 86 +++-- v0.3.14/reference/covariance_types.html | 195 ++++++++--- v0.3.14/reference/df_1d.html | 96 ++++-- v0.3.14/reference/df_md.html | 96 ++++-- v0.3.14/reference/drop_elements.html | 89 +++-- .../emit_tidymodels_register_msg.html | 76 ++-- v0.3.14/reference/emmeans_support.html | 80 +++-- v0.3.14/reference/emp_start.html | 107 ++++-- v0.3.14/reference/fev_data.html | 89 +++-- v0.3.14/reference/fill_names.html | 86 +++-- v0.3.14/reference/fit_mmrm.html | 117 +++++-- v0.3.14/reference/fit_single_optimizer.html | 120 +++++-- v0.3.14/reference/flat_expr.html | 120 +++++-- v0.3.14/reference/format.cov_struct.html | 89 +++-- v0.3.14/reference/format_symbols.html | 90 +++-- v0.3.14/reference/formula_rhs.html | 94 +++-- v0.3.14/reference/h_add_covariance_terms.html | 92 +++-- v0.3.14/reference/h_add_terms.html | 95 +++-- v0.3.14/reference/h_coef_table.html | 86 +++-- v0.3.14/reference/h_confirm_large_levels.html | 90 +++-- .../h_construct_model_frame_inputs.html | 106 ++++-- v0.3.14/reference/h_default_value.html | 93 +++-- v0.3.14/reference/h_df_1d_bw.html | 89 +++-- v0.3.14/reference/h_df_1d_kr.html | 93 +++-- v0.3.14/reference/h_df_1d_res.html | 93 +++-- v0.3.14/reference/h_df_1d_sat.html | 93 +++-- v0.3.14/reference/h_df_bw_calc.html | 93 +++-- v0.3.14/reference/h_df_md_bw.html | 89 +++-- v0.3.14/reference/h_df_md_from_1d.html | 89 +++-- v0.3.14/reference/h_df_md_kr.html | 89 +++-- v0.3.14/reference/h_df_md_res.html | 89 +++-- v0.3.14/reference/h_df_md_sat.html | 89 +++-- v0.3.14/reference/h_df_min_bw.html | 89 +++-- v0.3.14/reference/h_df_to_tibble.html | 92 +++-- .../reference/h_drop_covariance_terms.html | 89 +++-- v0.3.14/reference/h_drop_levels.html | 92 +++-- v0.3.14/reference/h_extra_levels.html | 83 +++-- .../reference/h_extract_covariance_terms.html | 86 +++-- .../h_first_contain_categorical.html | 89 +++-- v0.3.14/reference/h_get_contrast.html | 95 +++-- v0.3.14/reference/h_get_cov_default.html | 93 +++-- v0.3.14/reference/h_get_empirical.html | 109 ++++-- v0.3.14/reference/h_get_index.html | 86 +++-- v0.3.14/reference/h_get_kr_comp.html | 103 ++++-- v0.3.14/reference/h_get_na_action.html | 73 ++-- v0.3.14/reference/h_get_optimizers.html | 110 ++++-- v0.3.14/reference/h_get_prediction.html | 105 ++++-- .../reference/h_get_prediction_variance.html | 89 +++-- v0.3.14/reference/h_get_sim_per_subj.html | 89 +++-- v0.3.14/reference/h_get_theta_from_cov.html | 89 +++-- v0.3.14/reference/h_gradient.html | 93 +++-- v0.3.14/reference/h_jac_list.html | 92 +++-- v0.3.14/reference/h_kr_df.html | 106 ++++-- v0.3.14/reference/h_md_denom_df.html | 89 +++-- .../reference/h_mmrm_tmb_assert_start.html | 86 +++-- v0.3.14/reference/h_mmrm_tmb_check_conv.html | 89 +++-- v0.3.14/reference/h_mmrm_tmb_data.html | 117 +++++-- v0.3.14/reference/h_mmrm_tmb_extract_cov.html | 99 ++++-- v0.3.14/reference/h_mmrm_tmb_fit.html | 109 ++++-- .../reference/h_mmrm_tmb_formula_parts.html | 96 ++++-- v0.3.14/reference/h_mmrm_tmb_parameters.html | 95 +++-- v0.3.14/reference/h_newdata_add_pred.html | 98 ++++-- v0.3.14/reference/h_obtain_lvls.html | 92 +++-- v0.3.14/reference/h_optimizer_fun.html | 86 +++-- v0.3.14/reference/h_partial_fun_args.html | 95 +++-- v0.3.14/reference/h_print_aic_list.html | 86 +++-- v0.3.14/reference/h_print_call.html | 92 +++-- v0.3.14/reference/h_print_cov.html | 89 +++-- v0.3.14/reference/h_quad_form.html | 102 ++++-- v0.3.14/reference/h_reconcile_cov_struct.html | 89 +++-- v0.3.14/reference/h_record_all_output.html | 103 ++++-- v0.3.14/reference/h_register_s3.html | 99 ++++-- v0.3.14/reference/h_residuals_normalized.html | 86 +++-- v0.3.14/reference/h_residuals_pearson.html | 86 +++-- v0.3.14/reference/h_residuals_response.html | 86 +++-- v0.3.14/reference/h_split_control.html | 93 +++-- v0.3.14/reference/h_summarize_all_fits.html | 86 +++-- v0.3.14/reference/h_tbl_confint_terms.html | 89 +++-- v0.3.14/reference/h_test_1d.html | 96 ++++-- v0.3.14/reference/h_test_md.html | 99 ++++-- .../h_tmb_warn_non_deterministic.html | 80 +++-- v0.3.14/reference/h_tr.html | 86 +++-- v0.3.14/reference/h_valid_formula.html | 86 +++-- v0.3.14/reference/h_var_adj.html | 105 ++++-- v0.3.14/reference/h_warn_na_action.html | 73 ++-- v0.3.14/reference/h_within_or_between.html | 93 +++-- v0.3.14/reference/index.html | 224 ++++++++---- v0.3.14/reference/is_infix.html | 94 +++-- v0.3.14/reference/mmrm-package.html | 99 ++++-- v0.3.14/reference/mmrm.html | 124 ++++--- v0.3.14/reference/mmrm_control.html | 161 ++++++--- v0.3.14/reference/mmrm_methods.html | 122 +++++-- v0.3.14/reference/mmrm_tidiers.html | 123 ++++--- v0.3.14/reference/mmrm_tmb_methods.html | 180 +++++++--- v0.3.14/reference/parsnip_add_mmrm.html | 92 +++-- v0.3.14/reference/position_symbol.html | 96 ++++-- v0.3.14/reference/print.cov_struct.html | 89 +++-- v0.3.14/reference/reexports.html | 80 +++-- .../reference/refit_multiple_optimizers.html | 98 ++++-- v0.3.14/reference/register_on_load.html | 95 +++-- v0.3.14/reference/std_start.html | 98 ++++-- v0.3.14/reference/tmb_cov_type.html | 86 +++-- v0.3.14/reference/validate_cov_struct.html | 86 +++-- v0.3.2/404.html | 16 +- v0.3.2/CONTRIBUTING.html | 325 ++++++++++++------ v0.3.2/PULL_REQUEST_TEMPLATE.html | 70 ++-- v0.3.2/articles/algorithm.html | 16 +- v0.3.2/articles/between_within.html | 16 +- v0.3.2/articles/coef_vcov.html | 16 +- v0.3.2/articles/covariance.html | 16 +- v0.3.2/articles/empirical_wls.html | 16 +- v0.3.2/articles/index.html | 130 +++++-- v0.3.2/articles/introduction.html | 16 +- v0.3.2/articles/kenward.html | 16 +- .../articles/methodological_introduction.html | 16 +- v0.3.2/articles/mmrm_review_methods.html | 16 +- v0.3.2/articles/package_structure.html | 16 +- v0.3.2/articles/predict.html | 16 +- v0.3.2/articles/satterthwaite.html | 16 +- v0.3.2/authors.html | 76 ++-- v0.3.2/index.html | 16 +- v0.3.2/news/index.html | 150 +++++--- v0.3.2/reference/COV_TYPES.html | 84 +++-- v0.3.2/reference/as.cov_struct.html | 129 +++++-- v0.3.2/reference/bcva_data.html | 91 +++-- v0.3.2/reference/cached_mmrm_results.html | 91 +++-- v0.3.2/reference/check_package_version.html | 87 +++-- v0.3.2/reference/component.html | 103 ++++-- v0.3.2/reference/cov_struct.html | 93 +++-- v0.3.2/reference/cov_type_abbr.html | 87 +++-- v0.3.2/reference/cov_type_name.html | 87 +++-- v0.3.2/reference/covariance_types.html | 185 ++++++++-- v0.3.2/reference/df_1d.html | 94 +++-- v0.3.2/reference/df_md.html | 94 +++-- v0.3.2/reference/drop_elements.html | 87 +++-- .../emit_tidymodels_register_msg.html | 78 +++-- v0.3.2/reference/emmeans_support.html | 82 +++-- v0.3.2/reference/fev_data.html | 91 +++-- v0.3.2/reference/fill_names.html | 87 +++-- v0.3.2/reference/fit_mmrm.html | 97 ++++-- v0.3.2/reference/fit_single_optimizer.html | 97 ++++-- v0.3.2/reference/flat_expr.html | 121 +++++-- v0.3.2/reference/format.cov_struct.html | 87 +++-- v0.3.2/reference/format_symbols.html | 91 +++-- v0.3.2/reference/formula_rhs.html | 95 +++-- v0.3.2/reference/h_add_covariance_terms.html | 90 +++-- v0.3.2/reference/h_add_terms.html | 90 +++-- v0.3.2/reference/h_coef_table.html | 87 +++-- v0.3.2/reference/h_confirm_large_levels.html | 88 +++-- .../h_construct_model_frame_inputs.html | 98 ++++-- v0.3.2/reference/h_default_value.html | 95 +++-- v0.3.2/reference/h_df_1d_bw.html | 87 +++-- v0.3.2/reference/h_df_1d_kr.html | 91 +++-- v0.3.2/reference/h_df_1d_res.html | 91 +++-- v0.3.2/reference/h_df_1d_sat.html | 91 +++-- v0.3.2/reference/h_df_bw_calc.html | 94 +++-- v0.3.2/reference/h_df_md_bw.html | 87 +++-- v0.3.2/reference/h_df_md_from_1d.html | 87 +++-- v0.3.2/reference/h_df_md_kr.html | 87 +++-- v0.3.2/reference/h_df_md_res.html | 87 +++-- v0.3.2/reference/h_df_md_sat.html | 87 +++-- v0.3.2/reference/h_df_min_bw.html | 87 +++-- v0.3.2/reference/h_df_to_tibble.html | 93 +++-- v0.3.2/reference/h_drop_covariance_terms.html | 90 +++-- .../reference/h_extract_covariance_terms.html | 87 +++-- v0.3.2/reference/h_factor_ref.html | 87 +++-- v0.3.2/reference/h_get_cov_default.html | 91 +++-- v0.3.2/reference/h_get_empirical.html | 98 ++++-- v0.3.2/reference/h_get_kr_comp.html | 101 ++++-- v0.3.2/reference/h_get_optimizers.html | 102 ++++-- v0.3.2/reference/h_get_prediction.html | 97 ++++-- .../reference/h_get_prediction_variance.html | 84 +++-- v0.3.2/reference/h_get_sim_per_subj.html | 84 +++-- v0.3.2/reference/h_gradient.html | 91 +++-- v0.3.2/reference/h_jac_list.html | 87 +++-- v0.3.2/reference/h_kr_df.html | 98 ++++-- v0.3.2/reference/h_md_denom_df.html | 90 +++-- v0.3.2/reference/h_mmrm_tmb_assert_start.html | 87 +++-- v0.3.2/reference/h_mmrm_tmb_check_conv.html | 87 +++-- v0.3.2/reference/h_mmrm_tmb_data.html | 97 ++++-- v0.3.2/reference/h_mmrm_tmb_extract_cov.html | 91 +++-- v0.3.2/reference/h_mmrm_tmb_fit.html | 101 ++++-- .../reference/h_mmrm_tmb_formula_parts.html | 94 +++-- v0.3.2/reference/h_mmrm_tmb_parameters.html | 87 +++-- v0.3.2/reference/h_newdata_add_pred.html | 87 +++-- v0.3.2/reference/h_optimizer_fun.html | 87 +++-- v0.3.2/reference/h_partial_fun_args.html | 90 +++-- v0.3.2/reference/h_print_aic_list.html | 84 +++-- v0.3.2/reference/h_print_call.html | 84 +++-- v0.3.2/reference/h_print_cov.html | 84 +++-- v0.3.2/reference/h_quad_form.html | 97 ++++-- v0.3.2/reference/h_reconcile_cov_struct.html | 87 +++-- v0.3.2/reference/h_record_all_output.html | 98 ++++-- v0.3.2/reference/h_residuals_normalized.html | 87 +++-- v0.3.2/reference/h_residuals_pearson.html | 87 +++-- v0.3.2/reference/h_residuals_response.html | 87 +++-- v0.3.2/reference/h_split_control.html | 91 +++-- v0.3.2/reference/h_summarize_all_fits.html | 87 +++-- v0.3.2/reference/h_tbl_confint_terms.html | 87 +++-- v0.3.2/reference/h_test_1d.html | 91 +++-- v0.3.2/reference/h_test_md.html | 91 +++-- v0.3.2/reference/h_tr.html | 87 +++-- v0.3.2/reference/h_valid_formula.html | 87 +++-- v0.3.2/reference/h_var_adj.html | 91 +++-- v0.3.2/reference/h_warn_na_action.html | 75 ++-- v0.3.2/reference/h_within_or_between.html | 91 +++-- v0.3.2/reference/index.html | 209 +++++++---- v0.3.2/reference/is_infix.html | 95 +++-- v0.3.2/reference/mmrm-package.html | 101 ++++-- v0.3.2/reference/mmrm.html | 107 ++++-- v0.3.2/reference/mmrm_control.html | 104 ++++-- v0.3.2/reference/mmrm_methods.html | 120 +++++-- v0.3.2/reference/mmrm_tidiers.html | 103 ++++-- v0.3.2/reference/mmrm_tmb_methods.html | 118 +++++-- v0.3.2/reference/parsnip_add_mmrm.html | 93 +++-- v0.3.2/reference/position_symbol.html | 91 +++-- v0.3.2/reference/print.cov_struct.html | 87 +++-- v0.3.2/reference/reexports.html | 82 +++-- .../reference/refit_multiple_optimizers.html | 93 +++-- v0.3.2/reference/register_on_load.html | 87 +++-- v0.3.2/reference/tmb_cov_type.html | 87 +++-- v0.3.2/reference/validate_cov_struct.html | 87 +++-- v0.3.3/404.html | 16 +- v0.3.3/CONTRIBUTING.html | 325 ++++++++++++------ v0.3.3/PULL_REQUEST_TEMPLATE.html | 70 ++-- v0.3.3/articles/algorithm.html | 16 +- v0.3.3/articles/between_within.html | 16 +- v0.3.3/articles/coef_vcov.html | 16 +- v0.3.3/articles/covariance.html | 16 +- v0.3.3/articles/empirical_wls.html | 16 +- v0.3.3/articles/index.html | 130 +++++-- v0.3.3/articles/introduction.html | 16 +- v0.3.3/articles/kenward.html | 16 +- .../articles/methodological_introduction.html | 16 +- v0.3.3/articles/mmrm_review_methods.html | 16 +- v0.3.3/articles/package_structure.html | 16 +- v0.3.3/articles/predict.html | 16 +- v0.3.3/articles/satterthwaite.html | 16 +- v0.3.3/authors.html | 76 ++-- v0.3.3/index.html | 16 +- v0.3.3/news/index.html | 150 +++++--- v0.3.3/reference/COV_TYPES.html | 84 +++-- v0.3.3/reference/as.cov_struct.html | 129 +++++-- v0.3.3/reference/bcva_data.html | 91 +++-- v0.3.3/reference/cached_mmrm_results.html | 91 +++-- v0.3.3/reference/check_package_version.html | 87 +++-- v0.3.3/reference/component.html | 103 ++++-- v0.3.3/reference/cov_struct.html | 93 +++-- v0.3.3/reference/cov_type_abbr.html | 87 +++-- v0.3.3/reference/cov_type_name.html | 87 +++-- v0.3.3/reference/covariance_types.html | 185 ++++++++-- v0.3.3/reference/df_1d.html | 94 +++-- v0.3.3/reference/df_md.html | 94 +++-- v0.3.3/reference/drop_elements.html | 87 +++-- .../emit_tidymodels_register_msg.html | 78 +++-- v0.3.3/reference/emmeans_support.html | 82 +++-- v0.3.3/reference/fev_data.html | 91 +++-- v0.3.3/reference/fill_names.html | 87 +++-- v0.3.3/reference/fit_mmrm.html | 97 ++++-- v0.3.3/reference/fit_single_optimizer.html | 97 ++++-- v0.3.3/reference/flat_expr.html | 121 +++++-- v0.3.3/reference/format.cov_struct.html | 87 +++-- v0.3.3/reference/format_symbols.html | 91 +++-- v0.3.3/reference/formula_rhs.html | 95 +++-- v0.3.3/reference/h_add_covariance_terms.html | 90 +++-- v0.3.3/reference/h_add_terms.html | 90 +++-- v0.3.3/reference/h_coef_table.html | 87 +++-- v0.3.3/reference/h_confirm_large_levels.html | 88 +++-- .../h_construct_model_frame_inputs.html | 98 ++++-- v0.3.3/reference/h_default_value.html | 95 +++-- v0.3.3/reference/h_df_1d_bw.html | 87 +++-- v0.3.3/reference/h_df_1d_kr.html | 91 +++-- v0.3.3/reference/h_df_1d_res.html | 91 +++-- v0.3.3/reference/h_df_1d_sat.html | 91 +++-- v0.3.3/reference/h_df_bw_calc.html | 94 +++-- v0.3.3/reference/h_df_md_bw.html | 87 +++-- v0.3.3/reference/h_df_md_from_1d.html | 87 +++-- v0.3.3/reference/h_df_md_kr.html | 87 +++-- v0.3.3/reference/h_df_md_res.html | 87 +++-- v0.3.3/reference/h_df_md_sat.html | 87 +++-- v0.3.3/reference/h_df_min_bw.html | 87 +++-- v0.3.3/reference/h_df_to_tibble.html | 93 +++-- v0.3.3/reference/h_drop_covariance_terms.html | 90 +++-- .../reference/h_extract_covariance_terms.html | 87 +++-- v0.3.3/reference/h_factor_ref.html | 87 +++-- v0.3.3/reference/h_get_cov_default.html | 91 +++-- v0.3.3/reference/h_get_empirical.html | 98 ++++-- v0.3.3/reference/h_get_kr_comp.html | 101 ++++-- v0.3.3/reference/h_get_optimizers.html | 102 ++++-- v0.3.3/reference/h_get_prediction.html | 97 ++++-- .../reference/h_get_prediction_variance.html | 84 +++-- v0.3.3/reference/h_get_sim_per_subj.html | 84 +++-- v0.3.3/reference/h_gradient.html | 91 +++-- v0.3.3/reference/h_jac_list.html | 87 +++-- v0.3.3/reference/h_kr_df.html | 98 ++++-- v0.3.3/reference/h_md_denom_df.html | 90 +++-- v0.3.3/reference/h_mmrm_tmb_assert_start.html | 87 +++-- v0.3.3/reference/h_mmrm_tmb_check_conv.html | 87 +++-- v0.3.3/reference/h_mmrm_tmb_data.html | 97 ++++-- v0.3.3/reference/h_mmrm_tmb_extract_cov.html | 91 +++-- v0.3.3/reference/h_mmrm_tmb_fit.html | 101 ++++-- .../reference/h_mmrm_tmb_formula_parts.html | 94 +++-- v0.3.3/reference/h_mmrm_tmb_parameters.html | 87 +++-- v0.3.3/reference/h_newdata_add_pred.html | 87 +++-- v0.3.3/reference/h_optimizer_fun.html | 87 +++-- v0.3.3/reference/h_partial_fun_args.html | 90 +++-- v0.3.3/reference/h_print_aic_list.html | 84 +++-- v0.3.3/reference/h_print_call.html | 84 +++-- v0.3.3/reference/h_print_cov.html | 84 +++-- v0.3.3/reference/h_quad_form.html | 97 ++++-- v0.3.3/reference/h_reconcile_cov_struct.html | 87 +++-- v0.3.3/reference/h_record_all_output.html | 98 ++++-- v0.3.3/reference/h_residuals_normalized.html | 87 +++-- v0.3.3/reference/h_residuals_pearson.html | 87 +++-- v0.3.3/reference/h_residuals_response.html | 87 +++-- v0.3.3/reference/h_split_control.html | 91 +++-- v0.3.3/reference/h_summarize_all_fits.html | 87 +++-- v0.3.3/reference/h_tbl_confint_terms.html | 87 +++-- v0.3.3/reference/h_test_1d.html | 91 +++-- v0.3.3/reference/h_test_md.html | 91 +++-- v0.3.3/reference/h_tr.html | 87 +++-- v0.3.3/reference/h_valid_formula.html | 87 +++-- v0.3.3/reference/h_var_adj.html | 91 +++-- v0.3.3/reference/h_warn_na_action.html | 75 ++-- v0.3.3/reference/h_within_or_between.html | 91 +++-- v0.3.3/reference/index.html | 209 +++++++---- v0.3.3/reference/is_infix.html | 95 +++-- v0.3.3/reference/mmrm-package.html | 101 ++++-- v0.3.3/reference/mmrm.html | 107 ++++-- v0.3.3/reference/mmrm_control.html | 104 ++++-- v0.3.3/reference/mmrm_methods.html | 120 +++++-- v0.3.3/reference/mmrm_tidiers.html | 103 ++++-- v0.3.3/reference/mmrm_tmb_methods.html | 118 +++++-- v0.3.3/reference/parsnip_add_mmrm.html | 93 +++-- v0.3.3/reference/position_symbol.html | 91 +++-- v0.3.3/reference/print.cov_struct.html | 87 +++-- v0.3.3/reference/reexports.html | 82 +++-- .../reference/refit_multiple_optimizers.html | 93 +++-- v0.3.3/reference/register_on_load.html | 87 +++-- v0.3.3/reference/tmb_cov_type.html | 87 +++-- v0.3.3/reference/validate_cov_struct.html | 87 +++-- v0.3.4/404.html | 16 +- v0.3.4/CONTRIBUTING.html | 325 ++++++++++++------ v0.3.4/PULL_REQUEST_TEMPLATE.html | 70 ++-- v0.3.4/articles/algorithm.html | 16 +- v0.3.4/articles/between_within.html | 16 +- v0.3.4/articles/coef_vcov.html | 16 +- v0.3.4/articles/covariance.html | 16 +- v0.3.4/articles/empirical_wls.html | 16 +- v0.3.4/articles/index.html | 130 +++++-- v0.3.4/articles/introduction.html | 16 +- v0.3.4/articles/kenward.html | 16 +- .../articles/methodological_introduction.html | 16 +- v0.3.4/articles/mmrm_review_methods.html | 16 +- v0.3.4/articles/package_structure.html | 16 +- v0.3.4/articles/predict.html | 16 +- v0.3.4/articles/satterthwaite.html | 16 +- v0.3.4/authors.html | 76 ++-- v0.3.4/index.html | 16 +- v0.3.4/news/index.html | 150 +++++--- v0.3.4/reference/COV_TYPES.html | 84 +++-- v0.3.4/reference/as.cov_struct.html | 129 +++++-- v0.3.4/reference/bcva_data.html | 91 +++-- v0.3.4/reference/cached_mmrm_results.html | 91 +++-- v0.3.4/reference/check_package_version.html | 87 +++-- v0.3.4/reference/component.html | 103 ++++-- v0.3.4/reference/cov_struct.html | 93 +++-- v0.3.4/reference/cov_type_abbr.html | 87 +++-- v0.3.4/reference/cov_type_name.html | 87 +++-- v0.3.4/reference/covariance_types.html | 185 ++++++++-- v0.3.4/reference/df_1d.html | 94 +++-- v0.3.4/reference/df_md.html | 94 +++-- v0.3.4/reference/drop_elements.html | 87 +++-- .../emit_tidymodels_register_msg.html | 78 +++-- v0.3.4/reference/emmeans_support.html | 82 +++-- v0.3.4/reference/fev_data.html | 91 +++-- v0.3.4/reference/fill_names.html | 87 +++-- v0.3.4/reference/fit_mmrm.html | 97 ++++-- v0.3.4/reference/fit_single_optimizer.html | 97 ++++-- v0.3.4/reference/flat_expr.html | 121 +++++-- v0.3.4/reference/format.cov_struct.html | 87 +++-- v0.3.4/reference/format_symbols.html | 91 +++-- v0.3.4/reference/formula_rhs.html | 95 +++-- v0.3.4/reference/h_add_covariance_terms.html | 90 +++-- v0.3.4/reference/h_add_terms.html | 90 +++-- v0.3.4/reference/h_coef_table.html | 87 +++-- v0.3.4/reference/h_confirm_large_levels.html | 88 +++-- .../h_construct_model_frame_inputs.html | 98 ++++-- v0.3.4/reference/h_default_value.html | 95 +++-- v0.3.4/reference/h_df_1d_bw.html | 87 +++-- v0.3.4/reference/h_df_1d_kr.html | 91 +++-- v0.3.4/reference/h_df_1d_res.html | 91 +++-- v0.3.4/reference/h_df_1d_sat.html | 91 +++-- v0.3.4/reference/h_df_bw_calc.html | 94 +++-- v0.3.4/reference/h_df_md_bw.html | 87 +++-- v0.3.4/reference/h_df_md_from_1d.html | 87 +++-- v0.3.4/reference/h_df_md_kr.html | 87 +++-- v0.3.4/reference/h_df_md_res.html | 87 +++-- v0.3.4/reference/h_df_md_sat.html | 87 +++-- v0.3.4/reference/h_df_min_bw.html | 87 +++-- v0.3.4/reference/h_df_to_tibble.html | 93 +++-- v0.3.4/reference/h_drop_covariance_terms.html | 90 +++-- .../reference/h_extract_covariance_terms.html | 87 +++-- v0.3.4/reference/h_factor_ref.html | 87 +++-- v0.3.4/reference/h_get_cov_default.html | 91 +++-- v0.3.4/reference/h_get_empirical.html | 98 ++++-- v0.3.4/reference/h_get_kr_comp.html | 101 ++++-- v0.3.4/reference/h_get_optimizers.html | 102 ++++-- v0.3.4/reference/h_get_prediction.html | 97 ++++-- .../reference/h_get_prediction_variance.html | 84 +++-- v0.3.4/reference/h_get_sim_per_subj.html | 84 +++-- v0.3.4/reference/h_gradient.html | 91 +++-- v0.3.4/reference/h_jac_list.html | 87 +++-- v0.3.4/reference/h_kr_df.html | 98 ++++-- v0.3.4/reference/h_md_denom_df.html | 90 +++-- v0.3.4/reference/h_mmrm_tmb_assert_start.html | 87 +++-- v0.3.4/reference/h_mmrm_tmb_check_conv.html | 87 +++-- v0.3.4/reference/h_mmrm_tmb_data.html | 97 ++++-- v0.3.4/reference/h_mmrm_tmb_extract_cov.html | 91 +++-- v0.3.4/reference/h_mmrm_tmb_fit.html | 101 ++++-- .../reference/h_mmrm_tmb_formula_parts.html | 94 +++-- v0.3.4/reference/h_mmrm_tmb_parameters.html | 87 +++-- v0.3.4/reference/h_newdata_add_pred.html | 87 +++-- v0.3.4/reference/h_optimizer_fun.html | 87 +++-- v0.3.4/reference/h_partial_fun_args.html | 90 +++-- v0.3.4/reference/h_print_aic_list.html | 84 +++-- v0.3.4/reference/h_print_call.html | 84 +++-- v0.3.4/reference/h_print_cov.html | 84 +++-- v0.3.4/reference/h_quad_form.html | 97 ++++-- v0.3.4/reference/h_reconcile_cov_struct.html | 87 +++-- v0.3.4/reference/h_record_all_output.html | 98 ++++-- v0.3.4/reference/h_residuals_normalized.html | 87 +++-- v0.3.4/reference/h_residuals_pearson.html | 87 +++-- v0.3.4/reference/h_residuals_response.html | 87 +++-- v0.3.4/reference/h_split_control.html | 91 +++-- v0.3.4/reference/h_summarize_all_fits.html | 87 +++-- v0.3.4/reference/h_tbl_confint_terms.html | 87 +++-- v0.3.4/reference/h_test_1d.html | 91 +++-- v0.3.4/reference/h_test_md.html | 91 +++-- v0.3.4/reference/h_tr.html | 87 +++-- v0.3.4/reference/h_valid_formula.html | 87 +++-- v0.3.4/reference/h_var_adj.html | 91 +++-- v0.3.4/reference/h_warn_na_action.html | 75 ++-- v0.3.4/reference/h_within_or_between.html | 91 +++-- v0.3.4/reference/index.html | 209 +++++++---- v0.3.4/reference/is_infix.html | 95 +++-- v0.3.4/reference/mmrm-package.html | 101 ++++-- v0.3.4/reference/mmrm.html | 107 ++++-- v0.3.4/reference/mmrm_control.html | 104 ++++-- v0.3.4/reference/mmrm_methods.html | 120 +++++-- v0.3.4/reference/mmrm_tidiers.html | 103 ++++-- v0.3.4/reference/mmrm_tmb_methods.html | 118 +++++-- v0.3.4/reference/parsnip_add_mmrm.html | 93 +++-- v0.3.4/reference/position_symbol.html | 91 +++-- v0.3.4/reference/print.cov_struct.html | 87 +++-- v0.3.4/reference/reexports.html | 82 +++-- .../reference/refit_multiple_optimizers.html | 93 +++-- v0.3.4/reference/register_on_load.html | 87 +++-- v0.3.4/reference/tmb_cov_type.html | 87 +++-- v0.3.4/reference/validate_cov_struct.html | 87 +++-- v0.3.5/404.html | 16 +- v0.3.5/CONTRIBUTING.html | 325 ++++++++++++------ v0.3.5/PULL_REQUEST_TEMPLATE.html | 70 ++-- v0.3.5/articles/algorithm.html | 16 +- v0.3.5/articles/between_within.html | 16 +- v0.3.5/articles/coef_vcov.html | 16 +- v0.3.5/articles/covariance.html | 16 +- v0.3.5/articles/empirical_wls.html | 16 +- v0.3.5/articles/index.html | 130 +++++-- v0.3.5/articles/introduction.html | 16 +- v0.3.5/articles/kenward.html | 16 +- .../articles/methodological_introduction.html | 16 +- v0.3.5/articles/mmrm_review_methods.html | 16 +- v0.3.5/articles/package_structure.html | 16 +- v0.3.5/articles/predict.html | 16 +- v0.3.5/articles/satterthwaite.html | 16 +- v0.3.5/authors.html | 76 ++-- v0.3.5/index.html | 16 +- v0.3.5/news/index.html | 150 +++++--- v0.3.5/reference/COV_TYPES.html | 84 +++-- v0.3.5/reference/as.cov_struct.html | 129 +++++-- v0.3.5/reference/bcva_data.html | 91 +++-- v0.3.5/reference/cached_mmrm_results.html | 91 +++-- v0.3.5/reference/check_package_version.html | 87 +++-- v0.3.5/reference/component.html | 103 ++++-- v0.3.5/reference/cov_struct.html | 93 +++-- v0.3.5/reference/cov_type_abbr.html | 87 +++-- v0.3.5/reference/cov_type_name.html | 87 +++-- v0.3.5/reference/covariance_types.html | 185 ++++++++-- v0.3.5/reference/df_1d.html | 94 +++-- v0.3.5/reference/df_md.html | 94 +++-- v0.3.5/reference/drop_elements.html | 87 +++-- .../emit_tidymodels_register_msg.html | 78 +++-- v0.3.5/reference/emmeans_support.html | 82 +++-- v0.3.5/reference/fev_data.html | 91 +++-- v0.3.5/reference/fill_names.html | 87 +++-- v0.3.5/reference/fit_mmrm.html | 97 ++++-- v0.3.5/reference/fit_single_optimizer.html | 97 ++++-- v0.3.5/reference/flat_expr.html | 121 +++++-- v0.3.5/reference/format.cov_struct.html | 87 +++-- v0.3.5/reference/format_symbols.html | 91 +++-- v0.3.5/reference/formula_rhs.html | 95 +++-- v0.3.5/reference/h_add_covariance_terms.html | 90 +++-- v0.3.5/reference/h_add_terms.html | 90 +++-- v0.3.5/reference/h_coef_table.html | 87 +++-- v0.3.5/reference/h_confirm_large_levels.html | 88 +++-- .../h_construct_model_frame_inputs.html | 98 ++++-- v0.3.5/reference/h_default_value.html | 95 +++-- v0.3.5/reference/h_df_1d_bw.html | 87 +++-- v0.3.5/reference/h_df_1d_kr.html | 91 +++-- v0.3.5/reference/h_df_1d_res.html | 91 +++-- v0.3.5/reference/h_df_1d_sat.html | 91 +++-- v0.3.5/reference/h_df_bw_calc.html | 94 +++-- v0.3.5/reference/h_df_md_bw.html | 87 +++-- v0.3.5/reference/h_df_md_from_1d.html | 87 +++-- v0.3.5/reference/h_df_md_kr.html | 87 +++-- v0.3.5/reference/h_df_md_res.html | 87 +++-- v0.3.5/reference/h_df_md_sat.html | 87 +++-- v0.3.5/reference/h_df_min_bw.html | 87 +++-- v0.3.5/reference/h_df_to_tibble.html | 93 +++-- v0.3.5/reference/h_drop_covariance_terms.html | 90 +++-- .../reference/h_extract_covariance_terms.html | 87 +++-- v0.3.5/reference/h_factor_ref.html | 87 +++-- v0.3.5/reference/h_get_cov_default.html | 91 +++-- v0.3.5/reference/h_get_empirical.html | 98 ++++-- v0.3.5/reference/h_get_kr_comp.html | 101 ++++-- v0.3.5/reference/h_get_optimizers.html | 102 ++++-- v0.3.5/reference/h_get_prediction.html | 97 ++++-- .../reference/h_get_prediction_variance.html | 84 +++-- v0.3.5/reference/h_get_sim_per_subj.html | 84 +++-- v0.3.5/reference/h_gradient.html | 91 +++-- v0.3.5/reference/h_jac_list.html | 87 +++-- v0.3.5/reference/h_kr_df.html | 98 ++++-- v0.3.5/reference/h_md_denom_df.html | 90 +++-- v0.3.5/reference/h_mmrm_tmb_assert_start.html | 87 +++-- v0.3.5/reference/h_mmrm_tmb_check_conv.html | 87 +++-- v0.3.5/reference/h_mmrm_tmb_data.html | 97 ++++-- v0.3.5/reference/h_mmrm_tmb_extract_cov.html | 91 +++-- v0.3.5/reference/h_mmrm_tmb_fit.html | 101 ++++-- .../reference/h_mmrm_tmb_formula_parts.html | 94 +++-- v0.3.5/reference/h_mmrm_tmb_parameters.html | 87 +++-- v0.3.5/reference/h_newdata_add_pred.html | 87 +++-- v0.3.5/reference/h_optimizer_fun.html | 87 +++-- v0.3.5/reference/h_partial_fun_args.html | 90 +++-- v0.3.5/reference/h_print_aic_list.html | 84 +++-- v0.3.5/reference/h_print_call.html | 84 +++-- v0.3.5/reference/h_print_cov.html | 84 +++-- v0.3.5/reference/h_quad_form.html | 97 ++++-- v0.3.5/reference/h_reconcile_cov_struct.html | 87 +++-- v0.3.5/reference/h_record_all_output.html | 98 ++++-- v0.3.5/reference/h_residuals_normalized.html | 87 +++-- v0.3.5/reference/h_residuals_pearson.html | 87 +++-- v0.3.5/reference/h_residuals_response.html | 87 +++-- v0.3.5/reference/h_split_control.html | 91 +++-- v0.3.5/reference/h_summarize_all_fits.html | 87 +++-- v0.3.5/reference/h_tbl_confint_terms.html | 87 +++-- v0.3.5/reference/h_test_1d.html | 91 +++-- v0.3.5/reference/h_test_md.html | 91 +++-- v0.3.5/reference/h_tr.html | 87 +++-- v0.3.5/reference/h_valid_formula.html | 87 +++-- v0.3.5/reference/h_var_adj.html | 91 +++-- v0.3.5/reference/h_warn_na_action.html | 75 ++-- v0.3.5/reference/h_within_or_between.html | 91 +++-- v0.3.5/reference/index.html | 209 +++++++---- v0.3.5/reference/is_infix.html | 95 +++-- v0.3.5/reference/mmrm-package.html | 101 ++++-- v0.3.5/reference/mmrm.html | 107 ++++-- v0.3.5/reference/mmrm_control.html | 141 ++++++-- v0.3.5/reference/mmrm_methods.html | 120 +++++-- v0.3.5/reference/mmrm_tidiers.html | 103 ++++-- v0.3.5/reference/mmrm_tmb_methods.html | 118 +++++-- v0.3.5/reference/parsnip_add_mmrm.html | 93 +++-- v0.3.5/reference/position_symbol.html | 91 +++-- v0.3.5/reference/print.cov_struct.html | 87 +++-- v0.3.5/reference/reexports.html | 82 +++-- .../reference/refit_multiple_optimizers.html | 93 +++-- v0.3.5/reference/register_on_load.html | 87 +++-- v0.3.5/reference/tmb_cov_type.html | 87 +++-- v0.3.5/reference/validate_cov_struct.html | 87 +++-- v0.3.6/404.html | 16 +- v0.3.6/CONTRIBUTING.html | 325 ++++++++++++------ v0.3.6/PULL_REQUEST_TEMPLATE.html | 70 ++-- v0.3.6/articles/algorithm.html | 16 +- v0.3.6/articles/between_within.html | 16 +- v0.3.6/articles/coef_vcov.html | 16 +- v0.3.6/articles/covariance.html | 16 +- v0.3.6/articles/empirical_wls.html | 16 +- v0.3.6/articles/index.html | 130 +++++-- v0.3.6/articles/introduction.html | 16 +- v0.3.6/articles/kenward.html | 16 +- .../articles/methodological_introduction.html | 16 +- v0.3.6/articles/mmrm_review_methods.html | 16 +- v0.3.6/articles/package_structure.html | 16 +- v0.3.6/articles/predict.html | 16 +- v0.3.6/articles/satterthwaite.html | 16 +- v0.3.6/authors.html | 76 ++-- v0.3.6/index.html | 16 +- v0.3.6/news/index.html | 150 +++++--- v0.3.6/reference/COV_TYPES.html | 84 +++-- v0.3.6/reference/as.cov_struct.html | 129 +++++-- v0.3.6/reference/bcva_data.html | 91 +++-- v0.3.6/reference/cached_mmrm_results.html | 91 +++-- v0.3.6/reference/check_package_version.html | 87 +++-- v0.3.6/reference/component.html | 103 ++++-- v0.3.6/reference/cov_struct.html | 93 +++-- v0.3.6/reference/cov_type_abbr.html | 87 +++-- v0.3.6/reference/cov_type_name.html | 87 +++-- v0.3.6/reference/covariance_types.html | 185 ++++++++-- v0.3.6/reference/df_1d.html | 94 +++-- v0.3.6/reference/df_md.html | 94 +++-- v0.3.6/reference/drop_elements.html | 87 +++-- .../emit_tidymodels_register_msg.html | 78 +++-- v0.3.6/reference/emmeans_support.html | 82 +++-- v0.3.6/reference/fev_data.html | 91 +++-- v0.3.6/reference/fill_names.html | 87 +++-- v0.3.6/reference/fit_mmrm.html | 97 ++++-- v0.3.6/reference/fit_single_optimizer.html | 97 ++++-- v0.3.6/reference/flat_expr.html | 121 +++++-- v0.3.6/reference/format.cov_struct.html | 87 +++-- v0.3.6/reference/format_symbols.html | 91 +++-- v0.3.6/reference/formula_rhs.html | 95 +++-- v0.3.6/reference/h_add_covariance_terms.html | 90 +++-- v0.3.6/reference/h_add_terms.html | 90 +++-- v0.3.6/reference/h_coef_table.html | 87 +++-- v0.3.6/reference/h_confirm_large_levels.html | 88 +++-- .../h_construct_model_frame_inputs.html | 98 ++++-- v0.3.6/reference/h_default_value.html | 95 +++-- v0.3.6/reference/h_df_1d_bw.html | 87 +++-- v0.3.6/reference/h_df_1d_kr.html | 91 +++-- v0.3.6/reference/h_df_1d_res.html | 91 +++-- v0.3.6/reference/h_df_1d_sat.html | 91 +++-- v0.3.6/reference/h_df_bw_calc.html | 94 +++-- v0.3.6/reference/h_df_md_bw.html | 87 +++-- v0.3.6/reference/h_df_md_from_1d.html | 87 +++-- v0.3.6/reference/h_df_md_kr.html | 87 +++-- v0.3.6/reference/h_df_md_res.html | 87 +++-- v0.3.6/reference/h_df_md_sat.html | 87 +++-- v0.3.6/reference/h_df_min_bw.html | 87 +++-- v0.3.6/reference/h_df_to_tibble.html | 93 +++-- v0.3.6/reference/h_drop_covariance_terms.html | 90 +++-- .../reference/h_extract_covariance_terms.html | 87 +++-- v0.3.6/reference/h_factor_ref.html | 87 +++-- v0.3.6/reference/h_get_cov_default.html | 91 +++-- v0.3.6/reference/h_get_empirical.html | 98 ++++-- v0.3.6/reference/h_get_kr_comp.html | 101 ++++-- v0.3.6/reference/h_get_optimizers.html | 102 ++++-- v0.3.6/reference/h_get_prediction.html | 97 ++++-- .../reference/h_get_prediction_variance.html | 84 +++-- v0.3.6/reference/h_get_sim_per_subj.html | 84 +++-- v0.3.6/reference/h_gradient.html | 91 +++-- v0.3.6/reference/h_jac_list.html | 87 +++-- v0.3.6/reference/h_kr_df.html | 98 ++++-- v0.3.6/reference/h_md_denom_df.html | 90 +++-- v0.3.6/reference/h_mmrm_tmb_assert_start.html | 87 +++-- v0.3.6/reference/h_mmrm_tmb_check_conv.html | 87 +++-- v0.3.6/reference/h_mmrm_tmb_data.html | 97 ++++-- v0.3.6/reference/h_mmrm_tmb_extract_cov.html | 91 +++-- v0.3.6/reference/h_mmrm_tmb_fit.html | 101 ++++-- .../reference/h_mmrm_tmb_formula_parts.html | 94 +++-- v0.3.6/reference/h_mmrm_tmb_parameters.html | 87 +++-- v0.3.6/reference/h_newdata_add_pred.html | 87 +++-- v0.3.6/reference/h_optimizer_fun.html | 87 +++-- v0.3.6/reference/h_partial_fun_args.html | 90 +++-- v0.3.6/reference/h_print_aic_list.html | 84 +++-- v0.3.6/reference/h_print_call.html | 84 +++-- v0.3.6/reference/h_print_cov.html | 84 +++-- v0.3.6/reference/h_quad_form.html | 97 ++++-- v0.3.6/reference/h_reconcile_cov_struct.html | 87 +++-- v0.3.6/reference/h_record_all_output.html | 98 ++++-- v0.3.6/reference/h_residuals_normalized.html | 87 +++-- v0.3.6/reference/h_residuals_pearson.html | 87 +++-- v0.3.6/reference/h_residuals_response.html | 87 +++-- v0.3.6/reference/h_split_control.html | 91 +++-- v0.3.6/reference/h_summarize_all_fits.html | 87 +++-- v0.3.6/reference/h_tbl_confint_terms.html | 87 +++-- v0.3.6/reference/h_test_1d.html | 91 +++-- v0.3.6/reference/h_test_md.html | 91 +++-- v0.3.6/reference/h_tr.html | 87 +++-- v0.3.6/reference/h_valid_formula.html | 87 +++-- v0.3.6/reference/h_var_adj.html | 91 +++-- v0.3.6/reference/h_warn_na_action.html | 75 ++-- v0.3.6/reference/h_within_or_between.html | 91 +++-- v0.3.6/reference/index.html | 209 +++++++---- v0.3.6/reference/is_infix.html | 95 +++-- v0.3.6/reference/mmrm-package.html | 101 ++++-- v0.3.6/reference/mmrm.html | 107 ++++-- v0.3.6/reference/mmrm_control.html | 141 ++++++-- v0.3.6/reference/mmrm_methods.html | 120 +++++-- v0.3.6/reference/mmrm_tidiers.html | 103 ++++-- v0.3.6/reference/mmrm_tmb_methods.html | 118 +++++-- v0.3.6/reference/parsnip_add_mmrm.html | 93 +++-- v0.3.6/reference/position_symbol.html | 91 +++-- v0.3.6/reference/print.cov_struct.html | 87 +++-- v0.3.6/reference/reexports.html | 82 +++-- .../reference/refit_multiple_optimizers.html | 93 +++-- v0.3.6/reference/register_on_load.html | 87 +++-- v0.3.6/reference/tmb_cov_type.html | 87 +++-- v0.3.6/reference/validate_cov_struct.html | 87 +++-- v0.3.7/404.html | 16 +- v0.3.7/CONTRIBUTING.html | 325 ++++++++++++------ v0.3.7/PULL_REQUEST_TEMPLATE.html | 70 ++-- v0.3.7/articles/algorithm.html | 16 +- v0.3.7/articles/between_within.html | 16 +- v0.3.7/articles/coef_vcov.html | 16 +- v0.3.7/articles/covariance.html | 16 +- v0.3.7/articles/empirical_wls.html | 16 +- v0.3.7/articles/index.html | 130 +++++-- v0.3.7/articles/introduction.html | 16 +- v0.3.7/articles/kenward.html | 16 +- .../articles/methodological_introduction.html | 16 +- v0.3.7/articles/mmrm_review_methods.html | 16 +- v0.3.7/articles/package_structure.html | 16 +- v0.3.7/articles/predict.html | 16 +- v0.3.7/articles/satterthwaite.html | 16 +- v0.3.7/authors.html | 76 ++-- v0.3.7/index.html | 16 +- v0.3.7/news/index.html | 163 ++++++--- v0.3.7/reference/COV_TYPES.html | 84 +++-- v0.3.7/reference/as.cov_struct.html | 129 +++++-- v0.3.7/reference/bcva_data.html | 91 +++-- v0.3.7/reference/cached_mmrm_results.html | 91 +++-- v0.3.7/reference/check_package_version.html | 87 +++-- v0.3.7/reference/component.html | 103 ++++-- v0.3.7/reference/cov_struct.html | 93 +++-- v0.3.7/reference/cov_type_abbr.html | 87 +++-- v0.3.7/reference/cov_type_name.html | 87 +++-- v0.3.7/reference/covariance_types.html | 185 ++++++++-- v0.3.7/reference/df_1d.html | 94 +++-- v0.3.7/reference/df_md.html | 94 +++-- v0.3.7/reference/drop_elements.html | 87 +++-- .../emit_tidymodels_register_msg.html | 78 +++-- v0.3.7/reference/emmeans_support.html | 82 +++-- v0.3.7/reference/fev_data.html | 91 +++-- v0.3.7/reference/fill_names.html | 87 +++-- v0.3.7/reference/fit_mmrm.html | 97 ++++-- v0.3.7/reference/fit_single_optimizer.html | 97 ++++-- v0.3.7/reference/flat_expr.html | 121 +++++-- v0.3.7/reference/format.cov_struct.html | 87 +++-- v0.3.7/reference/format_symbols.html | 91 +++-- v0.3.7/reference/formula_rhs.html | 95 +++-- v0.3.7/reference/h_add_covariance_terms.html | 90 +++-- v0.3.7/reference/h_add_terms.html | 90 +++-- v0.3.7/reference/h_coef_table.html | 87 +++-- v0.3.7/reference/h_confirm_large_levels.html | 88 +++-- .../h_construct_model_frame_inputs.html | 98 ++++-- v0.3.7/reference/h_default_value.html | 95 +++-- v0.3.7/reference/h_df_1d_bw.html | 87 +++-- v0.3.7/reference/h_df_1d_kr.html | 91 +++-- v0.3.7/reference/h_df_1d_res.html | 91 +++-- v0.3.7/reference/h_df_1d_sat.html | 91 +++-- v0.3.7/reference/h_df_bw_calc.html | 94 +++-- v0.3.7/reference/h_df_md_bw.html | 87 +++-- v0.3.7/reference/h_df_md_from_1d.html | 87 +++-- v0.3.7/reference/h_df_md_kr.html | 87 +++-- v0.3.7/reference/h_df_md_res.html | 87 +++-- v0.3.7/reference/h_df_md_sat.html | 87 +++-- v0.3.7/reference/h_df_min_bw.html | 87 +++-- v0.3.7/reference/h_df_to_tibble.html | 93 +++-- v0.3.7/reference/h_drop_covariance_terms.html | 90 +++-- .../reference/h_extract_covariance_terms.html | 87 +++-- v0.3.7/reference/h_factor_ref.html | 87 +++-- v0.3.7/reference/h_get_cov_default.html | 91 +++-- v0.3.7/reference/h_get_empirical.html | 98 ++++-- v0.3.7/reference/h_get_kr_comp.html | 101 ++++-- v0.3.7/reference/h_get_optimizers.html | 102 ++++-- v0.3.7/reference/h_get_prediction.html | 97 ++++-- .../reference/h_get_prediction_variance.html | 84 +++-- v0.3.7/reference/h_get_sim_per_subj.html | 84 +++-- v0.3.7/reference/h_gradient.html | 91 +++-- v0.3.7/reference/h_jac_list.html | 87 +++-- v0.3.7/reference/h_kr_df.html | 98 ++++-- v0.3.7/reference/h_md_denom_df.html | 90 +++-- v0.3.7/reference/h_mmrm_tmb_assert_start.html | 87 +++-- v0.3.7/reference/h_mmrm_tmb_check_conv.html | 87 +++-- v0.3.7/reference/h_mmrm_tmb_data.html | 97 ++++-- v0.3.7/reference/h_mmrm_tmb_extract_cov.html | 91 +++-- v0.3.7/reference/h_mmrm_tmb_fit.html | 101 ++++-- .../reference/h_mmrm_tmb_formula_parts.html | 94 +++-- v0.3.7/reference/h_mmrm_tmb_parameters.html | 87 +++-- v0.3.7/reference/h_newdata_add_pred.html | 87 +++-- v0.3.7/reference/h_optimizer_fun.html | 87 +++-- v0.3.7/reference/h_partial_fun_args.html | 90 +++-- v0.3.7/reference/h_print_aic_list.html | 84 +++-- v0.3.7/reference/h_print_call.html | 84 +++-- v0.3.7/reference/h_print_cov.html | 84 +++-- v0.3.7/reference/h_quad_form.html | 97 ++++-- v0.3.7/reference/h_reconcile_cov_struct.html | 87 +++-- v0.3.7/reference/h_record_all_output.html | 98 ++++-- v0.3.7/reference/h_residuals_normalized.html | 87 +++-- v0.3.7/reference/h_residuals_pearson.html | 87 +++-- v0.3.7/reference/h_residuals_response.html | 87 +++-- v0.3.7/reference/h_split_control.html | 91 +++-- v0.3.7/reference/h_summarize_all_fits.html | 87 +++-- v0.3.7/reference/h_tbl_confint_terms.html | 87 +++-- v0.3.7/reference/h_test_1d.html | 91 +++-- v0.3.7/reference/h_test_md.html | 91 +++-- v0.3.7/reference/h_tr.html | 87 +++-- v0.3.7/reference/h_valid_formula.html | 87 +++-- v0.3.7/reference/h_var_adj.html | 91 +++-- v0.3.7/reference/h_warn_na_action.html | 75 ++-- v0.3.7/reference/h_within_or_between.html | 91 +++-- v0.3.7/reference/index.html | 209 +++++++---- v0.3.7/reference/is_infix.html | 95 +++-- v0.3.7/reference/mmrm-package.html | 101 ++++-- v0.3.7/reference/mmrm.html | 107 ++++-- v0.3.7/reference/mmrm_control.html | 141 ++++++-- v0.3.7/reference/mmrm_methods.html | 120 +++++-- v0.3.7/reference/mmrm_tidiers.html | 103 ++++-- v0.3.7/reference/mmrm_tmb_methods.html | 118 +++++-- v0.3.7/reference/parsnip_add_mmrm.html | 93 +++-- v0.3.7/reference/position_symbol.html | 91 +++-- v0.3.7/reference/print.cov_struct.html | 87 +++-- v0.3.7/reference/reexports.html | 82 +++-- .../reference/refit_multiple_optimizers.html | 93 +++-- v0.3.7/reference/register_on_load.html | 87 +++-- v0.3.7/reference/tmb_cov_type.html | 87 +++-- v0.3.7/reference/validate_cov_struct.html | 87 +++-- 1932 files changed, 119674 insertions(+), 50595 deletions(-) diff --git a/latest-tag/404.html b/latest-tag/404.html index 652fbf269..fd43cafe8 100644 --- a/latest-tag/404.html +++ b/latest-tag/404.html @@ -1,5 +1,4 @@ - - + @@ -70,11 +69,10 @@ +v0.2.2 + + + + + + @@ -95,46 +119,66 @@

Thank you for your interest in contributing to this repo! Your contribution is highly valued. Please go through this document for guidance on how to contribute.

-

Programming conventions

+

Programming conventions +

Please follow the programming conventions to ensure a consistent programming style across the package.

Generally we follow the tidyverse style guide. Some specific conventions that deviate from this are explained below.

-

Functions

-
  1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
  2. +

    Functions +

    +
      +
    1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
    2. Functions starting with h_ are helper functions and they should not be exported.
    3. Functions should be well documented using roxygen2 (even when they are not exported).
    4. Functions must be unit tested (even when they are not exported).
    5. -
+ +
-

Imports

+

Imports +

In package mmrm, we follow the following convention in package imports.

-
  1. When only a few functions from another package are needed: -
    1. In DESCRIPTION, add that package into Imports.
    2. +
        +
      1. When only a few functions from another package are needed: +
          +
        1. In DESCRIPTION, add that package into Imports.
        2. In mmrm-package.R, we add a importFrom with a single function from the package. -
          1. The function imported can be any random function within the package.
          2. -
        3. +
            +
          1. The function imported can be any random function within the package.
          2. +
          +
        4. Always use package::function style wherever you need to use the function.
        5. Example: stats.
        6. -
      2. +
      +
    3. When many functions from another package are needed: -
      1. In DESCRIPTION, add that package into Imports.
      2. +
          +
        1. In DESCRIPTION, add that package into Imports.
        2. In mmrm-package.R, we use a import to import every function.
        3. Use the functions directly without prefix.
        4. Example: checkmate.
        5. -
        -
+ + + +
-

Comments

-
+ +
-

Documentation

-
+ +
-

Github conventions

+

Github conventions +

When using GitHub to collaborate, the following conventions are needed:

-
  1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. -
    • If you are going to work on this issue, please assign yourself.
    • -
  2. +
      +
    1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. +
        +
      • If you are going to work on this issue, please assign yourself.
      • +
      +
    2. Please create a branch in the mmrm repository, instead of creating forks, unless you are not yet a team member. -
      • Branches should be associated with a GitHub issue and linked to an issue id.
      • +
          +
        • Branches should be associated with a GitHub issue and linked to an issue id.
        • The name of a branch should be of the form: <issue_id>_<short_discription>.
        • -
        +
      +
    3. Add changes to the branch and push it to GitHub. -
      • Please use clear commit messages.
      • +
          +
        • Please use clear commit messages.
        • Please keep your changes focused on the issue. If there are independent changes, please separate it into another PR linking to another issue.
        • -
        +
      +
    4. Please create a Pull Request when you think your code changes are ready: -
      • Functions are well documented.
      • +
          +
        • Functions are well documented.
        • Functions have corresponding unit tests.
        • Changes pass all the GitHub action checks.
        • The checklist in the corresponding issue is completed.
        • -
        +
      +
    5. Address all the comments you receive. -
      • at least one approval is needed to merge.
      • -
    6. -
+ + + +
-

Contribution tips

+

Contribution tips +

-

Development environment Set-up

+

Development environment Set-up +

The development this mmrm package is based on the latest R version and C++ compilers. The package dependencies are the most recent versions from CRAN. We recommend that your working environment is set up in the same way. Additionally, there are some tools we recommend you to install:

-
  1. +
      +
    1. RTools if you work on a Windows operating system. Alternatively you can use docker to separate the operating system and the development system.
    2. GitKraken is a very useful user interface for git including visualization of git commit graphs, file history, etc.
    3. @@ -185,43 +246,82 @@

      Development environment Set-uplintr will allow you to perform static code analysis.
    4. pre-commit is a Python module that allows you to identify issues before you commit locally.
    5. -

+ +
-

Issue labels

+

Issue labels +

The issues are categorized with several labels:

- +
Label name
++++ + + - + + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + -
Label name Description
SPx
SPx SP (story points) indicate complexity, and the larger the subsequent number, the more time consuming the issue is expected to be
priority
priority Issues with this label should be completed with higher priority
good first issue
good first issue Good choices for new team members
blocked
blocked Blocked by other issues
bug
bug Something isn’t working
devops
devops Development and Operation
discussion
discussion Discussion needed
documentation
documentation Improvement of documentation is needed
duplicate
duplicate The issue already exists
enhancement
enhancement New feature or request
help wanted
help wanted Extra attention is needed
invalid
invalid This doesn’t seem right
question
question Further information needed

Please choose an issue based on your interest, issue complexity, and priority.

+ + + +

Please choose an issue based on your interest, issue complexity, and priority.

-

Add new unit tests

+

Add new unit tests +

To add a new unit test, you need to first identify the test scope. Does the test fit in the scope of existing tests? If so, please modify the existing test files under tests/testthat/ folder or src/ folder, depending on whether the code to be tested is R or C++. Otherwise please create a new test file, with a name prefix of “test-”.

In each test case, use the following structure:

@@ -234,19 +334,25 @@ 

Add new unit tests -

Add integration tests

+

Add integration tests +

Integration tests compare the results of SAS and R and assures the quality of our code. To add an integration test, you need to do the following:

-
  1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
  2. +
      +
    1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
    2. Save the results in .txt format in the design/SAS/ folder.
    3. Decide the key outputs that are needed for comparison.
    4. Add a unit test verifying that the R implementation of the same model has the same results (conversion may be needed).
    5. -
+ +
-

Get started with C++

+

Get started with C++ +

If you have no experience with C++, it is totally fine: TMB has provided us with many high-level functionalities that is very similar to R. Here we only list the most important things that you need to go through before you begin C++ programming.

-
  1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
  2. +
      +
    1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
    2. Types. C++ is a strong type programming language and all objects need to be declared with type. Sometimes you can combine the declaration and definition. -
      1. +
          +
        1. int i = 1; This works, as we declare i as int and define it to be 1.
        2. i = 1; This fails, because i is not declared yet.
        3. @@ -254,53 +360,70 @@

          Get started with C++
        4. in R, if (TRUE) { a = '123' }; print(a) is legal.
        5. +
            +
          1. in R, if (TRUE) { a = '123' }; print(a) is legal.
          2. in C++, if (1) {string a = '123'}; std::stdout << a << std::endl; is illegal, because object a is terminated already.
          3. in C++, string a; if (1) {a = '123'}; std::stdout << a << std::endl; is legal, a is declared prior to if statement.
          4. -
          +

        +
      2. Polymorphism. Unlike in R, where function arguments have no explicitly defined types, in C++ the type of each argument of a function must be pre-specified. -
        1. +
            +
          1. Template is a special function that works with generic argument type. We could imagine a single function that could work on arguments of arbitrary type, and template functions make this possible through separation of function logic from the argument declaration. In this way we can use template functions and avoid the need to replicate the whole code for each type.
          2. -
        2. -

        With these points in mind, you are about ready to go.

        +
      +
    3. +
    +

    With these points in mind, you are about ready to go.

-

Get started with TMB

+

Get started with TMB +

In mmrm we are not including any latent variables and so the Laplace approximation aspect of TMB is not used. We only use the automatic differentiation part of TMB. For detailed documentation of TMB, visit the TMB reference.

One important feature of TMB are the R style matrix/array calculations. This is important because we mainly use this part to conduct our calculations. See matrix_arrays.cpp for examples.

-

Add a new covariance structure

+

Add a new covariance structure +

To add a new covariance structure, you need to do the following:

-
  1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
  2. +
      +
    1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
    2. Implement the covariance structure on the C++ side and the corresponding R interface.
    3. Add unit tests to make sure the new covariance structure is working as expected.
    4. Add integration tests under design/SAS/ folder to make sure SAS and R produce similar results (within tolerance).
    5. -
+ +
-

Add additional data

+

Add additional data +

To add additional data to mmrm, please follow the next steps:

-
  1. Make sure the data is needed.
  2. +
      +
    1. Make sure the data is needed.
    2. Document the data in R/data.R.
    3. Use save to create an rda data only containing this dataset. Here the function usethis::use_data can also be helpful.
    4. -
+ +
-

Communications within team

+

Communications within team +

There are several communication channels, please use appropriate ones.

-

GitHub

+

GitHub +

GitHub issues and pull requests are where implementations are discussed and reviewed. Feature requests, bugs, enhancements, technical implementations can be discussed here. When you have ideas that needs to be documented, it is better to have them in GitHub.

-

Slack

+

Slack +

Slack is a messaging tool and we have the mmrm channel under the rinpharma space. You can put anything in the slack channel, e.g., you have completed a issue and are waiting for review, or you have some questions and don’t want to wait until the next stand-up meeting.

To join the slack channel, please make sure you have a slack account, and send the email address to any team member.

-

Stand-up meetings

+

Stand-up meetings +

We have stand-up meetings currently three times a week. The purpose of stand-up meetings is for team members to discuss the current work progress and raise any issue/questions for team discussion if needed.

You don’t need to join all three meetings.

@@ -308,7 +431,8 @@

Stand-up meetings

+ + - + + - + + diff --git a/latest-tag/PULL_REQUEST_TEMPLATE.html b/latest-tag/PULL_REQUEST_TEMPLATE.html index 516f71f6f..5c43fd664 100644 --- a/latest-tag/PULL_REQUEST_TEMPLATE.html +++ b/latest-tag/PULL_REQUEST_TEMPLATE.html @@ -1,11 +1,25 @@ - -Description • mmrm + + + + + + + + + Skip to contents @@ -21,10 +35,12 @@ + + + + + @@ -96,7 +120,8 @@ - + + - + + - + + diff --git a/latest-tag/articles/algorithm.html b/latest-tag/articles/algorithm.html index 751e556c7..3af19655c 100644 --- a/latest-tag/articles/algorithm.html +++ b/latest-tag/articles/algorithm.html @@ -1,5 +1,4 @@ - - + @@ -69,11 +68,10 @@ +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + + + + + @@ -94,60 +118,86 @@

Introduction

-
Package Introduction
+
+
Package Introduction
-
Mixed Models for Repeated Measures
+ +
Mixed Models for Repeated Measures
-
Comparison with other software
+ +
Comparison with other software
-
+ +
+

Covariance Structures

-
Covariance Structures
+
+
Covariance Structures
-
+ + +

Degrees of Freedom and Testing

-
Details of Hypothesis Testing
+
+
Details of Hypothesis Testing
-
Between-Within
+ +
Between-Within
-
Kenward-Roger
+ +
Kenward-Roger
-
Satterthwaite
+ +
Satterthwaite
-
+ + +

Coefficient Covariance

-
Coefficients Covariance Matrix Adjustment
+
+
Coefficients Covariance Matrix Adjustment
-
Details of Weighted Least Square Empirical Covariance
+ +
Details of Weighted Least Square Empirical Covariance
-
+ + +

Algorithm Details

-
Model Fitting Algorithm
+
+
Model Fitting Algorithm
-
Prediction and Simulation
+ +
Prediction and Simulation
-
+ + +

Developers

-
Package Structure
+
+
Package Structure
-
+ + + + + - + + - + + diff --git a/latest-tag/articles/introduction.html b/latest-tag/articles/introduction.html index d67ef702c..494fce668 100644 --- a/latest-tag/articles/introduction.html +++ b/latest-tag/articles/introduction.html @@ -1,5 +1,4 @@ - - + @@ -69,11 +68,10 @@ +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + + + + + @@ -93,7 +117,8 @@

Authors

-
+ +

Citation

@@ -193,7 +219,8 @@

Citation

+ + - + + - + + diff --git a/latest-tag/index.html b/latest-tag/index.html index ff0d5693a..799f8dbd9 100644 --- a/latest-tag/index.html +++ b/latest-tag/index.html @@ -1,5 +1,4 @@ - - + @@ -72,11 +71,10 @@ +v0.2.2 + + + + + + @@ -92,18 +116,27 @@
-

mmrm 0.3.14

CRAN release: 2024-09-27

+

mmrm 0.3.14 +

+

CRAN release: 2024-09-27

-

Bug Fixes

-
  • In version 0.3.13, when the tape optimizer from TMB was switched on, a warning would be given by fit_mmrm(), instructing users to turn off the tape optimizer. However, this is not necessary for reproducible results. Instead, it is now checked whether the deterministic hash for the TMB tape optimizer is used, and a warning is issued otherwise.
  • +

    Bug Fixes +

    +
      +
    • In version 0.3.13, when the tape optimizer from TMB was switched on, a warning would be given by fit_mmrm(), instructing users to turn off the tape optimizer. However, this is not necessary for reproducible results. Instead, it is now checked whether the deterministic hash for the TMB tape optimizer is used, and a warning is issued otherwise.
    • In version 0.3.13, the above described warning by fit_mmrm() was not visible to the user when calling mmrm() because it was caught internally, causing the first fit in each session to fail for the first tried optimizer and falling back to the other optimizers. The warning is now issued directly by mmrm(). This change ensures that the first model fit is consistent regarding the chosen optimizer (and thus numeric results) with subsequent model fits, avoiding discrepancies observed in version 0.3.13.
    • -
+ +
-

mmrm 0.3.13

CRAN release: 2024-09-23

+

mmrm 0.3.13 +

+

CRAN release: 2024-09-23

-

Bug Fixes

-
  • When running with TMB package versions below 1.9.15, MMRM fit results are not completely reproducible. While this may not be relevant for most applications, because the numerical differences are very small, we now issue a warning to the user if this is the case. We advise users to upgrade their TMB package versions to 1.9.15 or higher to ensure reproducibility.
  • +

    Bug Fixes +

    +
      +
    • When running with TMB package versions below 1.9.15, MMRM fit results are not completely reproducible. While this may not be relevant for most applications, because the numerical differences are very small, we now issue a warning to the user if this is the case. We advise users to upgrade their TMB package versions to 1.9.15 or higher to ensure reproducibility.
    • Previously, mmrm ignored contrasts defined for covariates in the input data set. This is fixed now.
    • Previously, predict always required the response to be valid, even for unconditional predictions. This is fixed now and unconditional prediction does not require the response to be valid or present any longer.
    • @@ -111,77 +144,119 @@

      Bug Fixesemmeans::emmeans returned NA for spatial covariance structures. This is fixed now.

    • Previously car::Anova gave incorrect results if an interaction term is included and the covariate of interest was not the first categorical variable. This is fixed now.
    • Previously car::Anova failed if the model did not contain an intercept. This is fixed now.
    • -
+ +
-

Miscellaneous

-
+ +
-

mmrm 0.3.12

CRAN release: 2024-06-26

+

mmrm 0.3.12 +

+

CRAN release: 2024-06-26

-

New Features

-
  • Add parameter conditional for predict method to control whether the prediction is conditional on the observation or not.
  • -
+

New Features +

+ +
-

Bug Fixes

-
+

Bug Fixes +

+ +
-

mmrm 0.3.11

CRAN release: 2024-03-05

+

mmrm 0.3.11 +

+

CRAN release: 2024-03-05

-

Bug Fixes

-
  • Previously if a secondary optimizer fails mmrm will fail. This is fixed now.
  • +

    Bug Fixes +

    +
      +
    • Previously if a secondary optimizer fails mmrm will fail. This is fixed now.
    • Previously character covariate variables will make Anova fail. This is fixed now.
    • -
+ +
-

mmrm 0.3.10

CRAN release: 2024-01-26

+

mmrm 0.3.10 +

+

CRAN release: 2024-01-26

-

Miscellaneous

-
  • Fix internal test skipping functions for MacOS R.
  • -
+

Miscellaneous +

+ +
-

mmrm 0.3.9

CRAN release: 2024-01-25

+

mmrm 0.3.9 +

+

CRAN release: 2024-01-25

-

Miscellaneous

-
  • Fix internal test skipping functions for R versions older than 4.3.
  • -
+

Miscellaneous +

+ +
-

mmrm 0.3.8

CRAN release: 2024-01-24

+

mmrm 0.3.8 +

+

CRAN release: 2024-01-24

-

New Features

-
  • +

    New Features +

    +
      +
    • Anova is implemented for mmrm models and available upon loading the car package. It supports type II and III hypothesis testing.
    • The argument start for mmrm_control() is updated to allow better choices of initial values.
    • confint on mmrm models will give t-based confidence intervals now, instead of the normal approximation.
    • -
+ +
-

Bug Fixes

-
+

Bug Fixes +

+ +
-

Miscellaneous

-
+ +
-

mmrm 0.3.7

CRAN release: 2023-12-08

+

mmrm 0.3.7 +

+

CRAN release: 2023-12-08

-

New Features

-
  • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
  • +

    New Features +

    +
      +
    • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
    • Add empirical, empirical Jackknife and empirical bias-reduced adjusted coefficients covariance estimates, which can be specified via the new vcov argument of mmrm().
    • Add residual and between-within degrees of freedom methods.
    • Add Kenward-Roger support for spatial covariance structures.
    • @@ -192,61 +267,87 @@

      New FeaturesAdd tidy(), glance() and augment() methods to tidy the fit results into summary tables.
    • Add tidymodels framework support via a parsnip interface.
    • Add argument covariance to mmrm() to allow for easier programmatic access to specifying the model’s covariance structure and to expose covariance customization through the tidymodels interface.
    • -

+ +
-

Bug Fixes

-
+ +
-

Miscellaneous

-
+ +
-

mmrm 0.2.2

CRAN release: 2022-12-20

+

mmrm 0.2.2 +

+

CRAN release: 2022-12-20

-

New Features

-
  • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
  • +

    New Features +

    +
      +
    • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
    • Update the mmrm arguments to allow users more fine-grained control, e.g. mmrm(..., start = start, optimizer = c("BFGS", "nlminb")) to set the starting values for the variance estimates and to choose the available optimizers. These arguments will be passed to the new function mmrm_control.
    • Add new argument drop_visit_levels to allow users to keep all levels in visits, even when they are not observed in the data. Dropping unobserved levels was done silently previously, and now a message will be given. See ?mmrm_control for more details.
    • -
+ +
-

Bug Fixes

-
+ +
-

Miscellaneous

-
+ +
-

mmrm 0.1.5

CRAN release: 2022-10-18

- +
+ + - + + - + + diff --git a/latest-tag/reference/Anova.mmrm.html b/latest-tag/reference/Anova.mmrm.html index 881aa7f8f..4824ed6ae 100644 --- a/latest-tag/reference/Anova.mmrm.html +++ b/latest-tag/reference/Anova.mmrm.html @@ -1,11 +1,27 @@ - -Conduct type II/III hypothesis testing on the MMRM fit results. — Anova.mmrm • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
-

Usage

+

Usage +

Anova.mmrm(
   mod,
   type = c("II", "III", "2", "3"),
@@ -107,34 +134,43 @@ 

Usage

-

Arguments

+

Arguments +

-
mod
+
+
mod +

(mmrm)
the fitted MMRM.

-
type
+
type +

(string) type of test, "II", "III", '2', or '3'.

-
tol
+
tol +

(numeric) threshold blow which values are treated as 0.

-
...
+
... +

not used.

-
+ +
-

Details

+

Details +

Anova will return anova object with one row per variable and columns Num Df(numerator degrees of freedom), Denom Df(denominator degrees of freedom), F Statistic and Pr(>=F).

+ + - + + - + + diff --git a/latest-tag/reference/COV_TYPES.html b/latest-tag/reference/COV_TYPES.html index 4e37e8de6..11c555ca5 100644 --- a/latest-tag/reference/COV_TYPES.html +++ b/latest-tag/reference/COV_TYPES.html @@ -1,11 +1,27 @@ - -Covariance Type Database — COV_TYPES • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,14 +123,17 @@
-

Usage

+

Usage +

COV_TYPES
-

Format

+

Format +

A data frame with 5 variables and one record per covariance type:

-
name
+
+
name

The long-form name of the covariance structure type

abbr
@@ -123,10 +152,12 @@

Format<

A logical value indicating whether the covariance structure is spatial.

-

+ + + +
-
- + + - + + diff --git a/latest-tag/reference/as.cov_struct.html b/latest-tag/reference/as.cov_struct.html index d73dc94cc..fba8c81a6 100644 --- a/latest-tag/reference/as.cov_struct.html +++ b/latest-tag/reference/as.cov_struct.html @@ -1,11 +1,27 @@ - -Coerce into a Covariance Structure Definition — as.cov_struct • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
-

Usage

+

Usage +

as.cov_struct(x, ...)
 
 # S3 method for class 'formula'
@@ -105,58 +132,85 @@ 

Usage

-

Arguments

+

Arguments +

-
x
+
+
x +

an object from which to derive a covariance structure. See object specific sections for details.

-
...
+
... +

additional arguments unused.

-
warn_partial
+
warn_partial +

(flag)
whether to emit a warning when parts of the formula are disregarded.

-
+ +
-

Value

+

Value +

A cov_struct() object.

-

Details

+

Details +

A covariance structure can be parsed from a model definition formula or call. Generally, covariance structures defined using non-standard evaluation take the following form:

-

type( (visit, )* visit | (group /)? subject )

+

+
+
type( (visit, )* visit | (group /)? subject )
+

+

For example, formulas may include terms such as

-

us(time | subject)
+

+
+
us(time | subject)
 cp(time | group / subject)
-sp_exp(coord1, coord2 | group / subject)

+sp_exp(coord1, coord2 | group / subject)
+

+

Note that only sp_exp (spatial) covariance structures may provide multiple coordinates, which identify the Euclidean distance between the time points.

-

Methods (by class)

+

Methods (by class) +

-
  • as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be +

      +
    • +

      as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be covariance structure definitions and must follow the form:

      -

      y ~ xs + type( (visit, )* visit | (group /)? subject )

      +

      +
      +
      y ~ xs + type( (visit, )* visit | (group /)? subject )
      +

      +

      Any component on the right hand side of a formula is considered when -searching for a covariance definition.

    • -
+searching for a covariance definition.

+ + +
-

See also

+

See also +

Other covariance types: cov_struct(), covariance_types

-

Examples

+

Examples +

# provide a covariance structure as a right-sided formula
 as.cov_struct(~ csh(visit | group / subject))
 #> <covariance structure>
@@ -176,7 +230,8 @@ 

Examples

+ +
- + + - + + diff --git a/latest-tag/reference/bcva_data.html b/latest-tag/reference/bcva_data.html index 89e70bcba..18d1afdf3 100644 --- a/latest-tag/reference/bcva_data.html +++ b/latest-tag/reference/bcva_data.html @@ -1,11 +1,27 @@ - -Example Data on BCVA — bcva_data • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,33 +123,41 @@
-

Usage

+

Usage +

bcva_data
-

Format

-

A tibble with 10,000 rows and 7 variables:

  • USUBJID: subject ID.

  • +

    Format +

    +

    A tibble with 10,000 rows and 7 variables:

    +
      +
    • USUBJID: subject ID.

    • VISITN: visit number (numeric).

    • AVISIT: visit number (factor).

    • ARMCD: treatment, TRT or CTL.

    • RACE: 3-category race.

    • BCVA_BL: BCVA at baseline.

    • BCVA_CHG: Change in BCVA at study visits.

    • -
+ +
-

Source

+

Source +

This is an artificial dataset.

-

Note

+

Note +

Measurements of BCVA (best corrected visual acuity) is a measure of how how many letters a person can read off of an eye chart using corrective lenses or contacts. This a common endpoint in ophthalmology trials.

+ +
-
- + + - + + diff --git a/latest-tag/reference/cached_mmrm_results.html b/latest-tag/reference/cached_mmrm_results.html index d35a8dd3c..9f4e6a655 100644 --- a/latest-tag/reference/cached_mmrm_results.html +++ b/latest-tag/reference/cached_mmrm_results.html @@ -1,11 +1,27 @@ - -Cache Data for mmrm Model Comparison — cached_mmrm_results • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
-

Usage

+

Usage +

cached_mmrm_results
-

Format

-

A list with following elements:

  • conv_time_fev: Convergence time on FEV data.

  • +

    Format +

    +

    A list with following elements:

    +
      +
    • conv_time_fev: Convergence time on FEV data.

    • conv_time_bcva: Convergence time on BCVA data.

    • rel_diff_ests_tbl_fev: Relative difference in estimates on FEV data.

    • rel_diff_ests_tbl_bcva: Relative difference in estimates on BCVA data.

    • conv_rate: Convergence rate on data with different missing levels.

    • df_missingness: Summary of missingness on simulated data.

    • -
+ +
-

Source

+

Source +

This is created based on simulations on FEV data and BCVA data.

-

Note

+

Note +

The cached data for comparison is used for the vignettes generation. Please make sure that this data is refreshed before each package release by running the script data-raw/mmrm_review.R. @@ -124,7 +157,8 @@

Note

+ +
-
- + + - + + diff --git a/latest-tag/reference/car_add_mmrm.html b/latest-tag/reference/car_add_mmrm.html index 857695d39..e5bb952de 100644 --- a/latest-tag/reference/car_add_mmrm.html +++ b/latest-tag/reference/car_add_mmrm.html @@ -1,11 +1,27 @@ - -Register mmrm For Use With car::Anova — car_add_mmrm • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + +
@@ -97,25 +124,32 @@
-

Usage

+

Usage +

car_add_mmrm(quietly = FALSE)
-

Arguments

+

Arguments +

-
quietly
+
+
quietly +

logical: should progress and error messages be suppressed?

-
+ +
-

Value

+

Value +

A logical value indicating whether registration was successful.

+ +
-
- + + - + + diff --git a/latest-tag/reference/check_package_version.html b/latest-tag/reference/check_package_version.html index b3415e2ff..542f28625 100644 --- a/latest-tag/reference/check_package_version.html +++ b/latest-tag/reference/check_package_version.html @@ -1,11 +1,27 @@ - -Check Suggested Dependency Against Version Requirements — check_package_version • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,33 +123,41 @@
-

Usage

+

Usage +

check_package_version(pkg, ver = c(NA_character_, NA_character_))
-

Arguments

+

Arguments +

-
pkg
+
+
pkg +

(string)
package name.

-
ver
+
ver +

(character)
of length 2 whose elements can be provided to numeric_version(), representing a minimum and maximum (inclusive) version requirement for interoperability. When NA, no version requirement is imposed. Defaults to no version requirement.

-
+ +
-

Value

+

Value +

A logical (invisibly) indicating whether the loaded package meets the version requirements. A warning is emitted otherwise.

+ +
-
- + + - + + diff --git a/latest-tag/reference/component.html b/latest-tag/reference/component.html index 597692fa4..5bb730e66 100644 --- a/latest-tag/reference/component.html +++ b/latest-tag/reference/component.html @@ -1,11 +1,27 @@ - -Component Access for mmrm_tmb Objects — component • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
-

Usage

+

Usage +

component(
   object,
   name = c("cov_type", "subject_var", "n_theta", "n_subjects", "n_timepoints", "n_obs",
@@ -109,24 +136,33 @@ 

Usage

-

Arguments

+

Arguments +

-
object
+
+
object +

(mmrm_tmb)
the fitted MMRM.

-
name
+
name +

(character)
the component(s) to be retrieved.

-
+ +
-

Value

+

Value +

The corresponding component of the object, see details.

-

Details

-

Available component() names are as follows:

  • call: low-level function call which generated the model.

  • +

    Details +

    +

    Available component() names are as follows:

    +
+ +
-

See also

+

See also +

In the lme4 package there is a similar function getME().

-

Examples

+

Examples +

fit <- mmrm(
   formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
   data = fev_data
@@ -3120,7 +3159,8 @@ 

Examples

+ +
- + + - + + diff --git a/latest-tag/reference/cov_struct.html b/latest-tag/reference/cov_struct.html index e5941925d..10d162ea0 100644 --- a/latest-tag/reference/cov_struct.html +++ b/latest-tag/reference/cov_struct.html @@ -1,11 +1,27 @@ - -Define a Covariance Structure — cov_struct • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
-

Usage

+

Usage +

cov_struct(
   type = cov_types(),
   visits,
@@ -108,49 +135,60 @@ 

Usage

-

Arguments

+

Arguments +

-
type
+
+
type +

(string)
the name of the covariance structure type to use. For available options, see cov_types(). If a type abbreviation is used that implies heterogeneity (e.g. cph) and no value is provided to heterogeneous, then the heterogeneity is derived from the type name.

-
visits
+
visits +

(character)
a vector of variable names to use for the longitudinal terms of the covariance structure. Multiple terms are only permitted for the "spatial" covariance type.

-
subject
+
subject +

(string)
the name of the variable that encodes a subject identifier.

-
group
+
group +

(string)
optionally, the name of the variable that encodes a grouping variable for subjects.

-
heterogeneous
+
heterogeneous +

(flag)

-
+ +
-

Value

+

Value +

A cov_struct object.

-

See also

+

See also +

Other covariance types: as.cov_struct(), covariance_types

-

Examples

+

Examples +

cov_struct("csh", "AVISITN", "USUBJID")
 #> <covariance structure>
 #> heterogeneous compound symmetry:
@@ -167,7 +205,8 @@ 

Examples

+ +
- + + - + + diff --git a/latest-tag/reference/cov_type_abbr.html b/latest-tag/reference/cov_type_abbr.html index c346ea5a0..5edcfd38d 100644 --- a/latest-tag/reference/cov_type_abbr.html +++ b/latest-tag/reference/cov_type_abbr.html @@ -1,11 +1,27 @@ - -Retrieve Associated Abbreviated Covariance Structure Type Name — cov_type_abbr • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,26 +123,33 @@
-

Usage

+

Usage +

cov_type_abbr(type)
-

Arguments

+

Arguments +

-
type
+
+
type +

(string)
either a full name or abbreviate covariance structure type name to collapse into an abbreviated type.

-
+ +
-

Value

+

Value +

The corresponding abbreviated covariance type name.

+ +
-
- + + - + + diff --git a/latest-tag/reference/cov_type_name.html b/latest-tag/reference/cov_type_name.html index e7bd3c282..262ee6490 100644 --- a/latest-tag/reference/cov_type_name.html +++ b/latest-tag/reference/cov_type_name.html @@ -1,11 +1,27 @@ - -Retrieve Associated Full Covariance Structure Type Name — cov_type_name • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,26 +123,33 @@
-

Usage

+

Usage +

cov_type_name(type)
-

Arguments

+

Arguments +

-
type
+
+
type +

(string)
either a full name or abbreviate covariance structure type name to convert to a long-form type.

-
+ +
-

Value

+

Value +

The corresponding abbreviated covariance type name.

+ +
-
- + + - + + diff --git a/latest-tag/reference/covariance_types.html b/latest-tag/reference/covariance_types.html index 331bf72db..075f62d68 100644 --- a/latest-tag/reference/covariance_types.html +++ b/latest-tag/reference/covariance_types.html @@ -1,11 +1,27 @@ - -Covariance Types — covariance_types • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
-

Usage

+

Usage +

cov_types(
   form = c("name", "abbr", "habbr"),
   filter = c("heterogeneous", "spatial")
@@ -105,63 +132,152 @@ 

Usage

-

Arguments

+

Arguments +

-
form
+
+
form +

(character)
covariance structure type name form. One or more of "name", "abbr" (abbreviation), or "habbr" (heterogeneous abbreviation).

-
filter
+
filter +

(character)
covariance structure type filter. One or more of "heterogeneous" or "spatial".

-
+ +
-

Value

+

Value +

A character vector of accepted covariance structure type names and abbreviations.

-

Note

+

Note +

The ante-dependence covariance structure in this package refers to homogeneous ante-dependence, while the ante-dependence covariance structure from SAS PROC MIXED refers to heterogeneous ante-dependence and the homogeneous version is not available in SAS.

For all non-spatial covariance structures, the time variable must -be coded as a factor.

-

Spatial Covariance structures:

- - -
StructureDescriptionParameters\((i, j)\) element
sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)

where \(d_{ij}\) denotes the Euclidean distance between time points +be coded as a factor.

+
+

Spatial Covariance structures: +

+ + + + + + + + + + + + + + + +
StructureDescriptionParameters\((i, j)\) element
sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)
+

where \(d_{ij}\) denotes the Euclidean distance between time points \(i\) and \(j\).

-

Abbreviations for Covariance Structures

+

Abbreviations for Covariance Structures +

-

Common Covariance Structures:

- - -
StructureDescriptionParameters\((i, j)\) element
adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)

where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, +

Common Covariance Structures: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
StructureDescriptionParameters\((i, j)\) element
adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)
+

where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, respectively, out of total \(m\) time points, \(1 \leq i, j \leq m\).

-

See also

+

See also +

Other covariance types: as.cov_struct(), cov_struct()

+ + - + + - + + diff --git a/latest-tag/reference/df_1d.html b/latest-tag/reference/df_1d.html index 27518fb6a..0d71f4a60 100644 --- a/latest-tag/reference/df_1d.html +++ b/latest-tag/reference/df_1d.html @@ -1,15 +1,31 @@ - -Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm + + + + + +Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm + + + + + + + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,31 +129,39 @@
-

Usage

+

Usage +

df_1d(object, contrast)
-

Arguments

+

Arguments +

-
object
+
+
object +

(mmrm)
the MMRM fit.

-
contrast
+
contrast +

(numeric)
contrast vector. Note that this should not include elements for singular coefficient estimates, i.e. only refer to the actually estimated coefficients.

-
+ +
-

Value

+

Value +

List with est, se, df, t_stat and p_val.

-

Examples

+

Examples +

object <- mmrm(
   formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
   data = fev_data
@@ -153,7 +187,8 @@ 

Examples

+ +
- + + - + + diff --git a/latest-tag/reference/df_md.html b/latest-tag/reference/df_md.html index dad348050..0b5754868 100644 --- a/latest-tag/reference/df_md.html +++ b/latest-tag/reference/df_md.html @@ -1,17 +1,33 @@ - -Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm + + + + + +Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm + + + + + + + + + + Skip to contents @@ -27,10 +43,12 @@ + + + + + @@ -106,32 +132,40 @@
-

Usage

+

Usage +

df_md(object, contrast)
-

Arguments

+

Arguments +

-
object
+
+
object +

(mmrm)
the MMRM fit.

-
contrast
+
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

+

Value +

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

-

Examples

+

Examples +

object <- mmrm(
   formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
   data = fev_data
@@ -154,7 +188,8 @@ 

Examples

+ +
- + + - + + diff --git a/latest-tag/reference/drop_elements.html b/latest-tag/reference/drop_elements.html index 66bb3978a..b0205c431 100644 --- a/latest-tag/reference/drop_elements.html +++ b/latest-tag/reference/drop_elements.html @@ -1,11 +1,27 @@ - -Drop Items from an Indexible — drop_elements • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,30 +123,38 @@
-

Usage

+

Usage +

drop_elements(x, n)
-

Arguments

+

Arguments +

-
x
+
+
x +

Any object that can be consumed by seq_along() and indexed by a logical vector of the same length.

-
n
+
n +

(integer)
the number of terms to drop.

-
+ +
-

Value

+

Value +

A subset of x.

+ +
-
- + + - + + diff --git a/latest-tag/reference/emit_tidymodels_register_msg.html b/latest-tag/reference/emit_tidymodels_register_msg.html index 00155ce37..6ab17cb91 100644 --- a/latest-tag/reference/emit_tidymodels_register_msg.html +++ b/latest-tag/reference/emit_tidymodels_register_msg.html @@ -1,11 +1,27 @@ - -Format a Message to Emit When Tidymodels is Loaded — emit_tidymodels_register_msg • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,18 +123,21 @@
-

Usage

+

Usage +

emit_tidymodels_register_msg()
-

Value

+

Value +

A character message to emit. Either a ansi-formatted cli output if package 'cli' is available or a plain-text message otherwise.

+ +
-
- + + - + + diff --git a/latest-tag/reference/emmeans_support.html b/latest-tag/reference/emmeans_support.html index fb628000f..769723fe5 100644 --- a/latest-tag/reference/emmeans_support.html +++ b/latest-tag/reference/emmeans_support.html @@ -1,23 +1,39 @@ - -Support for emmeans — emmeans_support • mmrm + + + + + +Support for emmeans — emmeans_support • mmrm + + + + + + + + + + Skip to contents @@ -33,10 +49,12 @@ + + + + +
@@ -117,7 +144,8 @@
-

Examples

+

Examples +

fit <- mmrm(
   formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
   data = fev_data
@@ -149,7 +177,8 @@ 

Examples#> Results are averaged over the levels of: RACE, SEX

-
+ +
- + + - + + diff --git a/latest-tag/reference/emp_start.html b/latest-tag/reference/emp_start.html index 1c246b10d..ea3c6ece9 100644 --- a/latest-tag/reference/emp_start.html +++ b/latest-tag/reference/emp_start.html @@ -1,11 +1,27 @@ - -Empirical Starting Value — emp_start • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,58 +123,72 @@
-

Usage

+

Usage +

emp_start(data, model_formula, visit_var, subject_var, subject_groups, ...)
-

Arguments

+

Arguments +

-
data
+
+
data +

(data.frame)
data used for model fitting.

-
model_formula
+
model_formula +

(formula)
the formula in mmrm model without covariance structure part.

-
visit_var
+
visit_var +

(string)
visit variable.

-
subject_var
+
subject_var +

(string)
subject id variable.

-
subject_groups
+
subject_groups +

(factor)
subject group assignment.

-
...
+
... +

not used.

-
+ +
-

Value

+

Value +

A numeric vector of starting values.

-

Details

+

Details +

This emp_start only works for unstructured covariance structure. It uses linear regression to first obtain the coefficients and use the residuals to obtain the empirical variance-covariance, and it is then used to obtain the starting values.

-

Note

+

Note +

data is used instead of full_frame because full_frame is already transformed if model contains transformations, e.g. log(FEV1) ~ exp(FEV1_BL) will drop FEV1 and FEV1_BL but add log(FEV1) and exp(FEV1_BL) in full_frame.

+ +
-
- + + - + + diff --git a/latest-tag/reference/fev_data.html b/latest-tag/reference/fev_data.html index 62430f0b8..f5f375fd5 100644 --- a/latest-tag/reference/fev_data.html +++ b/latest-tag/reference/fev_data.html @@ -1,11 +1,27 @@ - -Example Data on FEV1 — fev_data • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,13 +123,17 @@
-

Usage

+

Usage +

fev_data
-

Format

-

A tibble with 800 rows and 7 variables:

  • USUBJID: subject ID.

  • +

    Format +

    +

    A tibble with 800 rows and 7 variables:

    +
      +
    • USUBJID: subject ID.

    • AVISIT: visit number.

    • ARMCD: treatment, TRT or PBO.

    • RACE: 3-category race.

    • @@ -113,20 +143,24 @@

      Format<
    • WEIGHT: weighting variable.

    • VISITN: integer order of the visit.

    • VISITN2: coordinates of the visit for distance calculation.

    • -

+ +
-

Source

+

Source +

This is an artificial dataset.

-

Note

+

Note +

Measurements of FEV1 (forced expired volume in one second) is a measure of how quickly the lungs can be emptied. Low levels of FEV1 may indicate chronic obstructive pulmonary disease (COPD).

+ +
-
- + + - + + diff --git a/latest-tag/reference/fill_names.html b/latest-tag/reference/fill_names.html index 4d0664890..31909b716 100644 --- a/latest-tag/reference/fill_names.html +++ b/latest-tag/reference/fill_names.html @@ -1,11 +1,27 @@ - -Complete character Vector Names From Values — fill_names • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,26 +123,33 @@
-

Usage

+

Usage +

fill_names(x)
-

Arguments

+

Arguments +

-
x
+
+
x +

(character or list)
value whose names should be completed from element values.

-
+ +
-

Value

+

Value +

A named vector or list.

+ +
-
- + + - + + diff --git a/latest-tag/reference/fit_mmrm.html b/latest-tag/reference/fit_mmrm.html index 2fab6fed8..d54ea6666 100644 --- a/latest-tag/reference/fit_mmrm.html +++ b/latest-tag/reference/fit_mmrm.html @@ -1,17 +1,33 @@ - -Low-Level Fitting Function for MMRM — fit_mmrm • mmrm + + + + + +Low-Level Fitting Function for MMRM — fit_mmrm • mmrm + + + + + + + + + + Skip to contents @@ -27,10 +43,12 @@ + + + + + @@ -106,7 +132,8 @@
-

Usage

+

Usage +

fit_mmrm(
   formula,
   data,
@@ -120,56 +147,69 @@ 

Usage

-

Arguments

+

Arguments +

-
formula
+
+
formula +

(formula)
model formula with exactly one special term specifying the visits within subjects, see details.

-
data
+
data +

(data.frame)
input data containing the variables used in formula.

-
weights
+
weights +

(vector)
input vector containing the weights.

-
reml
+
reml +

(flag)
whether restricted maximum likelihood (REML) estimation is used, otherwise maximum likelihood (ML) is used.

-
covariance
+
covariance +

(cov_struct)
A covariance structure type definition, or value that can be coerced to a covariance structure using as.cov_struct(). If no value is provided, a structure is derived from the provided formula.

-
tmb_data
+
tmb_data +

(mmrm_tmb_data)
object.

-
formula_parts
+
formula_parts +

(mmrm_tmb_formula_parts)
list with formula parts from h_mmrm_tmb_formula_parts().

-
control
+
control +

(mmrm_control)
list of control options produced by mmrm_control().

-
+ +
-

Value

+

Value +

List of class mmrm_tmb, see h_mmrm_tmb_fit() for details. In addition, it contains elements call and optimizer.

-

Details

+

Details +

The formula typically looks like:

FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)

which specifies response and covariates as usual, and exactly one special term @@ -179,7 +219,8 @@

Details
-

Examples

+

Examples +

formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
 data <- fev_data
 system.time(result <- fit_mmrm(formula, data, rep(1, nrow(fev_data))))
@@ -188,7 +229,8 @@ 

Examples

+ +

- + + - + + diff --git a/latest-tag/reference/fit_single_optimizer.html b/latest-tag/reference/fit_single_optimizer.html index 7c445d1b3..5b5d47663 100644 --- a/latest-tag/reference/fit_single_optimizer.html +++ b/latest-tag/reference/fit_single_optimizer.html @@ -1,15 +1,31 @@ - -Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm + + + + + +Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm + + + + + + + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,7 +129,8 @@
-

Usage

+

Usage +

fit_single_optimizer(
   formula,
   data,
@@ -118,58 +145,72 @@ 

Usage

-

Arguments

+

Arguments +

-
formula
+
+
formula +

(formula)
the model formula, see details.

-
data
+
data +

(data)
the data to be used for the model.

-
weights
+
weights +

(vector)
an optional vector of weights to be used in the fitting process. Should be NULL or a numeric vector.

-
reml
+
reml +

(flag)
whether restricted maximum likelihood (REML) estimation is used, otherwise maximum likelihood (ML) is used.

-
covariance
+
covariance +

(cov_struct)
a covariance structure type definition as produced with cov_struct(), or value that can be coerced to a covariance structure using as.cov_struct(). If no value is provided, a structure is derived from the provided formula.

-
tmb_data
+
tmb_data +

(mmrm_tmb_data)
object.

-
formula_parts
+
formula_parts +

(mmrm_tmb_formula_parts)
object.

-
...
+
... +

Additional arguments to pass to mmrm_control().

-
control
+
control +

(mmrm_control)
object.

-
+ +
-

Value

+

Value +

The mmrm_fit object, with additional attributes containing warnings, messages, optimizer used and convergence status in addition to the mmrm_tmb contents.

-

Details

+

Details +

fit_single_optimizer will fit the mmrm model using the control provided. If there are multiple optimizers provided in control, only the first optimizer will be used. @@ -178,7 +219,8 @@

Details
-

Examples

+

Examples +

mod_fit <- fit_single_optimizer(
   formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
   data = fev_data,
@@ -190,7 +232,8 @@ 

Examples

+ +

- + + - + + diff --git a/latest-tag/reference/flat_expr.html b/latest-tag/reference/flat_expr.html index 798ce3661..505767d25 100644 --- a/latest-tag/reference/flat_expr.html +++ b/latest-tag/reference/flat_expr.html @@ -1,17 +1,33 @@ - -Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm + + + + + +Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm + + + + + + + + + + Skip to contents @@ -27,10 +43,12 @@ + + + + + @@ -106,46 +132,69 @@
-

Usage

+

Usage +

flatten_call(call)
 
 flatten_expr(expr)
-

Arguments

+

Arguments +

-
call, expr
+
+
call, expr +

(language)
a language object to flatten.

-
+ +
-

Value

+

Value +

A list of atomic values, symbols, infix operator names and subexpressions.

-

Details

+

Details +

Where 1 + 2 | 3 in R's syntax tree is (|, (+, 1, 2), 3), flattening it into its visual order produces (1, +, 2, |, 3), which makes for more fluent interpretation of non-standard grammar rules used in formulas.

-

Functions

+

Functions +

-
  • flatten_call(): Flatten a call into a list of names and argument expressions.

    +
      +
    • +

      flatten_call(): Flatten a call into a list of names and argument expressions.

      The call name and all arguments are flattened into the same list, meaning a call of the form sp_exp(a, b, c | d / e) produces a list of the form (sp_exp, a, b, c, |, d, /, e).

      -

      flatten_call(quote(sp_exp(a, b, c | d / e)))

    • -
    • flatten_expr(): Flatten nested expressions

      -

      flatten_expr(quote(1 + 2 + 3 | 4))

    • -
+

+
+
flatten_call(quote(sp_exp(a, b, c | d / e)))
+

+
+ +
  • +

    flatten_expr(): Flatten nested expressions

    +

    +
    +
    flatten_expr(quote(1 + 2 + 3 | 4))
    +

    +
    +
  • + + + +
    -
    - + + - + + diff --git a/latest-tag/reference/format.cov_struct.html b/latest-tag/reference/format.cov_struct.html index 49628d912..4782e1c3f 100644 --- a/latest-tag/reference/format.cov_struct.html +++ b/latest-tag/reference/format.cov_struct.html @@ -1,11 +1,27 @@ - -Format Covariance Structure Object — format.cov_struct • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,30 +123,38 @@
    -

    Usage

    +

    Usage +

    # S3 method for class 'cov_struct'
     format(x, ...)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (cov_struct)
    a covariance structure object.

    -
    ...
    +
    ... +

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string for x.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/format_symbols.html b/latest-tag/reference/format_symbols.html index 1a3a6dbb6..cd48203ef 100644 --- a/latest-tag/reference/format_symbols.html +++ b/latest-tag/reference/format_symbols.html @@ -1,13 +1,29 @@ - -Format Symbol Objects — format_symbols • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,25 +126,32 @@
    -

    Usage

    +

    Usage +

    format_symbols(x)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (character) A vector of variable names.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string of comma-separated variables.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/formula_rhs.html b/latest-tag/reference/formula_rhs.html index 4967b9cda..13705a406 100644 --- a/latest-tag/reference/formula_rhs.html +++ b/latest-tag/reference/formula_rhs.html @@ -1,11 +1,27 @@ - -Extract Right-Hand-Side (rhs) from Formula — formula_rhs • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,28 +123,39 @@
    -

    Usage

    +

    Usage +

    formula_rhs(f)
    -

    Arguments

    +

    Arguments +

    -
    f
    +
    +
    f +

    (formula)
    a formula.

    -
    + +
    -

    Value

    +

    Value +

    A formula without a response, derived from the right-hand-side of the formula, f.

    -

    formula_rhs(a ~ b + c)
    -formula_rhs(~ b + c)

    +

    +
    +
    formula_rhs(a ~ b + c)
    +formula_rhs(~ b + c)
    +

    +
    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_add_covariance_terms.html b/latest-tag/reference/h_add_covariance_terms.html index c1eada240..6800176ca 100644 --- a/latest-tag/reference/h_add_covariance_terms.html +++ b/latest-tag/reference/h_add_covariance_terms.html @@ -1,11 +1,27 @@ - -Add Individual Covariance Variables As Terms to Formula — h_add_covariance_terms • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,37 +123,46 @@
    -

    Usage

    +

    Usage +

    h_add_covariance_terms(f, covariance)
    -

    Arguments

    +

    Arguments +

    -
    f
    +
    +
    f +

    (formula)
    a formula to which covariance structure terms should be added.

    -
    covariance
    +
    covariance +

    (cov_struct)
    a covariance structure object from which additional variables should be sourced.

    -
    + +
    -

    Value

    +

    Value +

    A new formula with included covariance terms.

    -

    Details

    +

    Details +

    stats::update() is used to append the covariance structure and the environment attribute will not be changed. This ensures the returned formula and the input formula have the same environment.

    + + - + + - + + diff --git a/latest-tag/reference/h_add_terms.html b/latest-tag/reference/h_add_terms.html index 63ee3fb2e..a44323888 100644 --- a/latest-tag/reference/h_add_terms.html +++ b/latest-tag/reference/h_add_terms.html @@ -1,11 +1,27 @@ - -Add Formula Terms with Character — h_add_terms • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,39 +123,49 @@
    -

    Usage

    +

    Usage +

    h_add_terms(f, adds, drop_response = FALSE)
    -

    Arguments

    +

    Arguments +

    -
    f
    +
    +
    f +

    (formula)
    a formula to be updated.

    -
    adds
    +
    adds +

    (character)
    representation of elements to be added.

    -
    drop_response
    +
    drop_response +

    (flag)
    whether response should be dropped.

    -
    + +
    -

    Value

    +

    Value +

    A new formula with elements in drops removed.

    -

    Details

    +

    Details +

    Elements in adds will be added from the formula, while the environment of the formula is unchanged. If adds is NULL or character(0), the formula is unchanged.

    + + - + + - + + diff --git a/latest-tag/reference/h_coef_table.html b/latest-tag/reference/h_coef_table.html index cee690749..da110cd0c 100644 --- a/latest-tag/reference/h_coef_table.html +++ b/latest-tag/reference/h_coef_table.html @@ -1,11 +1,27 @@ - -Coefficients Table for MMRM Fit — h_coef_table • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,26 +123,33 @@
    -

    Usage

    +

    Usage +

    h_coef_table(object)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    model fit.

    -
    + +
    -

    Value

    +

    Value +

    Matrix with one row per coefficient and columns Estimate, Std. Error, df, t value and Pr(>|t|).

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_confirm_large_levels.html b/latest-tag/reference/h_confirm_large_levels.html index 2c521e2f2..05d752de3 100644 --- a/latest-tag/reference/h_confirm_large_levels.html +++ b/latest-tag/reference/h_confirm_large_levels.html @@ -1,13 +1,29 @@ - -Ask for Confirmation on Large Visit Levels — h_confirm_large_levels • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,25 +126,32 @@
    -

    Usage

    +

    Usage +

    h_confirm_large_levels(x)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (numeric)
    number of visit levels.

    -
    + +
    -

    Value

    +

    Value +

    Logical value TRUE.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_construct_model_frame_inputs.html b/latest-tag/reference/h_construct_model_frame_inputs.html index c1177d0ac..f4d947705 100644 --- a/latest-tag/reference/h_construct_model_frame_inputs.html +++ b/latest-tag/reference/h_construct_model_frame_inputs.html @@ -1,19 +1,35 @@ - -Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm + + + + + +Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm + + + + + + + + + + Skip to contents @@ -29,10 +45,12 @@ + + + + + @@ -109,7 +135,8 @@
    -

    Usage

    +

    Usage +

    h_construct_model_frame_inputs(
       formula,
       data,
    @@ -120,35 +147,47 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    formula
    +
    +
    formula +

    (mmrm)
    mmrm fit object.

    -
    data
    +
    data +

    optional data frame that will be passed to model.frame() or model.matrix()

    -
    include
    +
    include +

    (character)
    names of variable to include

    -
    full
    +
    full +

    (flag)
    indicator whether to return full model frame (deprecated).

    -
    + +
    -

    Value

    -

    named list with four elements:

    • "formula": the formula including the columns requested in the include= argument.

    • +

      Value +

      +

      named list with four elements:

      +
        +
      • "formula": the formula including the columns requested in the include= argument.

      • "data": a data frame including all columns needed in the formula. full formula are identical

      • -
    + + + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_default_value.html b/latest-tag/reference/h_default_value.html index 724d96186..bbf54ea0b 100644 --- a/latest-tag/reference/h_default_value.html +++ b/latest-tag/reference/h_default_value.html @@ -1,13 +1,29 @@ - -Default Value on NULL Return default value when first argument is NULL. — h_default_value • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,29 +126,37 @@
    -

    Usage

    +

    Usage +

    h_default_value(x, y)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    Object.

    -
    y
    +
    y +

    Object.

    -
    + +
    -

    Details

    +

    Details +

    If x is NULL, returns y. Otherwise return x.

    + + - + + - + + diff --git a/latest-tag/reference/h_df_1d_bw.html b/latest-tag/reference/h_df_1d_bw.html index e214f3f06..aff00c0fa 100644 --- a/latest-tag/reference/h_df_1d_bw.html +++ b/latest-tag/reference/h_df_1d_bw.html @@ -1,11 +1,27 @@ - -Calculation of Between-Within Degrees of Freedom for One-Dimensional Contrast — h_df_1d_bw • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,31 +123,39 @@
    -

    Usage

    +

    Usage +

    h_df_1d_bw(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    contrast +

    (numeric)
    contrast vector. Note that this should not include elements for singular coefficient estimates, i.e. only refer to the actually estimated coefficients.

    -
    + +
    -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_df_1d_kr.html b/latest-tag/reference/h_df_1d_kr.html index 419ae119f..ed1c1d994 100644 --- a/latest-tag/reference/h_df_1d_kr.html +++ b/latest-tag/reference/h_df_1d_kr.html @@ -1,13 +1,29 @@ - -Calculation of Kenward-Roger Degrees of Freedom for One-Dimensional Contrast — h_df_1d_kr • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,31 +126,39 @@
    -

    Usage

    +

    Usage +

    h_df_1d_kr(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    contrast +

    (numeric)
    contrast vector. Note that this should not include elements for singular coefficient estimates, i.e. only refer to the actually estimated coefficients.

    -
    + +
    -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_df_1d_res.html b/latest-tag/reference/h_df_1d_res.html index da997fcdc..291b57297 100644 --- a/latest-tag/reference/h_df_1d_res.html +++ b/latest-tag/reference/h_df_1d_res.html @@ -1,13 +1,29 @@ - -Calculation of Residual Degrees of Freedom for One-Dimensional Contrast — h_df_1d_res • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,31 +126,39 @@
    -

    Usage

    +

    Usage +

    h_df_1d_res(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    contrast +

    (numeric)
    contrast vector. Note that this should not include elements for singular coefficient estimates, i.e. only refer to the actually estimated coefficients.

    -
    + +
    -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_df_1d_sat.html b/latest-tag/reference/h_df_1d_sat.html index c1d52ba7d..2a4e90859 100644 --- a/latest-tag/reference/h_df_1d_sat.html +++ b/latest-tag/reference/h_df_1d_sat.html @@ -1,13 +1,29 @@ - -Calculation of Satterthwaite Degrees of Freedom for One-Dimensional Contrast — h_df_1d_sat • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,31 +126,39 @@
    -

    Usage

    +

    Usage +

    h_df_1d_sat(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    contrast +

    (numeric)
    contrast vector. Note that this should not include elements for singular coefficient estimates, i.e. only refer to the actually estimated coefficients.

    -
    + +
    -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_df_bw_calc.html b/latest-tag/reference/h_df_bw_calc.html index 2dd55f79c..f201fb45b 100644 --- a/latest-tag/reference/h_df_bw_calc.html +++ b/latest-tag/reference/h_df_bw_calc.html @@ -1,11 +1,27 @@ - -Calculation of Between-Within Degrees of Freedom — h_df_bw_calc • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,27 +123,37 @@
    -

    Usage

    +

    Usage +

    h_df_bw_calc(object)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the fitted MMRM.

    -
    + +
    -

    Value

    -

    List with:

    + + + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_df_md_bw.html b/latest-tag/reference/h_df_md_bw.html index d859635db..98e9dd40e 100644 --- a/latest-tag/reference/h_df_md_bw.html +++ b/latest-tag/reference/h_df_md_bw.html @@ -1,11 +1,27 @@ - -Calculation of Between-Within Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_bw • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,32 +123,40 @@
    -

    Usage

    +

    Usage +

    h_df_md_bw(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    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

    +

    Value +

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

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_df_md_from_1d.html b/latest-tag/reference/h_df_md_from_1d.html index b1edd3de9..10ae5e194 100644 --- a/latest-tag/reference/h_df_md_from_1d.html +++ b/latest-tag/reference/h_df_md_from_1d.html @@ -1,11 +1,27 @@ - -Creating F-Statistic Results from One-Dimensional Contrast — h_df_md_from_1d • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,30 +123,38 @@
    -

    Usage

    +

    Usage +

    h_df_md_from_1d(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    model fit.

    -
    contrast
    +
    contrast +

    (numeric)
    one-dimensional contrast.

    -
    + +
    -

    Value

    +

    Value +

    The one-dimensional degrees of freedom are calculated and then based on that the p-value is calculated.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_df_md_kr.html b/latest-tag/reference/h_df_md_kr.html index 0325049ac..b2686a5f3 100644 --- a/latest-tag/reference/h_df_md_kr.html +++ b/latest-tag/reference/h_df_md_kr.html @@ -1,11 +1,27 @@ - -Calculation of Kenward-Roger Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_kr • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,32 +123,40 @@
    -

    Usage

    +

    Usage +

    h_df_md_kr(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    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

    +

    Value +

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

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_df_md_res.html b/latest-tag/reference/h_df_md_res.html index d3ffdb9a3..ce38a7e00 100644 --- a/latest-tag/reference/h_df_md_res.html +++ b/latest-tag/reference/h_df_md_res.html @@ -1,11 +1,27 @@ - -Calculation of Residual Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_res • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,32 +123,40 @@
    -

    Usage

    +

    Usage +

    h_df_md_res(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    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

    +

    Value +

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

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_df_md_sat.html b/latest-tag/reference/h_df_md_sat.html index 532696129..370e5a488 100644 --- a/latest-tag/reference/h_df_md_sat.html +++ b/latest-tag/reference/h_df_md_sat.html @@ -1,11 +1,27 @@ - -Calculation of Satterthwaite Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_sat • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,32 +123,40 @@
    -

    Usage

    +

    Usage +

    h_df_md_sat(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    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

    +

    Value +

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

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_df_min_bw.html b/latest-tag/reference/h_df_min_bw.html index a31b34609..2a75bb664 100644 --- a/latest-tag/reference/h_df_min_bw.html +++ b/latest-tag/reference/h_df_min_bw.html @@ -1,11 +1,27 @@ - -Assign Minimum Degrees of Freedom Given Involved Coefficients — h_df_min_bw • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,31 +123,39 @@
    -

    Usage

    +

    Usage +

    h_df_min_bw(bw_calc, is_coef_involved)
    -

    Arguments

    +

    Arguments +

    -
    bw_calc
    +
    +
    bw_calc +

    (list)
    from h_df_bw_calc().

    -
    is_coef_involved
    +
    is_coef_involved +

    (logical)
    whether each coefficient is involved in the contrast.

    -
    + +
    -

    Value

    +

    Value +

    The minimum of the degrees of freedom assigned to each involved coefficient according to its between-within categorization.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_df_to_tibble.html b/latest-tag/reference/h_df_to_tibble.html index 923536c11..84aa65fb0 100644 --- a/latest-tag/reference/h_df_to_tibble.html +++ b/latest-tag/reference/h_df_to_tibble.html @@ -1,11 +1,27 @@ - -Coerce a Data Frame to a tibble — h_df_to_tibble • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + +
    @@ -97,24 +124,31 @@
    -

    Usage

    +

    Usage +

    h_df_to_tibble(data)
    -

    Arguments

    +

    Arguments +

    -
    data
    +
    +
    data +

    (data.frame)
    what to coerce.

    -
    + +
    -

    Value

    +

    Value +

    The data as a tibble, potentially with a .rownames column.

    -

    Details

    +

    Details +

    This is only a thin wrapper around tibble::as_tibble(), except giving a useful error message and it checks for rownames and adds them as a new column .rownames if they are not just a numeric sequence as @@ -122,7 +156,8 @@

    Details

    + + - + + - + + diff --git a/latest-tag/reference/h_drop_covariance_terms.html b/latest-tag/reference/h_drop_covariance_terms.html index f3b64781f..10b51ffee 100644 --- a/latest-tag/reference/h_drop_covariance_terms.html +++ b/latest-tag/reference/h_drop_covariance_terms.html @@ -1,11 +1,27 @@ - -Drop Formula Terms used for Covariance Structure Definition — h_drop_covariance_terms • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,31 +123,39 @@
    -

    Usage

    +

    Usage +

    h_drop_covariance_terms(f)
    -

    Arguments

    +

    Arguments +

    -
    f
    +
    +
    f +

    (formula)
    a formula from which covariance terms should be dropped.

    -
    + +
    -

    Value

    +

    Value +

    The formula without accepted covariance terms.

    -

    Details

    +

    Details +

    terms is used and it will preserve the environment attribute. This ensures the returned formula and the input formula have the same environment.

    + + - + + - + + diff --git a/latest-tag/reference/h_drop_levels.html b/latest-tag/reference/h_drop_levels.html index 58407b387..4f697ee06 100644 --- a/latest-tag/reference/h_drop_levels.html +++ b/latest-tag/reference/h_drop_levels.html @@ -1,11 +1,27 @@ - -Drop Levels from Dataset — h_drop_levels • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,33 +123,42 @@
    -

    Usage

    +

    Usage +

    h_drop_levels(data, subject_var, visit_var, except)
    -

    Arguments

    +

    Arguments +

    -
    data
    +
    +
    data +

    (data.frame) data to drop levels.

    -
    subject_var
    +
    subject_var +

    (character) subject variable.

    -
    visit_var
    +
    visit_var +

    (character) visit variable.

    -
    except
    +
    except +

    (character) variables to exclude from dropping.

    -
    + + + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_extra_levels.html b/latest-tag/reference/h_extra_levels.html index 9874ec433..6dab74b12 100644 --- a/latest-tag/reference/h_extra_levels.html +++ b/latest-tag/reference/h_extra_levels.html @@ -1,11 +1,27 @@ - -Check if a Factor Should Drop Levels — h_extra_levels • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,21 +123,27 @@
    -

    Usage

    +

    Usage +

    h_extra_levels(x)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (vector) vector to check.

    -
    + + + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_extract_covariance_terms.html b/latest-tag/reference/h_extract_covariance_terms.html index 58cf54f83..472dcdf77 100644 --- a/latest-tag/reference/h_extract_covariance_terms.html +++ b/latest-tag/reference/h_extract_covariance_terms.html @@ -1,11 +1,27 @@ - -Extract Formula Terms used for Covariance Structure Definition — h_extract_covariance_terms • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,26 +123,33 @@
    -

    Usage

    +

    Usage +

    h_extract_covariance_terms(f)
    -

    Arguments

    +

    Arguments +

    -
    f
    +
    +
    f +

    (formula)
    a formula from which covariance terms should be extracted.

    -
    + +
    -

    Value

    +

    Value +

    A list of covariance structure expressions found in f.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_first_contain_categorical.html b/latest-tag/reference/h_first_contain_categorical.html index b93382991..64b543c17 100644 --- a/latest-tag/reference/h_first_contain_categorical.html +++ b/latest-tag/reference/h_first_contain_categorical.html @@ -1,11 +1,27 @@ - -Check if the Effect is the First Categorical Effect — h_first_contain_categorical • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,29 +123,37 @@
    -

    Usage

    +

    Usage +

    h_first_contain_categorical(effect, factors, categorical)
    -

    Arguments

    +

    Arguments +

    -
    effect
    +
    +
    effect +

    (string) name of the effect.

    -
    factors
    +
    factors +

    (matrix) the factor matrix.

    -
    categorical
    +
    categorical +

    (character) names of the categorical values.

    -
    + + + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_get_contrast.html b/latest-tag/reference/h_get_contrast.html index 02fc37584..adf09cd2e 100644 --- a/latest-tag/reference/h_get_contrast.html +++ b/latest-tag/reference/h_get_contrast.html @@ -1,11 +1,27 @@ - -Obtain Contrast for Specified Effect — h_get_contrast • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    h_get_contrast(
       object,
       effect,
    @@ -107,32 +134,41 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the fitted MMRM.

    -
    effect
    +
    effect +

    (string) the name of the effect.

    -
    type
    +
    type +

    (string) type of test, "II", "III", '2', or '3'.

    -
    tol
    +
    tol +

    (numeric) threshold blow which values are treated as 0.

    -
    + +
    -

    Value

    +

    Value +

    A matrix of the contrast.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_get_cov_default.html b/latest-tag/reference/h_get_cov_default.html index cd952f7b5..605a84dec 100644 --- a/latest-tag/reference/h_get_cov_default.html +++ b/latest-tag/reference/h_get_cov_default.html @@ -1,13 +1,29 @@ - -Obtain Default Covariance Method — h_get_cov_default • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,26 +126,33 @@
    -

    Usage

    +

    Usage +

    h_get_cov_default(
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within")
     )
    -

    Arguments

    +

    Arguments +

    -
    method
    +
    +
    method +

    (string)
    degrees of freedom method.

    -
    + +
    -

    Value

    +

    Value +

    String of the default covariance method.

    -

    Details

    +

    Details +

    The default covariance method is different for different degrees of freedom method. For "Satterthwaite" or "Between-Within", "Asymptotic" is returned. For "Kenward-Roger" only, "Kenward-Roger" is returned. @@ -127,7 +160,8 @@

    Details

    + + - + + - + + diff --git a/latest-tag/reference/h_get_empirical.html b/latest-tag/reference/h_get_empirical.html index aa4619a6d..db5846d8b 100644 --- a/latest-tag/reference/h_get_empirical.html +++ b/latest-tag/reference/h_get_empirical.html @@ -1,15 +1,31 @@ - -Obtain Empirical/Jackknife/Bias-Reduced Covariance — h_get_empirical • mmrm + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,43 +129,57 @@
    -

    Usage

    +

    Usage +

    h_get_empirical(tmb_data, theta, beta, beta_vcov, type)
    -

    Arguments

    +

    Arguments +

    -
    tmb_data
    +
    +
    tmb_data +

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    -
    theta
    +
    theta +

    (numeric)
    theta estimate.

    -
    beta
    +
    beta +

    (numeric)
    beta estimate.

    -
    beta_vcov
    +
    beta_vcov +

    (matrix)
    covariance of beta estimate.

    -
    type
    +
    type +

    (string)
    type of empirical method, including "Empirical", "Empirical-Jackknife" and "Empirical-Bias-Reduced".

    -
    + +
    -

    Value

    -

    Named list with elements:

    • cov: matrix empirical covariance.

    • +

      Value +

      +

      Named list with elements:

      +
        +
      • cov: matrix empirical covariance.

      • df_mat: matrix to calculate Satterthwaite degree of freedom.

      • -
    + + + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_get_index.html b/latest-tag/reference/h_get_index.html index 8738e432f..4bb33adf8 100644 --- a/latest-tag/reference/h_get_index.html +++ b/latest-tag/reference/h_get_index.html @@ -1,11 +1,27 @@ - -Test if the First Vector is Subset of the Second Vector — h_get_index • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_get_index(x, y)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (vector) the first list.

    -
    y
    +
    y +

    (vector) the second list.

    -
    + + + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_get_kr_comp.html b/latest-tag/reference/h_get_kr_comp.html index 507928344..488edeb64 100644 --- a/latest-tag/reference/h_get_kr_comp.html +++ b/latest-tag/reference/h_get_kr_comp.html @@ -1,13 +1,29 @@ - -Obtain Kenward-Roger Adjustment Components — h_get_kr_comp • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,30 +126,41 @@
    -

    Usage

    +

    Usage +

    h_get_kr_comp(tmb_data, theta)
    -

    Arguments

    +

    Arguments +

    -
    tmb_data
    +
    +
    tmb_data +

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    -
    theta
    +
    theta +

    (numeric)
    theta estimate.

    -
    + +
    -

    Value

    -

    Named list with elements:

    • P: matrix of \(P\) component.

    • +

      Value +

      +

      Named list with elements:

      +
        +
      • P: matrix of \(P\) component.

      • Q: matrix of \(Q\) component.

      • R: matrix of \(R\) component.

      • -
    + +
    -

    Details

    +

    Details +

    the function returns a named list, \(P\), \(Q\) and \(R\), which corresponds to the paper in 1997. The matrices are stacked in columns so that \(P\), \(Q\) and \(R\) has the same column number(number of beta parameters). The number of rows, is dependent on @@ -135,7 +172,8 @@

    Details

    + + - + + - + + diff --git a/latest-tag/reference/h_get_na_action.html b/latest-tag/reference/h_get_na_action.html index 527db115e..fc87515cc 100644 --- a/latest-tag/reference/h_get_na_action.html +++ b/latest-tag/reference/h_get_na_action.html @@ -1,11 +1,27 @@ - -Obtain na.action as Function — h_get_na_action • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,12 +123,14 @@
    -

    Usage

    +

    Usage +

    h_get_na_action(na_action)
    - + + - + + - + + diff --git a/latest-tag/reference/h_get_optimizers.html b/latest-tag/reference/h_get_optimizers.html index 151793c3b..7fde7b995 100644 --- a/latest-tag/reference/h_get_optimizers.html +++ b/latest-tag/reference/h_get_optimizers.html @@ -1,11 +1,27 @@ - -Obtain Optimizer according to Optimizer String Value — h_get_optimizers • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    h_get_optimizers(
       optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"),
       optimizer_fun = h_optimizer_fun(optimizer),
    @@ -107,49 +134,65 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    optimizer
    +
    +
    optimizer +

    (character)
    names of built-in optimizers to try, subset of "L-BFGS-B", "BFGS", "CG" and "nlminb".

    -
    optimizer_fun
    +
    optimizer_fun +

    (function or list of function)
    alternatively to optimizer, an optimizer function or a list of optimizer functions can be passed directly here.

    -
    optimizer_args
    +
    optimizer_args +

    (list)
    additional arguments for optimizer_fun.

    -
    optimizer_control
    +
    optimizer_control +

    (list)
    passed to argument control in optimizer_fun.

    -
    + +
    -

    Value

    +

    Value +

    Named list of optimizers created by h_partial_fun_args().

    -

    Details

    -

    If you want to use only the built-in optimizers:

    • optimizer is a shortcut to create a list of built-in optimizer functions +

      Details +

      +

      If you want to use only the built-in optimizers:

      +
        +
      • optimizer is a shortcut to create a list of built-in optimizer functions passed to optimizer_fun.

      • Allowed are "L-BFGS-B", "BFGS", "CG" (using stats::optim() with corresponding method) and "nlminb" (using stats::nlminb()).

      • Other arguments should go into optimizer_args.

      • -

      If you want to use your own optimizer function:

      • Make sure that there are three arguments: parameter (start value), objective function +

      +

      If you want to use your own optimizer function:

      +
        +
      • Make sure that there are three arguments: parameter (start value), objective function and gradient function are sequentially in the function arguments.

      • If there are other named arguments in front of these, make sure they are correctly specified through optimizer_args.

      • If the hessian can be used, please make sure its argument name is hessian and please add attribute use_hessian = TRUE to the function, using attr(fun, "use_hessian) <- TRUE.

      • -
    + + + + - + + - + + diff --git a/latest-tag/reference/h_get_prediction.html b/latest-tag/reference/h_get_prediction.html index 6d7bd366a..4c5e99d9e 100644 --- a/latest-tag/reference/h_get_prediction.html +++ b/latest-tag/reference/h_get_prediction.html @@ -1,11 +1,27 @@ - -Get Prediction — h_get_prediction • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,43 +123,57 @@
    -

    Usage

    +

    Usage +

    h_get_prediction(tmb_data, theta, beta, beta_vcov)
    -

    Arguments

    +

    Arguments +

    -
    tmb_data
    +
    +
    tmb_data +

    (mmrm_tmb_data)
    object.

    -
    theta
    +
    theta +

    (numeric)
    theta value.

    -
    beta
    +
    beta +

    (numeric)
    beta value.

    -
    beta_vcov
    +
    beta_vcov +

    (matrix)
    beta_vcov matrix.

    -
    + +
    -

    Value

    -

    List with:

    • prediction: Matrix with columns fit, conf_var, and var.

    • +

      Value +

      +

      List with:

      +
        +
      • prediction: Matrix with columns fit, conf_var, and var.

      • covariance: List with subject specific covariance matrices.

      • index: List of zero-based subject indices.

      • -
    + +
    -

    Details

    +

    Details +

    See predict function in predict.cpp which is called internally.

    + + - + + - + + diff --git a/latest-tag/reference/h_get_prediction_variance.html b/latest-tag/reference/h_get_prediction_variance.html index 54dff1145..cc0762ccf 100644 --- a/latest-tag/reference/h_get_prediction_variance.html +++ b/latest-tag/reference/h_get_prediction_variance.html @@ -1,11 +1,27 @@ - -Get Prediction Variance — h_get_prediction_variance • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,29 +123,37 @@
    -

    Usage

    +

    Usage +

    h_get_prediction_variance(object, nsim, tmb_data)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm_tmb)
    the fitted MMRM.

    -
    nsim
    +
    nsim +

    (count)
    number of samples.

    -
    tmb_data
    +
    tmb_data +

    (mmrm_tmb_data)
    object.

    -
    + + + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_get_sim_per_subj.html b/latest-tag/reference/h_get_sim_per_subj.html index ce431ffd8..ab6829a4f 100644 --- a/latest-tag/reference/h_get_sim_per_subj.html +++ b/latest-tag/reference/h_get_sim_per_subj.html @@ -1,11 +1,27 @@ - -Get simulated values by patient. — h_get_sim_per_subj • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,29 +123,37 @@
    -

    Usage

    +

    Usage +

    h_get_sim_per_subj(predict_res, nsub, nsim)
    -

    Arguments

    +

    Arguments +

    -
    predict_res
    +
    +
    predict_res +

    (list)
    from h_get_prediction().

    -
    nsub
    +
    nsub +

    (count)
    number of subjects.

    -
    nsim
    +
    nsim +

    (count)
    number of values to simulate.

    -
    + + + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_get_theta_from_cov.html b/latest-tag/reference/h_get_theta_from_cov.html index 178d9cf0a..70935dfdb 100644 --- a/latest-tag/reference/h_get_theta_from_cov.html +++ b/latest-tag/reference/h_get_theta_from_cov.html @@ -1,11 +1,27 @@ - -Obtain Theta from Covariance Matrix — h_get_theta_from_cov • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,30 +123,38 @@
    -

    Usage

    +

    Usage +

    h_get_theta_from_cov(covariance)
    -

    Arguments

    +

    Arguments +

    -
    covariance
    +
    +
    covariance +

    (matrix) of covariance matrix values.

    -
    + +
    -

    Value

    +

    Value +

    Numeric vector of the theta values.

    -

    Details

    +

    Details +

    If the covariance matrix has NA in some of the elements, they will be replaced by 0 (non-diagonal) and 1 (diagonal). This ensures that the matrix is positive definite.

    + + - + + - + + diff --git a/latest-tag/reference/h_gradient.html b/latest-tag/reference/h_gradient.html index 2b8dc0b7c..22bfbaeee 100644 --- a/latest-tag/reference/h_gradient.html +++ b/latest-tag/reference/h_gradient.html @@ -1,13 +1,29 @@ - -Computation of a Gradient Given Jacobian and Contrast Vector — h_gradient • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,32 +126,40 @@
    -

    Usage

    +

    Usage +

    h_gradient(jac_list, contrast)
    -

    Arguments

    +

    Arguments +

    -
    jac_list
    +
    +
    jac_list +

    (list)
    Jacobian list produced e.g. by h_jac_list().

    -
    contrast
    +
    contrast +

    (numeric)
    contrast vector, which needs to have the same number of elements as there are rows and columns in each element of jac_list.

    -
    + +
    -

    Value

    +

    Value +

    Numeric vector which contains the quadratic forms of each element of jac_list with the contrast vector.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_jac_list.html b/latest-tag/reference/h_jac_list.html index b8fbd2e1d..e63e51dc2 100644 --- a/latest-tag/reference/h_jac_list.html +++ b/latest-tag/reference/h_jac_list.html @@ -1,11 +1,27 @@ - -Obtain List of Jacobian Matrix Entries for Covariance Matrix — h_jac_list • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,35 +123,44 @@
    -

    Usage

    +

    Usage +

    h_jac_list(tmb_data, theta_est, beta_vcov)
    -

    Arguments

    +

    Arguments +

    -
    tmb_data
    +
    +
    tmb_data +

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    -
    theta_est
    +
    theta_est +

    (numeric)
    variance parameters point estimate.

    -
    beta_vcov
    +
    beta_vcov +

    (matrix)
    vairance covariance matrix of coefficients.

    -
    + +
    -

    Value

    +

    Value +

    List with one element per variance parameter containing a matrix of the same dimensions as the covariance matrix. The values are the derivatives with regards to this variance parameter.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_kr_df.html b/latest-tag/reference/h_kr_df.html index 428e0ef60..8c7b3bad5 100644 --- a/latest-tag/reference/h_kr_df.html +++ b/latest-tag/reference/h_kr_df.html @@ -1,13 +1,29 @@ - -Obtain the Adjusted Kenward-Roger degrees of freedom — h_kr_df • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,38 +126,51 @@
    -

    Usage

    +

    Usage +

    h_kr_df(v0, l, w, p)
    -

    Arguments

    +

    Arguments +

    -
    v0
    +
    +
    v0 +

    (matrix)
    unadjusted covariance matrix.

    -
    l
    +
    l +

    (matrix)
    linear combination matrix.

    -
    w
    +
    w +

    (matrix)
    hessian matrix.

    -
    p
    +
    p +

    (matrix)
    P matrix from h_get_kr_comp().

    -
    + +
    -

    Value

    -

    Named list with elements:

    • m: numeric degrees of freedom.

    • +

      Value +

      +

      Named list with elements:

      +
        +
      • m: numeric degrees of freedom.

      • lambda: numeric F statistic scale parameter.

      • -
    + + + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_md_denom_df.html b/latest-tag/reference/h_md_denom_df.html index 1e1206c32..8dc0c0e6b 100644 --- a/latest-tag/reference/h_md_denom_df.html +++ b/latest-tag/reference/h_md_denom_df.html @@ -1,11 +1,27 @@ - -Calculating Denominator Degrees of Freedom for the Multi-Dimensional Case — h_md_denom_df • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,32 +123,40 @@
    -

    Usage

    +

    Usage +

    h_md_denom_df(t_stat_df)
    -

    Arguments

    +

    Arguments +

    -
    t_stat_df
    +
    +
    t_stat_df +

    (numeric)
    n t-statistic derived degrees of freedom.

    -
    + +
    -

    Value

    +

    Value +

    Usually the calculation is returning 2 * E / (E - n) where E is the sum of t / (t - 2) over all t_stat_df values t.

    -

    Note

    +

    Note +

    If the input values are two similar to each other then just the average of them is returned. If any of the inputs is not larger than 2 then 2 is returned.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_mmrm_tmb_assert_start.html b/latest-tag/reference/h_mmrm_tmb_assert_start.html index 503cbe75c..0e3d70b7a 100644 --- a/latest-tag/reference/h_mmrm_tmb_assert_start.html +++ b/latest-tag/reference/h_mmrm_tmb_assert_start.html @@ -1,11 +1,27 @@ - -Asserting Sane Start Values for TMB Fit — h_mmrm_tmb_assert_start • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_assert_start(tmb_object)
    -

    Arguments

    +

    Arguments +

    -
    tmb_object
    +
    +
    tmb_object +

    (list)
    created with TMB::MakeADFun().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used for assertions.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_mmrm_tmb_check_conv.html b/latest-tag/reference/h_mmrm_tmb_check_conv.html index 4599939b0..dcce13cc5 100644 --- a/latest-tag/reference/h_mmrm_tmb_check_conv.html +++ b/latest-tag/reference/h_mmrm_tmb_check_conv.html @@ -1,11 +1,27 @@ - -Checking the TMB Optimization Result — h_mmrm_tmb_check_conv • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,30 +123,38 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_check_conv(tmb_opt, mmrm_tmb)
    -

    Arguments

    +

    Arguments +

    -
    tmb_opt
    +
    +
    tmb_opt +

    (list)
    optimization result.

    -
    mmrm_tmb
    +
    mmrm_tmb +

    (mmrm_tmb)
    result from h_mmrm_tmb_fit().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used to generate warnings in case that the model did not converge.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_mmrm_tmb_data.html b/latest-tag/reference/h_mmrm_tmb_data.html index 3a9b2f2ef..d90b1b666 100644 --- a/latest-tag/reference/h_mmrm_tmb_data.html +++ b/latest-tag/reference/h_mmrm_tmb_data.html @@ -1,11 +1,27 @@ - -Data for TMB Fit — h_mmrm_tmb_data • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_data(
       formula_parts,
       data,
    @@ -113,47 +140,61 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    formula_parts
    +
    +
    formula_parts +

    (mmrm_tmb_formula_parts)
    list with formula parts from h_mmrm_tmb_formula_parts().

    -
    data
    +
    data +

    (data.frame)
    which contains variables used in formula_parts.

    -
    weights
    +
    weights +

    (vector)
    weights to be used in the fitting process.

    -
    reml
    +
    reml +

    (flag)
    whether restricted maximum likelihood (REML) estimation is used, otherwise maximum likelihood (ML) is used.

    -
    singular
    +
    singular +

    (string)
    choices of method deal with rank-deficient matrices. "error" to stop the function return the error, "drop" to drop these columns, and "keep" to keep all the columns.

    -
    drop_visit_levels
    +
    drop_visit_levels +

    (flag)
    whether to drop levels for visit variable, if visit variable is a factor.

    -
    allow_na_response
    +
    allow_na_response +

    (flag)
    whether NA in response is allowed.

    -
    drop_levels
    +
    drop_levels +

    (flag)
    whether drop levels for covariates. If not dropped could lead to singular matrix.

    -
    + +
    -

    Value

    -

    List of class mmrm_tmb_data with elements:

    • full_frame: data.frame with n rows containing all variables needed in the model.

    • +

      Value +

      +

      List of class mmrm_tmb_data with elements:

      +
        +
      • full_frame: data.frame with n rows containing all variables needed in the model.

      • data: data.frame of input dataset.

      • x_matrix: matrix with n rows and p columns specifying the overall design matrix.

      • x_cols_aliased: logical with potentially more than p elements indicating which @@ -173,9 +214,11 @@

        Value

        reml: int specifying whether REML estimation is used (1), otherwise ML (0).

      • subject_groups: factor specifying the grouping for each subject.

      • n_groups: int with the number of total groups

      • -
    + +
    -

    Details

    +

    Details +

    Note that the subject_var must not be factor but can also be character. If it is character, then it will be converted to factor internally. Here the levels will be the unique values, sorted alphabetically and numerically if there @@ -184,7 +227,8 @@

    Details

    + + - + + - + + diff --git a/latest-tag/reference/h_mmrm_tmb_extract_cov.html b/latest-tag/reference/h_mmrm_tmb_extract_cov.html index 0ae1153c1..e2e28f89f 100644 --- a/latest-tag/reference/h_mmrm_tmb_extract_cov.html +++ b/latest-tag/reference/h_mmrm_tmb_extract_cov.html @@ -1,13 +1,29 @@ - -Extract covariance matrix from TMB report and input data — h_mmrm_tmb_extract_cov • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,39 +126,49 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_extract_cov(tmb_report, tmb_data, visit_var, is_spatial)
    -

    Arguments

    +

    Arguments +

    -
    tmb_report
    +
    +
    tmb_report +

    (list)
    report created with TMB::MakeADFun() report function.

    -
    tmb_data
    +
    tmb_data +

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    -
    visit_var
    +
    visit_var +

    (character)
    character vector of the visit variable

    -
    is_spatial
    +
    is_spatial +

    (flag)
    indicator whether the covariance structure is spatial.

    -
    + +
    -

    Value

    +

    Value +

    Return a simple covariance matrix if there is no grouping, or a named list of estimated grouped covariance matrices, with its name equal to the group levels.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_mmrm_tmb_fit.html b/latest-tag/reference/h_mmrm_tmb_fit.html index 1df4ffabe..effca18aa 100644 --- a/latest-tag/reference/h_mmrm_tmb_fit.html +++ b/latest-tag/reference/h_mmrm_tmb_fit.html @@ -1,13 +1,29 @@ - -Build TMB Fit Result List — h_mmrm_tmb_fit • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,34 +126,45 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_fit(tmb_object, tmb_opt, formula_parts, tmb_data)
    -

    Arguments

    +

    Arguments +

    -
    tmb_object
    +
    +
    tmb_object +

    (list)
    created with TMB::MakeADFun().

    -
    tmb_opt
    +
    tmb_opt +

    (list)
    optimization result.

    -
    formula_parts
    +
    formula_parts +

    (mmrm_tmb_formula_parts)
    produced by h_mmrm_tmb_formula_parts().

    -
    tmb_data
    +
    tmb_data +

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    -
    + +
    -

    Value

    -

    List of class mmrm_tmb with:

    • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

    • +

      Value +

      +

      List of class mmrm_tmb with:

      +
        +
      • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

      • beta_est: vector of coefficient estimates.

      • beta_vcov: Variance-covariance matrix for coefficient estimates.

      • beta_vcov_inv_L: Lower triangular matrix L of the inverse variance-covariance matrix decomposition.

      • @@ -142,16 +179,19 @@

        Value

        opt_details: list with optimization details including convergence code.

      • tmb_object: original TMB object created with TMB::MakeADFun().

      • tmb_data: input.

      • -
    + +
    -

    Details

    +

    Details +

    Instead of inverting or decomposing beta_vcov, it can be more efficient to use its robust Cholesky decomposition LDL^T, therefore we return the corresponding two components L and D as well since they have been available on the C++ side already.

    + + - + + - + + diff --git a/latest-tag/reference/h_mmrm_tmb_formula_parts.html b/latest-tag/reference/h_mmrm_tmb_formula_parts.html index 0a8950ec8..0d06f7fe7 100644 --- a/latest-tag/reference/h_mmrm_tmb_formula_parts.html +++ b/latest-tag/reference/h_mmrm_tmb_formula_parts.html @@ -1,11 +1,27 @@ - -Processing the Formula for TMB Fit — h_mmrm_tmb_formula_parts • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_formula_parts(
       formula,
       covariance = as.cov_struct(formula, warn_partial = FALSE)
    @@ -105,21 +132,29 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    formula
    +
    +
    formula +

    (formula)
    Original formula.

    -
    covariance
    +
    covariance +

    (cov_struct)
    A covariance structure from which additional formula parts should be added.

    -
    + +
    -

    Value

    -

    List of class mmrm_tmb_formula_parts with elements:

    • formula: the original input.

    • +

      Value +

      +

      List of class mmrm_tmb_formula_parts with elements:

      +
        +
      • formula: the original input.

      • model_formula: formula with the covariance term is removed.

      • model_formula: formula with the covariance term removed.

      • full_formula: same as model_formula but includes the covariance @@ -132,10 +167,12 @@

        Value

        group_var: string with the group variable name. If no group specified, this element is NULL.

      • model_var: character with the variables names of the formula, except subject_var.

      • -
    + + + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_mmrm_tmb_parameters.html b/latest-tag/reference/h_mmrm_tmb_parameters.html index 6262c852c..f10906e53 100644 --- a/latest-tag/reference/h_mmrm_tmb_parameters.html +++ b/latest-tag/reference/h_mmrm_tmb_parameters.html @@ -1,11 +1,27 @@ - -Start Parameters for TMB Fit — h_mmrm_tmb_parameters • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,40 +123,50 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_parameters(formula_parts, tmb_data, start, n_groups = 1L)
    -

    Arguments

    +

    Arguments +

    -
    formula_parts
    +
    +
    formula_parts +

    (mmrm_tmb_formula_parts)
    produced by h_mmrm_tmb_formula_parts().

    -
    tmb_data
    +
    tmb_data +

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    -
    start
    +
    start +

    (numeric or NULL)
    optional start values for variance parameters.

    -
    n_groups
    +
    n_groups +

    (int)
    number of groups.

    -
    + +
    -

    Value

    +

    Value +

    List with element theta containing the start values for the variance parameters.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_newdata_add_pred.html b/latest-tag/reference/h_newdata_add_pred.html index 276d386cf..bc59c3df0 100644 --- a/latest-tag/reference/h_newdata_add_pred.html +++ b/latest-tag/reference/h_newdata_add_pred.html @@ -1,11 +1,27 @@ - -Add Prediction Results to New Data — h_newdata_add_pred • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,44 +123,55 @@
    -

    Usage

    +

    Usage +

    h_newdata_add_pred(x, newdata, se_fit, interval, ...)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (mmrm)
    fit.

    -
    newdata
    +
    newdata +

    (data.frame)
    data to predict.

    -
    se_fit
    +
    se_fit +

    (flag)
    whether to return standard error of prediction, can only be used when interval is not "none".

    -
    interval
    +
    interval +

    (string)
    type of interval.

    -
    ...
    +
    ... +

    passed to predict.mmrm_tmb().

    -
    + +
    -

    Value

    +

    Value +

    The newdata as a tibble with additional columns .fitted, .lower, .upper (if interval is not none) and .se.fit (if se_fit requested).

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_obtain_lvls.html b/latest-tag/reference/h_obtain_lvls.html index a9030ed77..8a2274cb4 100644 --- a/latest-tag/reference/h_obtain_lvls.html +++ b/latest-tag/reference/h_obtain_lvls.html @@ -1,11 +1,27 @@ - -Obtain Levels Prior and Posterior — h_obtain_lvls • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,33 +123,42 @@
    -

    Usage

    +

    Usage +

    h_obtain_lvls(var, additional_vars, xlev, factors)
    -

    Arguments

    +

    Arguments +

    -
    var
    +
    +
    var +

    (string) name of the effect.

    -
    additional_vars
    +
    additional_vars +

    (character) names of additional variables.

    -
    xlev
    +
    xlev +

    (list) named list of character levels.

    -
    factors
    +
    factors +

    (matrix) the factor matrix.

    -
    + + + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_optimizer_fun.html b/latest-tag/reference/h_optimizer_fun.html index 73b5e3ebc..2c22ae1da 100644 --- a/latest-tag/reference/h_optimizer_fun.html +++ b/latest-tag/reference/h_optimizer_fun.html @@ -1,11 +1,27 @@ - -Obtain Optimizer Function with Character — h_optimizer_fun • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_optimizer_fun(optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"))
    -

    Arguments

    +

    Arguments +

    -
    optimizer
    +
    +
    optimizer +

    (character)
    vector of optimizers.

    -
    + +
    -

    Value

    +

    Value +

    A (list)
    of optimizer functions generated from h_partial_fun_args().

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_partial_fun_args.html b/latest-tag/reference/h_partial_fun_args.html index f71fc7956..ddf8dc9f8 100644 --- a/latest-tag/reference/h_partial_fun_args.html +++ b/latest-tag/reference/h_partial_fun_args.html @@ -1,11 +1,27 @@ - -Create Partial Functions — h_partial_fun_args • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,33 +123,42 @@
    -

    Usage

    +

    Usage +

    h_partial_fun_args(fun, ..., additional_attr = list())
    -

    Arguments

    +

    Arguments +

    -
    fun
    +
    +
    fun +

    (function)
    to be wrapped.

    -
    ...
    +
    ... +

    Additional arguments for fun.

    -
    additional_attr
    +
    additional_attr +

    (list)
    of additional attributes to apply to the result.

    -
    + +
    -

    Value

    +

    Value +

    Object with S3 class "partial", a function with args attribute (and possibly more attributes from additional_attr).

    -

    Details

    +

    Details +

    This function add args attribute to the original function, and add an extra class partial to the function. args is the argument for the function, and elements in ... will override the existing @@ -131,7 +166,8 @@

    Details

    + + - + + - + + diff --git a/latest-tag/reference/h_print_aic_list.html b/latest-tag/reference/h_print_aic_list.html index ceb60cce8..d638fbdea 100644 --- a/latest-tag/reference/h_print_aic_list.html +++ b/latest-tag/reference/h_print_aic_list.html @@ -1,11 +1,27 @@ - -Printing AIC and other Model Fit Criteria — h_print_aic_list • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_print_aic_list(aic_list, digits = 1)
    -

    Arguments

    +

    Arguments +

    -
    aic_list
    +
    +
    aic_list +

    (list)
    list as part of from summary.mmrm().

    -
    digits
    +
    digits +

    (number)
    number of decimal places used with round().

    -
    + + + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_print_call.html b/latest-tag/reference/h_print_call.html index be1c6fa90..772021560 100644 --- a/latest-tag/reference/h_print_call.html +++ b/latest-tag/reference/h_print_call.html @@ -1,11 +1,27 @@ - -Printing MMRM Function Call — h_print_call • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,33 +123,42 @@
    -

    Usage

    +

    Usage +

    h_print_call(call, n_obs, n_subjects, n_timepoints)
    -

    Arguments

    +

    Arguments +

    -
    call
    +
    +
    call +

    (call)
    original mmrm() function call.

    -
    n_obs
    +
    n_obs +

    (int)
    number of observations.

    -
    n_subjects
    +
    n_subjects +

    (int)
    number of subjects.

    -
    n_timepoints
    +
    n_timepoints +

    (int)
    number of timepoints.

    -
    + + + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_print_cov.html b/latest-tag/reference/h_print_cov.html index b160d4cc6..04423919f 100644 --- a/latest-tag/reference/h_print_cov.html +++ b/latest-tag/reference/h_print_cov.html @@ -1,11 +1,27 @@ - -Printing MMRM Covariance Type — h_print_cov • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,29 +123,37 @@
    -

    Usage

    +

    Usage +

    h_print_cov(cov_type, n_theta, n_groups)
    -

    Arguments

    +

    Arguments +

    -
    cov_type
    +
    +
    cov_type +

    (string)
    covariance structure abbreviation.

    -
    n_theta
    +
    n_theta +

    (count)
    number of variance parameters.

    -
    n_groups
    +
    n_groups +

    (count)
    number of groups.

    -
    + + + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_quad_form.html b/latest-tag/reference/h_quad_form.html index fd5763eac..5bfc6b3d5 100644 --- a/latest-tag/reference/h_quad_form.html +++ b/latest-tag/reference/h_quad_form.html @@ -1,13 +1,29 @@ - -Quadratic Form Calculations — h_quad_form • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,43 +126,54 @@
    -

    Usage

    +

    Usage +

    h_quad_form_vec(vec, center)
     
     h_quad_form_mat(mat, center)
    -

    Arguments

    +

    Arguments +

    -
    vec
    +
    +
    vec +

    (numeric)
    interpreted as a row vector.

    -
    center
    +
    center +

    (matrix)
    square numeric matrix with the same dimensions as x as the center of the quadratic form.

    -
    mat
    +
    mat +

    (matrix)
    numeric matrix to be multiplied left and right of center, therefore needs to have as many columns as there are rows and columns in center.

    -
    + +
    -

    Functions

    +

    Functions +

    -
    • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) +

        +
      • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) as a numeric (not a matrix).

      • h_quad_form_mat(): calculates the quadratic form mat %*% center %*% t(mat) as a matrix, the result is square and has dimensions identical to the number of rows in mat.

      • -
    + + + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_reconcile_cov_struct.html b/latest-tag/reference/h_reconcile_cov_struct.html index b107b182d..4d809a91b 100644 --- a/latest-tag/reference/h_reconcile_cov_struct.html +++ b/latest-tag/reference/h_reconcile_cov_struct.html @@ -1,11 +1,27 @@ - -Reconcile Possible Covariance Structure Inputs — h_reconcile_cov_struct • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,34 +123,42 @@
    -

    Usage

    +

    Usage +

    h_reconcile_cov_struct(formula = NULL, covariance = NULL)
    -

    Arguments

    +

    Arguments +

    -
    formula
    +
    +
    formula +

    (formula)
    the model formula, see details.

    -
    covariance
    +
    covariance +

    (cov_struct)
    a covariance structure type definition as produced with cov_struct(), or value that can be coerced to a covariance structure using as.cov_struct(). If no value is provided, a structure is derived from the provided formula.

    -
    + +
    -

    Value

    +

    Value +

    The value covariance if it's provided or a covariance structure derived from the provided formula otherwise. An error is raised of both are provided.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_record_all_output.html b/latest-tag/reference/h_record_all_output.html index e34355c78..2675b2ace 100644 --- a/latest-tag/reference/h_record_all_output.html +++ b/latest-tag/reference/h_record_all_output.html @@ -1,15 +1,31 @@ - -Capture all Output — h_record_all_output • mmrm + + + + + +Capture all Output — h_record_all_output • mmrm + + + + + + + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,41 +129,53 @@
    -

    Usage

    +

    Usage +

    h_record_all_output(expr, remove = list(), divergence = list())
    -

    Arguments

    +

    Arguments +

    -
    expr
    +
    +
    expr +

    (expression)
    to be executed.

    -
    remove
    +
    remove +

    (list)
    optional list with elements warnings, errors, messages which can be character vectors, which will be removed from the results if specified.

    -
    divergence
    +
    divergence +

    (list)
    optional list similar as remove, but these character vectors will be moved to the divergence result and signal that the fit did not converge.

    -
    + +
    -

    Value

    -

    A list containing

    • result: The object returned by expr or list() if an error was thrown.

    • +

      Value +

      +

      A list containing

      +
        +
      • result: The object returned by expr or list() if an error was thrown.

      • warnings: NULL or a character vector if warnings were thrown.

      • errors: NULL or a string if an error was thrown.

      • messages: NULL or a character vector if messages were produced.

      • divergence: NULL or a character vector if divergence messages were caught.

      • -
    + + + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_register_s3.html b/latest-tag/reference/h_register_s3.html index 84a50a7af..d2e1bc3b5 100644 --- a/latest-tag/reference/h_register_s3.html +++ b/latest-tag/reference/h_register_s3.html @@ -1,13 +1,29 @@ - -Register S3 Method Register S3 method to a generic. — h_register_s3 • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,37 +126,47 @@
    -

    Usage

    +

    Usage +

    h_register_s3(pkg, generic, class, envir = parent.frame())
    -

    Arguments

    +

    Arguments +

    -
    pkg
    +
    +
    pkg +

    (string) name of the package name.

    -
    generic
    +
    generic +

    (string) name of the generic.

    -
    class
    +
    class +

    (string) class name the function want to dispatch.

    -
    envir
    +
    envir +

    (environment) the location the method is defined.

    -
    + +
    -

    Details

    +

    Details +

    This function is adapted from emmeans:::register_s3_method().

    + + - + + - + + diff --git a/latest-tag/reference/h_residuals_normalized.html b/latest-tag/reference/h_residuals_normalized.html index 98d5b149c..45446a6bd 100644 --- a/latest-tag/reference/h_residuals_normalized.html +++ b/latest-tag/reference/h_residuals_normalized.html @@ -1,11 +1,27 @@ - -Calculate normalized residuals — h_residuals_normalized • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_residuals_normalized(object)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_residuals_pearson.html b/latest-tag/reference/h_residuals_pearson.html index da4f0c031..9d2c050e3 100644 --- a/latest-tag/reference/h_residuals_pearson.html +++ b/latest-tag/reference/h_residuals_pearson.html @@ -1,11 +1,27 @@ - -Calculate Pearson Residuals — h_residuals_pearson • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_residuals_pearson(object)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_residuals_response.html b/latest-tag/reference/h_residuals_response.html index 6aa7307b0..a5f29a013 100644 --- a/latest-tag/reference/h_residuals_response.html +++ b/latest-tag/reference/h_residuals_response.html @@ -1,11 +1,27 @@ - -Calculate response residuals. — h_residuals_response • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_residuals_response(object)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_split_control.html b/latest-tag/reference/h_split_control.html index 51a2a00a5..83897fcac 100644 --- a/latest-tag/reference/h_split_control.html +++ b/latest-tag/reference/h_split_control.html @@ -1,13 +1,29 @@ - -Split Control List — h_split_control • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,29 +126,37 @@
    -

    Usage

    +

    Usage +

    h_split_control(control, ...)
    -

    Arguments

    +

    Arguments +

    -
    control
    +
    +
    control +

    (mmrm_control)
    object.

    -
    ...
    +
    ... +

    additional parameters to update the control object.

    -
    + +
    -

    Value

    +

    Value +

    A list of mmrm_control entries.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_summarize_all_fits.html b/latest-tag/reference/h_summarize_all_fits.html index 84f69913d..928756218 100644 --- a/latest-tag/reference/h_summarize_all_fits.html +++ b/latest-tag/reference/h_summarize_all_fits.html @@ -1,11 +1,27 @@ - -Summarizing List of Fits — h_summarize_all_fits • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_summarize_all_fits(all_fits)
    -

    Arguments

    +

    Arguments +

    -
    all_fits
    +
    +
    all_fits +

    (list of mmrm_fit or try-error)
    list of fits.

    -
    + +
    -

    Value

    +

    Value +

    List with warnings, messages, log_liks and converged results.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_tbl_confint_terms.html b/latest-tag/reference/h_tbl_confint_terms.html index 9f69d182a..d4649cc23 100644 --- a/latest-tag/reference/h_tbl_confint_terms.html +++ b/latest-tag/reference/h_tbl_confint_terms.html @@ -1,11 +1,27 @@ - -Extract tibble with Confidence Intervals and Term Names — h_tbl_confint_terms • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,29 +123,37 @@
    -

    Usage

    +

    Usage +

    h_tbl_confint_terms(x, ...)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (mmrm)
    fit object.

    -
    ...
    +
    ... +

    passed to stats::confint(), hence not used at the moment.

    -
    + +
    -

    Value

    +

    Value +

    A tibble with term, conf.low, conf.high columns.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_test_1d.html b/latest-tag/reference/h_test_1d.html index 5e48de9d3..c7ad254ad 100644 --- a/latest-tag/reference/h_test_1d.html +++ b/latest-tag/reference/h_test_1d.html @@ -1,13 +1,29 @@ - -Creating T-Statistic Test Results For One-Dimensional Contrast — h_test_1d • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,35 +126,44 @@
    -

    Usage

    +

    Usage +

    h_test_1d(object, contrast, df)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    contrast +

    (numeric)
    contrast vector. Note that this should not include elements for singular coefficient estimates, i.e. only refer to the actually estimated coefficients.

    -
    df
    +
    df +

    (number)
    degrees of freedom for the one-dimensional contrast.

    -
    + +
    -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val (2-sided p-value).

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_test_md.html b/latest-tag/reference/h_test_md.html index 185e5bb01..84db56a4f 100644 --- a/latest-tag/reference/h_test_md.html +++ b/latest-tag/reference/h_test_md.html @@ -1,13 +1,29 @@ - -Creating F-Statistic Test Results For Multi-Dimensional Contrast — h_test_md • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,37 +126,47 @@
    -

    Usage

    +

    Usage +

    h_test_md(object, contrast, df, f_stat_factor = 1)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    contrast +

    (matrix)
    numeric contrast matrix.

    -
    df
    +
    df +

    (number)
    denominator degrees of freedom for the multi-dimensional contrast.

    -
    f_stat_factor
    +
    f_stat_factor +

    (number)
    optional scaling factor on top of the standard F-statistic.

    -
    + +
    -

    Value

    +

    Value +

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

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_tmb_warn_non_deterministic.html b/latest-tag/reference/h_tmb_warn_non_deterministic.html index f3ec4d29d..7d98cf636 100644 --- a/latest-tag/reference/h_tmb_warn_non_deterministic.html +++ b/latest-tag/reference/h_tmb_warn_non_deterministic.html @@ -1,15 +1,31 @@ - -Warn if TMB is Configured to Use Non-Deterministic Hash for Tape Optimizer — h_tmb_warn_non_deterministic • mmrm + + + + + +Warn if TMB is Configured to Use Non-Deterministic Hash for Tape Optimizer — h_tmb_warn_non_deterministic • mmrm + + + + + + + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,17 +129,20 @@
    -

    Usage

    +

    Usage +

    h_tmb_warn_non_deterministic()
    -

    Value

    +

    Value +

    No return value, called for side effects.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_tr.html b/latest-tag/reference/h_tr.html index 14cce5b06..3e009c181 100644 --- a/latest-tag/reference/h_tr.html +++ b/latest-tag/reference/h_tr.html @@ -1,11 +1,27 @@ - -Trace of a Matrix — h_tr • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_tr(x)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (matrix)
    square matrix input.

    -
    + +
    -

    Value

    +

    Value +

    The trace of the square matrix.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_valid_formula.html b/latest-tag/reference/h_valid_formula.html index c347d5f3d..690d05ff4 100644 --- a/latest-tag/reference/h_valid_formula.html +++ b/latest-tag/reference/h_valid_formula.html @@ -1,11 +1,27 @@ - -Validate mmrm Formula — h_valid_formula • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,26 +123,33 @@
    -

    Usage

    +

    Usage +

    h_valid_formula(formula)
    -

    Arguments

    +

    Arguments +

    -
    formula
    +
    +
    formula +

    (formula)
    to check.

    -
    + +
    -

    Details

    +

    Details +

    In mmrm models, . is not allowed as it introduces ambiguity of covariates to be used, so it is not allowed to be in formula.

    + + - + + - + + diff --git a/latest-tag/reference/h_var_adj.html b/latest-tag/reference/h_var_adj.html index f36aeae7d..32f96a4c7 100644 --- a/latest-tag/reference/h_var_adj.html +++ b/latest-tag/reference/h_var_adj.html @@ -1,15 +1,31 @@ - -Obtain the Adjusted Covariance Matrix — h_var_adj • mmrm + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,45 +129,57 @@
    -

    Usage

    +

    Usage +

    h_var_adj(v, w, p, q, r, linear = FALSE)
    -

    Arguments

    +

    Arguments +

    -
    v
    +
    +
    v +

    (matrix)
    unadjusted covariance matrix.

    -
    w
    +
    w +

    (matrix)
    hessian matrix.

    -
    p
    +
    p +

    (matrix)
    P matrix from h_get_kr_comp().

    -
    q
    +
    q +

    (matrix)
    Q matrix from h_get_kr_comp().

    -
    r
    +
    r +

    (matrix)
    R matrix from h_get_kr_comp().

    -
    linear
    +
    linear +

    (flag)
    whether to use linear Kenward-Roger approximation.

    -
    + +
    -

    Value

    +

    Value +

    The matrix of adjusted covariance matrix.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/h_warn_na_action.html b/latest-tag/reference/h_warn_na_action.html index f63364b46..cdd88f942 100644 --- a/latest-tag/reference/h_warn_na_action.html +++ b/latest-tag/reference/h_warn_na_action.html @@ -1,11 +1,27 @@ - -Warn on na.action — h_warn_na_action • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,12 +123,14 @@
    -

    Usage

    +

    Usage +

    h_warn_na_action()
    - + + - + + - + + diff --git a/latest-tag/reference/h_within_or_between.html b/latest-tag/reference/h_within_or_between.html index 20e7a9f56..a52d51ff9 100644 --- a/latest-tag/reference/h_within_or_between.html +++ b/latest-tag/reference/h_within_or_between.html @@ -1,13 +1,29 @@ - -Determine Within or Between for each Design Matrix Column — h_within_or_between • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,30 +126,38 @@
    -

    Usage

    +

    Usage +

    h_within_or_between(x_matrix, subject_ids)
    -

    Arguments

    +

    Arguments +

    -
    x_matrix
    +
    +
    x_matrix +

    (matrix)
    the design matrix with column names.

    -
    subject_ids
    +
    subject_ids +

    (factor)
    the subject IDs.

    -
    + +
    -

    Value

    +

    Value +

    Character vector with "intercept", "within" or "between" for each design matrix column identified via the names of the vector.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/index.html b/latest-tag/reference/index.html index 030773a49..c307b8eff 100644 --- a/latest-tag/reference/index.html +++ b/latest-tag/reference/index.html @@ -1,11 +1,25 @@ - -Package index • mmrm + + + + + + + + + Skip to contents @@ -21,10 +35,12 @@ + + + + + @@ -91,217 +115,284 @@
    -

    Package

    +

    Package +

    -
    +
    +
    -
    +
    +
    mmrm-package
    -
    mmrm Package
    -
    -

    Functions

    +
    +mmrm Package
    + +
    +
    +

    Functions +

    -
    +
    +
    -
    +
    +
    mmrm() stable
    Fit an MMRM
    -
    +
    +
    +
    fit_mmrm() stable
    Low-Level Fitting Function for MMRM
    -
    +
    +
    +
    mmrm_control() stable
    Control Parameters for Fitting an MMRM
    -
    +
    +
    +
    fit_single_optimizer() stable
    Fitting an MMRM with Single Optimizer
    -
    +
    +
    +
    refit_multiple_optimizers() stable
    Refitting MMRM with Multiple Optimizers
    -
    +
    +
    +
    df_1d() stable
    Calculation of Degrees of Freedom for One-Dimensional Contrast
    -
    +
    +
    +
    df_md() stable
    Calculation of Degrees of Freedom for Multi-Dimensional Contrast
    -
    +
    +
    +
    component() stable
    Component Access for mmrm_tmb Objects
    -
    -

    Start Values

    + +
    +
    +

    Start Values +

    -
    +
    +
    -
    +
    +
    std_start()
    Standard Starting Value
    -
    +
    +
    +
    emp_start()
    Empirical Starting Value
    -
    -

    Methods

    + +
    +
    +

    Methods +

    -
    +
    +
    -

    Covariance Structures

    + +
    +
    +

    Covariance Structures +

    -
    +
    +
    -
    +
    +
    cov_struct() stable
    Define a Covariance Structure
    -
    +
    +
    +
    as.cov_struct() stable
    Coerce into a Covariance Structure Definition
    -
    +
    +
    +
    format(<cov_struct>)
    Format Covariance Structure Object
    -
    +
    +
    +
    print(<cov_struct>)
    Print a Covariance Structure Object
    -
    +
    +
    +
    cov_types() stable
    Covariance Types
    -
    -

    Estimate Marginal Means

    + +
    +
    +

    Estimate Marginal Means +

    -
    +
    +
    -
    +
    +
    emmeans_support stable
    -
    Support for emmeans
    -
    -

    Datasets

    +
    Support for emmeans +
    + +
    +
    +

    Datasets +

    -
    +
    +
    -
    +
    +
    fev_data stable
    Example Data on FEV1
    -
    +
    +
    +
    bcva_data stable
    Example Data on BCVA
    -
    + + + + - + + - + + diff --git a/latest-tag/reference/is_infix.html b/latest-tag/reference/is_infix.html index 16d216d90..3cebbc430 100644 --- a/latest-tag/reference/is_infix.html +++ b/latest-tag/reference/is_infix.html @@ -1,11 +1,27 @@ - -Test Whether a Symbol is an Infix Operator — is_infix • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,30 +123,41 @@
    -

    Usage

    +

    Usage +

    is_infix(name)
    -

    Arguments

    +

    Arguments +

    -
    name
    +
    +
    name +

    (symbol or name or string)
    a possible reference to an infix operator to check.

    -
    + +
    -

    Value

    +

    Value +

    A logical indicating whether the name is the name of an infix operator.

    -

    is_infix(as.name("|"))
    +

    +
    +
    is_infix(as.name("|"))
     is_infix("|")
    -is_infix("c")

    +is_infix("c")
    +

    +
    + +
    -
    - + + - + + diff --git a/latest-tag/reference/mmrm-package.html b/latest-tag/reference/mmrm-package.html index 7d4cf94bb..2c5efca54 100644 --- a/latest-tag/reference/mmrm-package.html +++ b/latest-tag/reference/mmrm-package.html @@ -1,11 +1,27 @@ - -mmrm Package — mmrm-package • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + +
    @@ -98,15 +125,23 @@
    -

    See also

    -
    -

    Author

    +

    Author +

    Maintainer: Daniel Sabanes Bove daniel.sabanes_bove@rconis.com (ORCID)

    -

    Authors:

    + +
    + +
    -
    - + + - + + diff --git a/latest-tag/reference/mmrm.html b/latest-tag/reference/mmrm.html index ee8a81559..ce6e5290e 100644 --- a/latest-tag/reference/mmrm.html +++ b/latest-tag/reference/mmrm.html @@ -1,13 +1,29 @@ - -Fit an MMRM — mmrm • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,7 +126,8 @@
    -

    Usage

    +

    Usage +

    mmrm(
       formula,
       data,
    @@ -113,49 +140,61 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    formula
    +
    +
    formula +

    (formula)
    the model formula, see details.

    -
    data
    +
    data +

    (data)
    the data to be used for the model.

    -
    weights
    +
    weights +

    (vector)
    an optional vector of weights to be used in the fitting process. Should be NULL or a numeric vector.

    -
    covariance
    +
    covariance +

    (cov_struct)
    a covariance structure type definition as produced with cov_struct(), or value that can be coerced to a covariance structure using as.cov_struct(). If no value is provided, a structure is derived from the provided formula.

    -
    reml
    +
    reml +

    (flag)
    whether restricted maximum likelihood (REML) estimation is used, otherwise maximum likelihood (ML) is used.

    -
    control
    +
    control +

    (mmrm_control)
    fine-grained fitting specifications list created with mmrm_control().

    -
    ...
    +
    ... +

    arguments passed to mmrm_control().

    -
    + +
    -

    Value

    +

    Value +

    An mmrm object.

    -

    Details

    +

    Details +

    The formula typically looks like: FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID) so specifies response and covariates as usual, and exactly one special term @@ -181,15 +220,19 @@

    Detailsmmrm.

    -

    Note

    +

    Note +

    The mmrm object is also an mmrm_fit and an mmrm_tmb object, therefore corresponding methods also work (see mmrm_tmb_methods).

    -

    Additional contents depend on the choice of the adjustment method:

    • If Satterthwaite adjustment is used, the Jacobian information jac_list +

      Additional contents depend on the choice of the adjustment method:

      +
        +
      • If Satterthwaite adjustment is used, the Jacobian information jac_list is included.

      • If Kenward-Roger adjustment is used, kr_comp contains necessary components and beta_vcov_adj includes the adjusted coefficients covariance matrix.

      • -

      Use of the package emmeans is supported, see emmeans_support.

      +
    +

    Use of the package emmeans is supported, see emmeans_support.

    NA values are always omitted regardless of na.action setting.

    When the number of visit levels is large, it usually requires large memory to create the covariance matrix. By default, the maximum allowed visit levels is 100, and if there are more @@ -200,7 +243,8 @@

    Note

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -224,7 +268,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/latest-tag/reference/mmrm_control.html b/latest-tag/reference/mmrm_control.html index c391242c3..27a338e3f 100644 --- a/latest-tag/reference/mmrm_control.html +++ b/latest-tag/reference/mmrm_control.html @@ -1,15 +1,31 @@ - -Control Parameters for Fitting an MMRM — mmrm_control • mmrm + + + + + +Control Parameters for Fitting an MMRM — mmrm_control • mmrm + + + + + + + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,7 +129,8 @@
    -

    Usage

    +

    Usage +

    mmrm_control(
       n_cores = 1L,
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within"),
    @@ -117,50 +144,63 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    n_cores
    +
    +
    n_cores +

    (count)
    number of cores to be used.

    -
    method
    +
    method +

    (string)
    adjustment method for degrees of freedom.

    -
    vcov
    +
    vcov +

    (string)
    coefficients covariance matrix adjustment method.

    -
    start
    +
    start +

    (NULL, numeric or function)
    optional start values for variance parameters. See details for more information.

    -
    accept_singular
    +
    accept_singular +

    (flag)
    whether singular design matrices are reduced to full rank automatically and additional coefficient estimates will be missing.

    -
    drop_visit_levels
    +
    drop_visit_levels +

    (flag)
    whether to drop levels for visit variable, if visit variable is a factor, see details.

    -
    ...
    +
    ... +

    additional arguments passed to h_get_optimizers().

    -
    optimizers
    +
    optimizers +

    (list)
    optimizer specification, created with h_get_optimizers().

    -
    + +
    -

    Value

    +

    Value +

    List of class mmrm_control with the control parameters.

    -

    Details

    +

    Details +

    For example, if the data only has observations at visits VIS1, VIS3 and VIS4, by default they are treated to be equally spaced, the distance from VIS1 to VIS3, and from VIS3 to VIS4, are identical. However, you can manually convert this visit into a factor, with @@ -168,14 +208,45 @@

    DetailsVIS1 to VIS3 will be double, as VIS2 is a valid visit. However, please be cautious because this can lead to convergence failure when using an unstructured covariance matrix and there are no observations -at the missing visits.

    + +
    -

    Examples

    +

    Examples +

    mmrm_control(
       optimizer_fun = stats::optim,
       optimizer_args = list(method = "L-BFGS-B")
    @@ -311,7 +384,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/latest-tag/reference/mmrm_methods.html b/latest-tag/reference/mmrm_methods.html index 6a21a3ade..49e87e122 100644 --- a/latest-tag/reference/mmrm_methods.html +++ b/latest-tag/reference/mmrm_methods.html @@ -1,11 +1,27 @@ - -Methods for mmrm Objects — mmrm_methods • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for class 'mmrm'
     summary(object, ...)
     
    @@ -114,52 +141,71 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the fitted MMRM including Jacobian and call etc.

    -
    ...
    +
    ... +

    not used.

    -
    + +
    -

    Value

    +

    Value +

    Depends on the method, see Details and Functions.

    -

    Details

    -

    While printing the summary of (mmrm)
    object, the following will be displayed:

    1. Formula. The formula used in the model.

    2. +

      Details +

      +

      While printing the summary of (mmrm)
      object, the following will be displayed:

      +
        +
      1. Formula. The formula used in the model.

      2. Data. The data used for analysis, including number of subjects, number of valid observations.

      3. Covariance. The covariance structure and number of variance parameters.

      4. Method. Restricted maximum likelihood(REML) or maximum likelihood(ML).

      5. Model selection criteria. AIC, BIC, log likelihood and deviance.

      6. Coefficients. Coefficients of the covariates.

      7. -
      8. Covariance estimate. The covariance estimate(for each group).

        1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available +

        2. +

          Covariance estimate. The covariance estimate(for each group).

          +
            +
          1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available in data will be displayed.

          2. If the covariance structure is spatial, the covariance matrix of two time points with unit distance will be displayed.

          3. -
        3. -

        confint is used to obtain the confidence intervals for the coefficients. +

      + +
    +

    confint is used to obtain the confidence intervals for the coefficients. Please note that this is different from the confidence interval of difference of least square means from emmeans.

    -

    Functions

    +

    Functions +

    -
    • summary(mmrm): summarizes the MMRM fit results.

    • +
        +
      • summary(mmrm): summarizes the MMRM fit results.

      • print(summary.mmrm): prints the MMRM fit summary.

      • confint(mmrm): obtain the confidence intervals for the coefficients.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_tmb_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- mmrm(formula, fev_data)
     # Summary:
    @@ -230,7 +276,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/latest-tag/reference/mmrm_tidiers.html b/latest-tag/reference/mmrm_tidiers.html index 13e64e0e3..eedd3e0ec 100644 --- a/latest-tag/reference/mmrm_tidiers.html +++ b/latest-tag/reference/mmrm_tidiers.html @@ -1,15 +1,31 @@ - -Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm + + + + + +Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm + + + + + + + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,7 +129,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for class 'mmrm'
     tidy(x, conf.int = FALSE, conf.level = 0.95, ...)
     
    @@ -122,56 +149,72 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (mmrm)
    fitted model.

    -
    conf.int
    +
    conf.int +

    (flag)
    if TRUE columns for the lower (conf.low) and upper bounds (conf.high) of coefficient estimates are included.

    -
    conf.level
    +
    conf.level +

    (number)
    defines the range of the optional confidence internal.

    -
    ...
    +
    ... +

    only used by augment() to pass arguments to the predict.mmrm_tmb() method.

    -
    newdata
    +
    newdata +

    (data.frame or NULL)
    optional new data frame.

    -
    interval
    +
    interval +

    (string)
    type of interval calculation.

    -
    se_fit
    +
    se_fit +

    (flag)
    whether to return standard errors of fit.

    -
    type.residuals
    +
    type.residuals +

    (string)
    passed on to residuals.mmrm_tmb().

    -
    + +
    -

    Functions

    +

    Functions +

    -
    • tidy(mmrm): derives tidy tibble from an mmrm object.

    • +
        +
      • tidy(mmrm): derives tidy tibble from an mmrm object.

      • glance(mmrm): derives glance tibble from an mmrm object.

      • augment(mmrm): derives augment tibble from an mmrm object.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tmb_methods for additional methods.

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -263,7 +306,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/latest-tag/reference/mmrm_tmb_methods.html b/latest-tag/reference/mmrm_tmb_methods.html index 74ee9246e..bd400e74f 100644 --- a/latest-tag/reference/mmrm_tmb_methods.html +++ b/latest-tag/reference/mmrm_tmb_methods.html @@ -1,11 +1,27 @@ - -Methods for mmrm_tmb Objects — mmrm_tmb_methods • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for class 'mmrm_tmb'
     coef(object, complete = TRUE, ...)
     
    @@ -171,110 +198,137 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm_tmb)
    the fitted MMRM object.

    -
    complete
    +
    complete +

    (flag)
    whether to include potential non-estimable coefficients.

    -
    ...
    +
    ... +

    mostly not used; Exception is model.matrix() passing ... to the default method.

    -
    newdata
    +
    newdata +

    (data.frame)
    optional new data, otherwise data from object is used.

    -
    se.fit
    +
    se.fit +

    (flag)
    indicator if standard errors are required.

    -
    interval
    +
    interval +

    (string)
    type of interval calculation. Can be abbreviated.

    -
    level
    +
    level +

    (number)
    tolerance/confidence level.

    -
    nsim
    +
    nsim +

    (count)
    number of simulations to use.

    -
    conditional
    +
    conditional +

    (flag)
    indicator if the prediction is conditional on the observation or not.

    -
    formula
    +
    formula +

    (mmrm_tmb)
    same as object.

    -
    data
    +
    data +

    (data.frame)
    object in which to construct the frame.

    -
    include
    +
    include +

    (character)
    names of variable types to include. Must be NULL or one or more of c("subject_var", "visit_var", "group_var", "response_var").

    -
    full
    +
    full +

    (flag)
    indicator whether to return full model frame (deprecated).

    -
    na.action
    +
    na.action +

    (string)
    na action.

    -
    use_response
    +
    use_response +

    (flag)
    whether to use the response for complete rows.

    -
    x
    +
    x +

    (mmrm_tmb)
    same as object.

    -
    sigma
    +
    sigma +

    cannot be used (this parameter does not exist in MMRM).

    -
    corrected
    +
    corrected +

    (flag)
    whether corrected AIC should be calculated.

    -
    k
    +
    k +

    (number)
    the penalty per parameter to be used; default k = 2 is the classical AIC.

    -
    type
    +
    type +

    (string)
    unscaled (response), pearson or normalized. Default is response, and this is the only type available for use with models with a spatial covariance structure.

    -
    seed
    +
    seed +

    unused argument from stats::simulate().

    -
    method
    +
    method +

    (string)
    simulation method to use. If "conditional", simulated values are sampled given the estimated covariance matrix of object. If "marginal", the variance of the estimated covariance matrix is taken into account.

    -
    + +
    -

    Value

    +

    Value +

    Depends on the method, see Functions.

    -

    Details

    +

    Details +

    include argument controls the variables the returned model frame will include. Possible options are "response_var", "subject_var", "visit_var" and "group_var", representing the response variable, subject variable, visit variable or group variable. @@ -282,9 +336,11 @@

    Detailsmodel.matrix.

    -

    Functions

    +

    Functions +

    -
    • coef(mmrm_tmb): obtains the estimated coefficients.

    • +
        +
      • coef(mmrm_tmb): obtains the estimated coefficients.

      • fitted(mmrm_tmb): obtains the fitted values.

      • predict(mmrm_tmb): predict conditional means for new data; optionally with standard errors and confidence or prediction intervals. @@ -317,21 +373,29 @@

        Functions -

        References

        +

        References +

        -
        • hurvich1989regressionmmrm

        • +
            +
          • hurvich1989regressionmmrm

          • burnham1998practicalmmrm

          • -
          • galecki2013linearmmrm

          • -
    + +
      +
    • galecki2013linearmmrm

    • +
    +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- fit_mmrm(formula, fev_data, weights = rep(1, nrow(fev_data)))
     # Estimated coefficients:
    @@ -3870,7 +3934,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/latest-tag/reference/parsnip_add_mmrm.html b/latest-tag/reference/parsnip_add_mmrm.html index e3c35c51d..7a2452ca2 100644 --- a/latest-tag/reference/parsnip_add_mmrm.html +++ b/latest-tag/reference/parsnip_add_mmrm.html @@ -1,11 +1,27 @@ - -Register mmrm For Use With tidymodels — parsnip_add_mmrm • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + +
    @@ -97,30 +124,38 @@
    -

    Usage

    +

    Usage +

    parsnip_add_mmrm(quietly = FALSE)
    -

    Arguments

    +

    Arguments +

    -
    quietly
    +
    +
    quietly +

    logical: should progress and error messages be suppressed?

    -
    + +
    -

    Value

    +

    Value +

    A logical value indicating whether registration was successful.

    -

    Details

    +

    Details +

    We can use parsnip::show_model_info("linear_reg") to check the registration with parsnip and thus the wider tidymodels ecosystem.

    + + - + + - + + diff --git a/latest-tag/reference/position_symbol.html b/latest-tag/reference/position_symbol.html index 3dfcc412c..91d476b54 100644 --- a/latest-tag/reference/position_symbol.html +++ b/latest-tag/reference/position_symbol.html @@ -1,15 +1,31 @@ - -Search For the Position of a Symbol — position_symbol • mmrm + + + + + +Search For the Position of a Symbol — position_symbol • mmrm + + + + + + + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,36 +129,45 @@
    -

    Usage

    +

    Usage +

    position_symbol(x, sym, ...)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (list of language)
    a list of language objects in which to search for a specific symbol.

    -
    sym
    +
    sym +

    (name or symbol or character)
    a symbol to search for in x.

    -
    ...
    +
    ... +

    Additional arguments passed to Position().

    -
    + +
    -

    Value

    +

    Value +

    The position of the symbol if found, or the nomatch value otherwise.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/print.cov_struct.html b/latest-tag/reference/print.cov_struct.html index ceddccebe..63c2502a2 100644 --- a/latest-tag/reference/print.cov_struct.html +++ b/latest-tag/reference/print.cov_struct.html @@ -1,11 +1,27 @@ - -Print a Covariance Structure Object — print.cov_struct • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,30 +123,38 @@
    -

    Usage

    +

    Usage +

    # S3 method for class 'cov_struct'
     print(x, ...)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (cov_struct)
    a covariance structure object.

    -
    ...
    +
    ... +

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    x invisibly.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/reexports.html b/latest-tag/reference/reexports.html index 911ec47bc..00f7586c9 100644 --- a/latest-tag/reference/reexports.html +++ b/latest-tag/reference/reexports.html @@ -1,25 +1,41 @@ - -Objects exported from other packages — reexports • mmrm + + + + + +Objects exported from other packages — reexports • mmrm + + + + + + + + + + Skip to contents @@ -35,10 +51,12 @@ + + + + + @@ -109,15 +135,18 @@

    These objects are imported from other packages. Follow the links below to see their documentation.

    -
    generics
    +
    +
    generics

    augment, glance, tidy

    -
    + + - + +
    -
    - + + - + + diff --git a/latest-tag/reference/refit_multiple_optimizers.html b/latest-tag/reference/refit_multiple_optimizers.html index 66ab9efaf..bef2ce738 100644 --- a/latest-tag/reference/refit_multiple_optimizers.html +++ b/latest-tag/reference/refit_multiple_optimizers.html @@ -1,11 +1,27 @@ - -Refitting MMRM with Multiple Optimizers — refit_multiple_optimizers • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,37 +123,47 @@
    -

    Usage

    +

    Usage +

    refit_multiple_optimizers(fit, ..., control = mmrm_control(...))
    -

    Arguments

    +

    Arguments +

    -
    fit
    +
    +
    fit +

    (mmrm_fit)
    original model fit from fit_single_optimizer().

    -
    ...
    +
    ... +

    Additional arguments passed to mmrm_control().

    -
    control
    +
    control +

    (mmrm_control)
    object.

    -
    + +
    -

    Value

    +

    Value +

    The best (in terms of log likelihood) fit which converged.

    -

    Note

    +

    Note +

    For Windows, no parallel computations are currently implemented.

    -

    Examples

    +

    Examples +

    fit <- fit_single_optimizer(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data,
    @@ -138,7 +174,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/latest-tag/reference/register_on_load.html b/latest-tag/reference/register_on_load.html index 3b9239572..cb9cb1680 100644 --- a/latest-tag/reference/register_on_load.html +++ b/latest-tag/reference/register_on_load.html @@ -1,11 +1,27 @@ - -Helper Function for Registering Functionality With Suggests Packages — register_on_load • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    register_on_load(
       pkg,
       ver = c(NA_character_, NA_character_),
    @@ -107,39 +134,48 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    pkg
    +
    +
    pkg +

    (string)
    package name.

    -
    ver
    +
    ver +

    (character)
    of length 2 whose elements can be provided to numeric_version(), representing a minimum and maximum (inclusive) version requirement for interoperability. When NA, no version requirement is imposed. Defaults to no version requirement.

    -
    callback
    +
    callback +

    (function(...) ANY)
    a callback to execute upon package load. Note that no arguments are passed to this function. Any necessary data must be provided upon construction.

    -
    message
    +
    message +

    (NULL or string)
    an optional message to print after the callback is executed upon successful registration.

    -
    + +
    -

    Value

    +

    Value +

    A logical (invisibly) indicating whether registration was successful. If not, a onLoad hook was set for the next time the package is loaded.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/std_start.html b/latest-tag/reference/std_start.html index 55fc22f86..53e49cf43 100644 --- a/latest-tag/reference/std_start.html +++ b/latest-tag/reference/std_start.html @@ -1,11 +1,27 @@ - -Standard Starting Value — std_start • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,36 +123,46 @@
    -

    Usage

    +

    Usage +

    std_start(cov_type, n_visits, n_groups, ...)
    -

    Arguments

    +

    Arguments +

    -
    cov_type
    +
    +
    cov_type +

    (string)
    name of the covariance structure.

    -
    n_visits
    +
    n_visits +

    (int)
    number of visits.

    -
    n_groups
    +
    n_groups +

    (int)
    number of groups.

    -
    ...
    +
    ... +

    not used.

    -
    + +
    -

    Value

    +

    Value +

    A numeric vector of starting values.

    -

    Details

    +

    Details +

    std_start will try to provide variance parameter from identity matrix. However, for ar1 and ar1h the corresponding values are not ideal because the \(\rho\) is usually a positive number thus using 0 as starting value can lead to @@ -134,7 +170,8 @@

    Details

    + + - + + - + + diff --git a/latest-tag/reference/tmb_cov_type.html b/latest-tag/reference/tmb_cov_type.html index e02f932fc..d72b8911f 100644 --- a/latest-tag/reference/tmb_cov_type.html +++ b/latest-tag/reference/tmb_cov_type.html @@ -1,11 +1,27 @@ - -Produce A Covariance Identifier Passing to TMB — tmb_cov_type • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    tmb_cov_type(cov)
    -

    Arguments

    +

    Arguments +

    -
    cov
    +
    +
    cov +

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    A string used for method dispatch when passed to TMB.

    + +
    -
    - + + - + + diff --git a/latest-tag/reference/validate_cov_struct.html b/latest-tag/reference/validate_cov_struct.html index 82a476e42..facc0f77b 100644 --- a/latest-tag/reference/validate_cov_struct.html +++ b/latest-tag/reference/validate_cov_struct.html @@ -1,11 +1,27 @@ - -Validate Covariance Structure Data — validate_cov_struct • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    validate_cov_struct(x)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    x if successful, or an error is thrown otherwise.

    + +
    -
    - + + - + + diff --git a/main/404.html b/main/404.html index 7c019c86d..77938db0c 100644 --- a/main/404.html +++ b/main/404.html @@ -1,5 +1,4 @@ - - + @@ -70,11 +69,10 @@ +v0.2.2 + + + + + + @@ -95,46 +119,66 @@

    Thank you for your interest in contributing to this repo! Your contribution is highly valued. Please go through this document for guidance on how to contribute.

    -

    Programming conventions

    +

    Programming conventions +

    Please follow the programming conventions to ensure a consistent programming style across the package.

    Generally we follow the tidyverse style guide. Some specific conventions that deviate from this are explained below.

    -

    Functions

    -
    1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
    2. +

      Functions +

      +
        +
      1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
      2. Functions starting with h_ are helper functions and they should not be exported.
      3. Functions should be well documented using roxygen2 (even when they are not exported).
      4. Functions must be unit tested (even when they are not exported).
      5. -
    + +
    -

    Imports

    +

    Imports +

    In package mmrm, we follow the following convention in package imports.

    -
    1. When only a few functions from another package are needed: -
      1. In DESCRIPTION, add that package into Imports.
      2. +
          +
        1. When only a few functions from another package are needed: +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we add a importFrom with a single function from the package. -
            1. The function imported can be any random function within the package.
            2. -
          3. +
              +
            1. The function imported can be any random function within the package.
            2. +
            +
          4. Always use package::function style wherever you need to use the function.
          5. Example: stats.
          6. -
        2. +
        +
      3. When many functions from another package are needed: -
        1. In DESCRIPTION, add that package into Imports.
        2. +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we use a import to import every function.
          3. Use the functions directly without prefix.
          4. Example: checkmate.
          5. -
          -
    + + + +
    -

    Comments

    -
    • Comments should always follow sentence style.
    • +

      Comments +

      +
        +
      • Comments should always follow sentence style.
      • Comments should be as minimal as possible: Generally the code and variable names should be clear enough to not need any comments. Only use them when needed and explain the “Why” and not the “What”.
      • -
    + +
    -

    Documentation

    -
    • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

    • +

      Documentation +

      +
        +
      • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

      • Exported objects must have a lifecycle badge to clarify the maturity.

        -
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • -
      • +
          +
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • +
        +
      • Use Title Style for the title of the documentation.

      • Always include a @description part with at least one sentence describing the object.

      • @@ -146,38 +190,55 @@

        Documentationwebsite.

      • In vignettes, you cannot directly reference help pages but only pkgdown web pages. Note that this includes only exported objects. To make it look similar to the help page references, please here also use function() style.

      • mmrm_review_methods.Rmd is a large vignette and we precompute this vignette to make the GitHub actions faster. Run the script vignettes/precompile.R to regenerate the precomputed vignette and subsequently update it in GitHub. Before every release we need to run this again. Please note you need to install the package and then compile the vignette because efficiency is better after installation to provide a fair comparison.

      • -
    + +
    -

    Github conventions

    +

    Github conventions +

    When using GitHub to collaborate, the following conventions are needed:

    -
    1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. -
      • If you are going to work on this issue, please assign yourself.
      • -
    2. +
        +
      1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. +
          +
        • If you are going to work on this issue, please assign yourself.
        • +
        +
      2. Please create a branch in the mmrm repository, instead of creating forks, unless you are not yet a team member. -
        • Branches should be associated with a GitHub issue and linked to an issue id.
        • +
            +
          • Branches should be associated with a GitHub issue and linked to an issue id.
          • The name of a branch should be of the form: <issue_id>_<short_discription>.
          • -
          +
        +
      3. Add changes to the branch and push it to GitHub. -
        • Please use clear commit messages.
        • +
            +
          • Please use clear commit messages.
          • Please keep your changes focused on the issue. If there are independent changes, please separate it into another PR linking to another issue.
          • -
          +
        +
      4. Please create a Pull Request when you think your code changes are ready: -
        • Functions are well documented.
        • +
            +
          • Functions are well documented.
          • Functions have corresponding unit tests.
          • Changes pass all the GitHub action checks.
          • The checklist in the corresponding issue is completed.
          • -
          +
        +
      5. Address all the comments you receive. -
        • at least one approval is needed to merge.
        • -
      6. -
    +
      +
    • at least one approval is needed to merge.
    • +
    + + +
    -

    Contribution tips

    +

    Contribution tips +

    -

    Development environment Set-up

    +

    Development environment Set-up +

    The development this mmrm package is based on the latest R version and C++ compilers. The package dependencies are the most recent versions from CRAN. We recommend that your working environment is set up in the same way. Additionally, there are some tools we recommend you to install:

    -
    1. +
        +
      1. RTools if you work on a Windows operating system. Alternatively you can use docker to separate the operating system and the development system.
      2. GitKraken is a very useful user interface for git including visualization of git commit graphs, file history, etc.
      3. @@ -185,43 +246,82 @@

        Development environment Set-uplintr will allow you to perform static code analysis.
      4. pre-commit is a Python module that allows you to identify issues before you commit locally.
      5. -

    + +
    -

    Issue labels

    +

    Issue labels +

    The issues are categorized with several labels:

    - +
    Label name
    ++++ + + - + + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + -
    Label name Description
    SPx
    SPx SP (story points) indicate complexity, and the larger the subsequent number, the more time consuming the issue is expected to be
    priority
    priority Issues with this label should be completed with higher priority
    good first issue
    good first issue Good choices for new team members
    blocked
    blocked Blocked by other issues
    bug
    bug Something isn’t working
    devops
    devops Development and Operation
    discussion
    discussion Discussion needed
    documentation
    documentation Improvement of documentation is needed
    duplicate
    duplicate The issue already exists
    enhancement
    enhancement New feature or request
    help wanted
    help wanted Extra attention is needed
    invalid
    invalid This doesn’t seem right
    question
    question Further information needed

    Please choose an issue based on your interest, issue complexity, and priority.

    + + + +

    Please choose an issue based on your interest, issue complexity, and priority.

    -

    Add new unit tests

    +

    Add new unit tests +

    To add a new unit test, you need to first identify the test scope. Does the test fit in the scope of existing tests? If so, please modify the existing test files under tests/testthat/ folder or src/ folder, depending on whether the code to be tested is R or C++. Otherwise please create a new test file, with a name prefix of “test-”.

    In each test case, use the following structure:

    @@ -234,19 +334,25 @@ 

    Add new unit tests -

    Add integration tests

    +

    Add integration tests +

    Integration tests compare the results of SAS and R and assures the quality of our code. To add an integration test, you need to do the following:

    -
    1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
    2. +
        +
      1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
      2. Save the results in .txt format in the design/SAS/ folder.
      3. Decide the key outputs that are needed for comparison.
      4. Add a unit test verifying that the R implementation of the same model has the same results (conversion may be needed).
      5. -
    + +
    -

    Get started with C++

    +

    Get started with C++ +

    If you have no experience with C++, it is totally fine: TMB has provided us with many high-level functionalities that is very similar to R. Here we only list the most important things that you need to go through before you begin C++ programming.

    -
    1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
    2. +
        +
      1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
      2. Types. C++ is a strong type programming language and all objects need to be declared with type. Sometimes you can combine the declaration and definition. -
        1. +
            +
          1. int i = 1; This works, as we declare i as int and define it to be 1.
          2. i = 1; This fails, because i is not declared yet.
          3. @@ -254,53 +360,70 @@

            Get started with C++
          4. in R, if (TRUE) { a = '123' }; print(a) is legal.
          5. +
              +
            1. in R, if (TRUE) { a = '123' }; print(a) is legal.
            2. in C++, if (1) {string a = '123'}; std::stdout << a << std::endl; is illegal, because object a is terminated already.
            3. in C++, string a; if (1) {a = '123'}; std::stdout << a << std::endl; is legal, a is declared prior to if statement.
            4. -
            +

          +
        2. Polymorphism. Unlike in R, where function arguments have no explicitly defined types, in C++ the type of each argument of a function must be pre-specified. -
          1. +
              +
            1. Template is a special function that works with generic argument type. We could imagine a single function that could work on arguments of arbitrary type, and template functions make this possible through separation of function logic from the argument declaration. In this way we can use template functions and avoid the need to replicate the whole code for each type.
            2. -
          2. -

          With these points in mind, you are about ready to go.

          +
        +
      3. +
      +

      With these points in mind, you are about ready to go.

    -

    Get started with TMB

    +

    Get started with TMB +

    In mmrm we are not including any latent variables and so the Laplace approximation aspect of TMB is not used. We only use the automatic differentiation part of TMB. For detailed documentation of TMB, visit the TMB reference.

    One important feature of TMB are the R style matrix/array calculations. This is important because we mainly use this part to conduct our calculations. See matrix_arrays.cpp for examples.

    -

    Add a new covariance structure

    +

    Add a new covariance structure +

    To add a new covariance structure, you need to do the following:

    -
    1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
    2. +
        +
      1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
      2. Implement the covariance structure on the C++ side and the corresponding R interface.
      3. Add unit tests to make sure the new covariance structure is working as expected.
      4. Add integration tests under design/SAS/ folder to make sure SAS and R produce similar results (within tolerance).
      5. -
    + +
    -

    Add additional data

    +

    Add additional data +

    To add additional data to mmrm, please follow the next steps:

    -
    1. Make sure the data is needed.
    2. +
        +
      1. Make sure the data is needed.
      2. Document the data in R/data.R.
      3. Use save to create an rda data only containing this dataset. Here the function usethis::use_data can also be helpful.
      4. -
    + +
    -

    Communications within team

    +

    Communications within team +

    There are several communication channels, please use appropriate ones.

    -

    GitHub

    +

    GitHub +

    GitHub issues and pull requests are where implementations are discussed and reviewed. Feature requests, bugs, enhancements, technical implementations can be discussed here. When you have ideas that needs to be documented, it is better to have them in GitHub.

    -

    Slack

    +

    Slack +

    Slack is a messaging tool and we have the mmrm channel under the rinpharma space. You can put anything in the slack channel, e.g., you have completed a issue and are waiting for review, or you have some questions and don’t want to wait until the next stand-up meeting.

    To join the slack channel, please make sure you have a slack account, and send the email address to any team member.

    -

    Stand-up meetings

    +

    Stand-up meetings +

    We have stand-up meetings currently three times a week. The purpose of stand-up meetings is for team members to discuss the current work progress and raise any issue/questions for team discussion if needed.

    You don’t need to join all three meetings.

    @@ -308,7 +431,8 @@

    Stand-up meetings

    + + - + + - + + diff --git a/main/PULL_REQUEST_TEMPLATE.html b/main/PULL_REQUEST_TEMPLATE.html index e99557726..257ebefc8 100644 --- a/main/PULL_REQUEST_TEMPLATE.html +++ b/main/PULL_REQUEST_TEMPLATE.html @@ -1,11 +1,25 @@ - -Description • mmrm + + + + + + + + + Skip to contents @@ -21,10 +35,12 @@ + + + + + @@ -96,7 +120,8 @@ - + +
    -
    - + + - + + diff --git a/main/articles/algorithm.html b/main/articles/algorithm.html index f46f494a4..f83e48df5 100644 --- a/main/articles/algorithm.html +++ b/main/articles/algorithm.html @@ -1,5 +1,4 @@ - - + @@ -69,11 +68,10 @@ +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + + + + + @@ -94,60 +118,86 @@

    Introduction

    -
    Package Introduction
    +
    +
    Package Introduction
    -
    Mixed Models for Repeated Measures
    + +
    Mixed Models for Repeated Measures
    -
    Comparison with other software
    + +
    Comparison with other software
    -
    + +
    +

    Covariance Structures

    -
    Covariance Structures
    +
    +
    Covariance Structures
    -
    + + + + + + + + + + + + + + + + +
    -
    - + + - + + diff --git a/main/articles/introduction.html b/main/articles/introduction.html index 68eb81963..2ffb382e5 100644 --- a/main/articles/introduction.html +++ b/main/articles/introduction.html @@ -1,5 +1,4 @@ - - + @@ -69,11 +68,10 @@ +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + + + + + @@ -93,7 +117,8 @@

    Authors

    -
    • +
        +
      • Daniel Sabanes Bove. Author, maintainer.

      • @@ -173,7 +198,8 @@

        Authors

        inferential.biostatistics GmbH. Copyright holder, funder.

        -
    + +

    Citation

    @@ -193,7 +219,8 @@

    Citation

    + +
    -
    - + + - + + diff --git a/main/index.html b/main/index.html index efe6112b7..661416bfc 100644 --- a/main/index.html +++ b/main/index.html @@ -1,5 +1,4 @@ - - + @@ -72,11 +71,10 @@ +v0.2.2 + + + + + + @@ -92,25 +116,38 @@
    -

    mmrm 0.3.14.9000

    +

    mmrm 0.3.14.9000 +

    -

    Bug Fixes

    -
    • Previously, when compiling mmrm from source using a TMB version below 1.9.15, and installing a newer TMB of version 1.9.15 or above, would render the mmrm package unusable. This is fixed now, by checking in the dynamic library of mmrm whether the version of TMB has been sufficient.
    • -
    +

    Bug Fixes +

    +
      +
    • Previously, when compiling mmrm from source using a TMB version below 1.9.15, and installing a newer TMB of version 1.9.15 or above, would render the mmrm package unusable. This is fixed now, by checking in the dynamic library of mmrm whether the version of TMB has been sufficient.
    • +
    +
    -

    mmrm 0.3.14

    CRAN release: 2024-09-27

    +

    mmrm 0.3.14 +

    +

    CRAN release: 2024-09-27

    -

    Bug Fixes

    -
    • In version 0.3.13, when the tape optimizer from TMB was switched on, a warning would be given by fit_mmrm(), instructing users to turn off the tape optimizer. However, this is not necessary for reproducible results. Instead, it is now checked whether the deterministic hash for the TMB tape optimizer is used, and a warning is issued otherwise.
    • +

      Bug Fixes +

      +
        +
      • In version 0.3.13, when the tape optimizer from TMB was switched on, a warning would be given by fit_mmrm(), instructing users to turn off the tape optimizer. However, this is not necessary for reproducible results. Instead, it is now checked whether the deterministic hash for the TMB tape optimizer is used, and a warning is issued otherwise.
      • In version 0.3.13, the above described warning by fit_mmrm() was not visible to the user when calling mmrm() because it was caught internally, causing the first fit in each session to fail for the first tried optimizer and falling back to the other optimizers. The warning is now issued directly by mmrm(). This change ensures that the first model fit is consistent regarding the chosen optimizer (and thus numeric results) with subsequent model fits, avoiding discrepancies observed in version 0.3.13.
      • -
    + +
    -

    mmrm 0.3.13

    CRAN release: 2024-09-23

    +

    mmrm 0.3.13 +

    +

    CRAN release: 2024-09-23

    -

    Bug Fixes

    -
    • When running with TMB package versions below 1.9.15, MMRM fit results are not completely reproducible. While this may not be relevant for most applications, because the numerical differences are very small, we now issue a warning to the user if this is the case. We advise users to upgrade their TMB package versions to 1.9.15 or higher to ensure reproducibility.
    • +

      Bug Fixes +

      +
        +
      • When running with TMB package versions below 1.9.15, MMRM fit results are not completely reproducible. While this may not be relevant for most applications, because the numerical differences are very small, we now issue a warning to the user if this is the case. We advise users to upgrade their TMB package versions to 1.9.15 or higher to ensure reproducibility.
      • Previously, mmrm ignored contrasts defined for covariates in the input data set. This is fixed now.
      • Previously, predict always required the response to be valid, even for unconditional predictions. This is fixed now and unconditional prediction does not require the response to be valid or present any longer.
      • @@ -118,77 +155,119 @@

        Bug Fixesemmeans::emmeans returned NA for spatial covariance structures. This is fixed now.

      • Previously car::Anova gave incorrect results if an interaction term is included and the covariate of interest was not the first categorical variable. This is fixed now.
      • Previously car::Anova failed if the model did not contain an intercept. This is fixed now.
      • -
    + +
    -

    Miscellaneous

    -
    • Upon fitting an MMRM, it is checked whether a not reproducible optimization feature of TMB is turned on. If so, a warning is issued to the user once per session.
    • +

      Miscellaneous +

      +
        +
      • Upon fitting an MMRM, it is checked whether a not reproducible optimization feature of TMB is turned on. If so, a warning is issued to the user once per session.
      • mmrm now checks on the positive definiteness of the covariance matrix theta_vcov. If it is not positive definite, non-convergence is messaged appropriately.
      • model.matrix has been updated to ensure that the NA values are dropped. Additionally, an argument use_response is added to decide whether records with NA values in the response should be discarded.
      • predict has been updated to allow duplicated subject IDs for unconditional prediction.
      • -
    + +
    -

    mmrm 0.3.12

    CRAN release: 2024-06-26

    +

    mmrm 0.3.12 +

    +

    CRAN release: 2024-06-26

    -

    New Features

    -
    • Add parameter conditional for predict method to control whether the prediction is conditional on the observation or not.
    • -
    +

    New Features +

    +
      +
    • Add parameter conditional for predict method to control whether the prediction is conditional on the observation or not.
    • +
    +
    -

    Bug Fixes

    -
    • Previously if the left hand side of a model formula is an expression, predict and simulate will fail. This is fixed now.
    • -
    +

    Bug Fixes +

    +
      +
    • Previously if the left hand side of a model formula is an expression, predict and simulate will fail. This is fixed now.
    • +
    +
    -

    mmrm 0.3.11

    CRAN release: 2024-03-05

    +

    mmrm 0.3.11 +

    +

    CRAN release: 2024-03-05

    -

    Bug Fixes

    -
    • Previously if a secondary optimizer fails mmrm will fail. This is fixed now.
    • +

      Bug Fixes +

      +
        +
      • Previously if a secondary optimizer fails mmrm will fail. This is fixed now.
      • Previously character covariate variables will make Anova fail. This is fixed now.
      • -
    + +
    -

    mmrm 0.3.10

    CRAN release: 2024-01-26

    +

    mmrm 0.3.10 +

    +

    CRAN release: 2024-01-26

    -

    Miscellaneous

    -
    • Fix internal test skipping functions for MacOS R.
    • -
    +

    Miscellaneous +

    +
      +
    • Fix internal test skipping functions for MacOS R.
    • +
    +
    -

    mmrm 0.3.9

    CRAN release: 2024-01-25

    +

    mmrm 0.3.9 +

    +

    CRAN release: 2024-01-25

    -

    Miscellaneous

    -
    • Fix internal test skipping functions for R versions older than 4.3.
    • -
    +

    Miscellaneous +

    +
      +
    • Fix internal test skipping functions for R versions older than 4.3.
    • +
    +
    -

    mmrm 0.3.8

    CRAN release: 2024-01-24

    +

    mmrm 0.3.8 +

    +

    CRAN release: 2024-01-24

    -

    New Features

    -
    • +

      New Features +

      +
        +
      • Anova is implemented for mmrm models and available upon loading the car package. It supports type II and III hypothesis testing.
      • The argument start for mmrm_control() is updated to allow better choices of initial values.
      • confint on mmrm models will give t-based confidence intervals now, instead of the normal approximation.
      • -
    + +
    -

    Bug Fixes

    -
    • Previously if the first optimizer failed, the best successful fit among the remaining optimizers was not returned correctly. This is fixed now.
    • -
    +

    Bug Fixes +

    +
      +
    • Previously if the first optimizer failed, the best successful fit among the remaining optimizers was not returned correctly. This is fixed now.
    • +
    +
    -

    Miscellaneous

    -
    • In documentation of mmrm_control(), the allowed vcov definition is corrected to “Empirical-Jackknife” (CR3), and “Empirical-Bias-Reduced” (CR2).
    • +

      Miscellaneous +

      +
        +
      • In documentation of mmrm_control(), the allowed vcov definition is corrected to “Empirical-Jackknife” (CR3), and “Empirical-Bias-Reduced” (CR2).
      • Fixed a compiler warning related to missing format specification.
      • If an empty contrast matrix is provided to df_md, it will return statistics with NA values.
      • -
    + +
    -

    mmrm 0.3.7

    CRAN release: 2023-12-08

    +

    mmrm 0.3.7 +

    +

    CRAN release: 2023-12-08

    -

    New Features

    -
    • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
    • +

      New Features +

      +
        +
      • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
      • Add empirical, empirical Jackknife and empirical bias-reduced adjusted coefficients covariance estimates, which can be specified via the new vcov argument of mmrm().
      • Add residual and between-within degrees of freedom methods.
      • Add Kenward-Roger support for spatial covariance structures.
      • @@ -199,61 +278,87 @@

        New FeaturesAdd tidy(), glance() and augment() methods to tidy the fit results into summary tables.
      • Add tidymodels framework support via a parsnip interface.
      • Add argument covariance to mmrm() to allow for easier programmatic access to specifying the model’s covariance structure and to expose covariance customization through the tidymodels interface.
      • -

    + +
    -

    Bug Fixes

    -
    • Previously mmrm() follows the global option na.action and if it is set other than "na.omit" an assertion would fail. This is now fixed and hence NA values are always removed prior to model fitting, independent of the global na.action option.
    • +

      Bug Fixes +

      +
        +
      • Previously mmrm() follows the global option na.action and if it is set other than "na.omit" an assertion would fail. This is now fixed and hence NA values are always removed prior to model fitting, independent of the global na.action option.
      • Previously a model.frame() call on an mmrm object with transformed terms, or new data, e.g. model.frame(mmrm(Y ~ log(X) + ar1(VISIT|ID), data = new_data), would fail. This is now fixed.
      • Previously mmrm() always required a data argument. Now fitting mmrm can also use environment variables instead of requiring data argument. (Note that fit_mmrm is not affected.)
      • Previously emmeans() failed when using transformed terms or not including the visit variable in the model formula. This is now fixed.
      • Previously mmrm() might provide non-finite values in the Jacobian calculations, leading to errors in the Satterthwaite degrees of freedom calculations. This will raise an error now and thus alert the user that the model fit was not successful.
      • -
    + +
    -

    Miscellaneous

    -
    • Use automatic differentiation to calculate Satterthwaite adjusted degrees of freedom, resulting in 10-fold speed-up of the Satterthwaite calculations after the initial model fit.
    • +

      Miscellaneous +

      +
        +
      • Use automatic differentiation to calculate Satterthwaite adjusted degrees of freedom, resulting in 10-fold speed-up of the Satterthwaite calculations after the initial model fit.
      • Add an interactive confirmation step if the number of visit levels is too large for non-spatial covariance structures. Use options(mmrm.max_visits = ) to specify the maximum number of visits allowed in non-interactive mode.
      • Removed free_cores() in favor of parallelly::availableCores(omit = 1).
      • The model.frame() method has been updated: The full argument is deprecated and the include argument can be used instead; by default all relevant variables are returned. Furthermore, it returns a data.frame the size of the number of observations utilized in the model for all combinations of the include argument when na.action= "na.omit".
      • Overall, seven vignettes have been added to the package. All vignettes have a slightly different look now to reduce the size of the overall R package on CRAN.
      • The used optimizer is now available via component(., "optimizer") instead of previously attr(., "optimizer").
      • -
    + +
    -

    mmrm 0.2.2

    CRAN release: 2022-12-20

    +

    mmrm 0.2.2 +

    +

    CRAN release: 2022-12-20

    -

    New Features

    -
    • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
    • +

      New Features +

      +
        +
      • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
      • Update the mmrm arguments to allow users more fine-grained control, e.g. mmrm(..., start = start, optimizer = c("BFGS", "nlminb")) to set the starting values for the variance estimates and to choose the available optimizers. These arguments will be passed to the new function mmrm_control.
      • Add new argument drop_visit_levels to allow users to keep all levels in visits, even when they are not observed in the data. Dropping unobserved levels was done silently previously, and now a message will be given. See ?mmrm_control for more details.
      • -
    + +
    -

    Bug Fixes

    -
    • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
    • +

      Bug Fixes +

      +
        +
      • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
      • Previously in mmrm calls, the weights object in the environment where the formula is defined was replaced by the weights used internally. Now this behavior is removed and your variable weights e.g. in the global environment will no longer be replaced.
      • -
    + +
    -

    Miscellaneous

    -
    • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
    • +

      Miscellaneous +

      +
        +
      • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
      • Deprecated optimizer = "automatic" in favor of not specifying the optimizer. By default, all remaining optimizers will be tried if the first optimizer fails to reach convergence.
      • -
    + +
    -

    mmrm 0.1.5

    CRAN release: 2022-10-18

    -
    • First CRAN version of the package.
    • +

      mmrm 0.1.5 +

      +

      CRAN release: 2022-10-18

      +
        +
      • First CRAN version of the package.
      • The package fits mixed models for repeated measures (MMRM) based on the marginal linear model without random effects.
      • The motivation for this package is to have a fast, reliable (in terms of convergence behavior) and feature complete implementation of MMRM in R.
      • -
      -

      New Features

      -
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • +
      +
      +

      New Features +

      +
        +
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • Fast C++ implementation of Maximum Likelihood (ML) and Restricted Maximum Likelihood (REML) estimation.
      • Currently Satterthwaite adjusted degrees of freedom calculation is supported.
      • Interface to the emmeans package for computing estimated marginal means (also called least-square means) for the coefficients.
      • Multiple optimizers are run to reach convergence in as many cases as possible.
      • Flexible formula based model specification and support for standard S3 methods such as summary, logLik, etc.
      • -
      +
    +
    + + - + + - + + diff --git a/main/reference/Anova.mmrm.html b/main/reference/Anova.mmrm.html index 3a0b0fa21..f990885f1 100644 --- a/main/reference/Anova.mmrm.html +++ b/main/reference/Anova.mmrm.html @@ -1,11 +1,27 @@ - -Conduct type II/III hypothesis testing on the MMRM fit results. — Anova.mmrm • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    Anova.mmrm(
       mod,
       type = c("II", "III", "2", "3"),
    @@ -107,34 +134,43 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    mod
    +
    +
    mod +

    (mmrm)
    the fitted MMRM.

    -
    type
    +
    type +

    (string) type of test, "II", "III", '2', or '3'.

    -
    tol
    +
    tol +

    (numeric) threshold blow which values are treated as 0.

    -
    ...
    +
    ... +

    not used.

    -
    + +
    -

    Details

    +

    Details +

    Anova will return anova object with one row per variable and columns Num Df(numerator degrees of freedom), Denom Df(denominator degrees of freedom), F Statistic and Pr(>=F).

    + + - + + - + + diff --git a/main/reference/COV_TYPES.html b/main/reference/COV_TYPES.html index fa6657f9a..f8f2b4e6b 100644 --- a/main/reference/COV_TYPES.html +++ b/main/reference/COV_TYPES.html @@ -1,11 +1,27 @@ - -Covariance Type Database — COV_TYPES • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,14 +123,17 @@
    -

    Usage

    +

    Usage +

    COV_TYPES
    -

    Format

    +

    Format +

    A data frame with 5 variables and one record per covariance type:

    -
    name
    +
    +
    name

    The long-form name of the covariance structure type

    abbr
    @@ -123,10 +152,12 @@

    Format<

    A logical value indicating whether the covariance structure is spatial.

    -

    + + + +
    -
    - + + - + + diff --git a/main/reference/as.cov_struct.html b/main/reference/as.cov_struct.html index c424eb0bf..85cd52286 100644 --- a/main/reference/as.cov_struct.html +++ b/main/reference/as.cov_struct.html @@ -1,11 +1,27 @@ - -Coerce into a Covariance Structure Definition — as.cov_struct • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    as.cov_struct(x, ...)
     
     # S3 method for class 'formula'
    @@ -105,58 +132,85 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    an object from which to derive a covariance structure. See object specific sections for details.

    -
    ...
    +
    ... +

    additional arguments unused.

    -
    warn_partial
    +
    warn_partial +

    (flag)
    whether to emit a warning when parts of the formula are disregarded.

    -
    + +
    -

    Value

    +

    Value +

    A cov_struct() object.

    -

    Details

    +

    Details +

    A covariance structure can be parsed from a model definition formula or call. Generally, covariance structures defined using non-standard evaluation take the following form:

    -

    type( (visit, )* visit | (group /)? subject )

    +

    +
    +
    type( (visit, )* visit | (group /)? subject )
    +

    +

    For example, formulas may include terms such as

    -

    us(time | subject)
    +

    +
    +
    us(time | subject)
     cp(time | group / subject)
    -sp_exp(coord1, coord2 | group / subject)

    +sp_exp(coord1, coord2 | group / subject)
    +

    +

    Note that only sp_exp (spatial) covariance structures may provide multiple coordinates, which identify the Euclidean distance between the time points.

    -

    Methods (by class)

    +

    Methods (by class) +

    -
    • as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be +

        +
      • +

        as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be covariance structure definitions and must follow the form:

        -

        y ~ xs + type( (visit, )* visit | (group /)? subject )

        +

        +
        +
        y ~ xs + type( (visit, )* visit | (group /)? subject )
        +

        +

        Any component on the right hand side of a formula is considered when -searching for a covariance definition.

      • -
    +searching for a covariance definition.

    + + +
    -

    See also

    +

    See also +

    Other covariance types: cov_struct(), covariance_types

    -

    Examples

    +

    Examples +

    # provide a covariance structure as a right-sided formula
     as.cov_struct(~ csh(visit | group / subject))
     #> <covariance structure>
    @@ -176,7 +230,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/bcva_data.html b/main/reference/bcva_data.html index 2c8973dc4..6d3674dcf 100644 --- a/main/reference/bcva_data.html +++ b/main/reference/bcva_data.html @@ -1,11 +1,27 @@ - -Example Data on BCVA — bcva_data • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,33 +123,41 @@
    -

    Usage

    +

    Usage +

    bcva_data
    -

    Format

    -

    A tibble with 10,000 rows and 7 variables:

    • USUBJID: subject ID.

    • +

      Format +

      +

      A tibble with 10,000 rows and 7 variables:

      +
        +
      • USUBJID: subject ID.

      • VISITN: visit number (numeric).

      • AVISIT: visit number (factor).

      • ARMCD: treatment, TRT or CTL.

      • RACE: 3-category race.

      • BCVA_BL: BCVA at baseline.

      • BCVA_CHG: Change in BCVA at study visits.

      • -
    + +
    -

    Source

    +

    Source +

    This is an artificial dataset.

    -

    Note

    +

    Note +

    Measurements of BCVA (best corrected visual acuity) is a measure of how how many letters a person can read off of an eye chart using corrective lenses or contacts. This a common endpoint in ophthalmology trials.

    + +
    -
    - + + - + + diff --git a/main/reference/cached_mmrm_results.html b/main/reference/cached_mmrm_results.html index 0ff7445e5..0613a7ba4 100644 --- a/main/reference/cached_mmrm_results.html +++ b/main/reference/cached_mmrm_results.html @@ -1,11 +1,27 @@ - -Cache Data for mmrm Model Comparison — cached_mmrm_results • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    cached_mmrm_results
    -

    Format

    -

    A list with following elements:

    • conv_time_fev: Convergence time on FEV data.

    • +

      Format +

      +

      A list with following elements:

      +
        +
      • conv_time_fev: Convergence time on FEV data.

      • conv_time_bcva: Convergence time on BCVA data.

      • rel_diff_ests_tbl_fev: Relative difference in estimates on FEV data.

      • rel_diff_ests_tbl_bcva: Relative difference in estimates on BCVA data.

      • conv_rate: Convergence rate on data with different missing levels.

      • df_missingness: Summary of missingness on simulated data.

      • -
    + +
    -

    Source

    +

    Source +

    This is created based on simulations on FEV data and BCVA data.

    -

    Note

    +

    Note +

    The cached data for comparison is used for the vignettes generation. Please make sure that this data is refreshed before each package release by running the script data-raw/mmrm_review.R. @@ -124,7 +157,8 @@

    Note

    + +
    -
    - + + - + + diff --git a/main/reference/car_add_mmrm.html b/main/reference/car_add_mmrm.html index 496081134..ea6d2f1c4 100644 --- a/main/reference/car_add_mmrm.html +++ b/main/reference/car_add_mmrm.html @@ -1,11 +1,27 @@ - -Register mmrm For Use With car::Anova — car_add_mmrm • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + +
    @@ -97,25 +124,32 @@
    -

    Usage

    +

    Usage +

    car_add_mmrm(quietly = FALSE)
    -

    Arguments

    +

    Arguments +

    -
    quietly
    +
    +
    quietly +

    logical: should progress and error messages be suppressed?

    -
    + +
    -

    Value

    +

    Value +

    A logical value indicating whether registration was successful.

    + +
    -
    - + + - + + diff --git a/main/reference/check_package_version.html b/main/reference/check_package_version.html index f2412f87b..2b5027cb1 100644 --- a/main/reference/check_package_version.html +++ b/main/reference/check_package_version.html @@ -1,11 +1,27 @@ - -Check Suggested Dependency Against Version Requirements — check_package_version • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,33 +123,41 @@
    -

    Usage

    +

    Usage +

    check_package_version(pkg, ver = c(NA_character_, NA_character_))
    -

    Arguments

    +

    Arguments +

    -
    pkg
    +
    +
    pkg +

    (string)
    package name.

    -
    ver
    +
    ver +

    (character)
    of length 2 whose elements can be provided to numeric_version(), representing a minimum and maximum (inclusive) version requirement for interoperability. When NA, no version requirement is imposed. Defaults to no version requirement.

    -
    + +
    -

    Value

    +

    Value +

    A logical (invisibly) indicating whether the loaded package meets the version requirements. A warning is emitted otherwise.

    + +
    -
    - + + - + + diff --git a/main/reference/component.html b/main/reference/component.html index f2128def7..5b212c447 100644 --- a/main/reference/component.html +++ b/main/reference/component.html @@ -1,11 +1,27 @@ - -Component Access for mmrm_tmb Objects — component • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    component(
       object,
       name = c("cov_type", "subject_var", "n_theta", "n_subjects", "n_timepoints", "n_obs",
    @@ -109,24 +136,33 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm_tmb)
    the fitted MMRM.

    -
    name
    +
    name +

    (character)
    the component(s) to be retrieved.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding component of the object, see details.

    -

    Details

    -

    Available component() names are as follows:

    • call: low-level function call which generated the model.

    • +

      Details +

      +

      Available component() names are as follows:

      +
    + +
    -

    See also

    +

    See also +

    In the lme4 package there is a similar function getME().

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -3120,7 +3159,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/cov_struct.html b/main/reference/cov_struct.html index cc3c24f75..a7c0669d4 100644 --- a/main/reference/cov_struct.html +++ b/main/reference/cov_struct.html @@ -1,11 +1,27 @@ - -Define a Covariance Structure — cov_struct • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    cov_struct(
       type = cov_types(),
       visits,
    @@ -108,49 +135,60 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    type
    +
    +
    type +

    (string)
    the name of the covariance structure type to use. For available options, see cov_types(). If a type abbreviation is used that implies heterogeneity (e.g. cph) and no value is provided to heterogeneous, then the heterogeneity is derived from the type name.

    -
    visits
    +
    visits +

    (character)
    a vector of variable names to use for the longitudinal terms of the covariance structure. Multiple terms are only permitted for the "spatial" covariance type.

    -
    subject
    +
    subject +

    (string)
    the name of the variable that encodes a subject identifier.

    -
    group
    +
    group +

    (string)
    optionally, the name of the variable that encodes a grouping variable for subjects.

    -
    heterogeneous
    +
    heterogeneous +

    (flag)

    -
    + +
    -

    Value

    +

    Value +

    A cov_struct object.

    -

    See also

    +

    See also +

    Other covariance types: as.cov_struct(), covariance_types

    -

    Examples

    +

    Examples +

    cov_struct("csh", "AVISITN", "USUBJID")
     #> <covariance structure>
     #> heterogeneous compound symmetry:
    @@ -167,7 +205,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/cov_type_abbr.html b/main/reference/cov_type_abbr.html index 5b6170cbb..6b2d321dc 100644 --- a/main/reference/cov_type_abbr.html +++ b/main/reference/cov_type_abbr.html @@ -1,11 +1,27 @@ - -Retrieve Associated Abbreviated Covariance Structure Type Name — cov_type_abbr • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,26 +123,33 @@
    -

    Usage

    +

    Usage +

    cov_type_abbr(type)
    -

    Arguments

    +

    Arguments +

    -
    type
    +
    +
    type +

    (string)
    either a full name or abbreviate covariance structure type name to collapse into an abbreviated type.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding abbreviated covariance type name.

    + +
    -
    - + + - + + diff --git a/main/reference/cov_type_name.html b/main/reference/cov_type_name.html index 3bda08ef5..35d5018d6 100644 --- a/main/reference/cov_type_name.html +++ b/main/reference/cov_type_name.html @@ -1,11 +1,27 @@ - -Retrieve Associated Full Covariance Structure Type Name — cov_type_name • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,26 +123,33 @@
    -

    Usage

    +

    Usage +

    cov_type_name(type)
    -

    Arguments

    +

    Arguments +

    -
    type
    +
    +
    type +

    (string)
    either a full name or abbreviate covariance structure type name to convert to a long-form type.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding abbreviated covariance type name.

    + +
    -
    - + + - + + diff --git a/main/reference/covariance_types.html b/main/reference/covariance_types.html index d93f6c8ae..c1e792b49 100644 --- a/main/reference/covariance_types.html +++ b/main/reference/covariance_types.html @@ -1,11 +1,27 @@ - -Covariance Types — covariance_types • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    cov_types(
       form = c("name", "abbr", "habbr"),
       filter = c("heterogeneous", "spatial")
    @@ -105,63 +132,152 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    form
    +
    +
    form +

    (character)
    covariance structure type name form. One or more of "name", "abbr" (abbreviation), or "habbr" (heterogeneous abbreviation).

    -
    filter
    +
    filter +

    (character)
    covariance structure type filter. One or more of "heterogeneous" or "spatial".

    -
    + +
    -

    Value

    +

    Value +

    A character vector of accepted covariance structure type names and abbreviations.

    -

    Note

    +

    Note +

    The ante-dependence covariance structure in this package refers to homogeneous ante-dependence, while the ante-dependence covariance structure from SAS PROC MIXED refers to heterogeneous ante-dependence and the homogeneous version is not available in SAS.

    For all non-spatial covariance structures, the time variable must -be coded as a factor.

    -

    Spatial Covariance structures:

    - - -
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)

    where \(d_{ij}\) denotes the Euclidean distance between time points +be coded as a factor.

    +
    +

    Spatial Covariance structures: +

    + + + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)
    +

    where \(d_{ij}\) denotes the Euclidean distance between time points \(i\) and \(j\).

    -

    Abbreviations for Covariance Structures

    +

    Abbreviations for Covariance Structures +

    -

    Common Covariance Structures:

    - - -
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, +

    Common Covariance Structures: +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)
    +

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, respectively, out of total \(m\) time points, \(1 \leq i, j \leq m\).

    -

    See also

    +

    See also +

    Other covariance types: as.cov_struct(), cov_struct()

    + + - + + - + + diff --git a/main/reference/df_1d.html b/main/reference/df_1d.html index eb94d4e95..1f3fcce4d 100644 --- a/main/reference/df_1d.html +++ b/main/reference/df_1d.html @@ -1,15 +1,31 @@ - -Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm + + + + + +Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm + + + + + + + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,31 +129,39 @@
    -

    Usage

    +

    Usage +

    df_1d(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    contrast +

    (numeric)
    contrast vector. Note that this should not include elements for singular coefficient estimates, i.e. only refer to the actually estimated coefficients.

    -
    + +
    -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -153,7 +187,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/df_md.html b/main/reference/df_md.html index 71237583f..5315b0d6a 100644 --- a/main/reference/df_md.html +++ b/main/reference/df_md.html @@ -1,17 +1,33 @@ - -Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm + + + + + +Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm + + + + + + + + + + Skip to contents @@ -27,10 +43,12 @@ + + + + + @@ -106,32 +132,40 @@
    -

    Usage

    +

    Usage +

    df_md(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    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

    +

    Value +

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

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -154,7 +188,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/drop_elements.html b/main/reference/drop_elements.html index ac1485e1b..bf07242f3 100644 --- a/main/reference/drop_elements.html +++ b/main/reference/drop_elements.html @@ -1,11 +1,27 @@ - -Drop Items from an Indexible — drop_elements • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,30 +123,38 @@
    -

    Usage

    +

    Usage +

    drop_elements(x, n)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    Any object that can be consumed by seq_along() and indexed by a logical vector of the same length.

    -
    n
    +
    n +

    (integer)
    the number of terms to drop.

    -
    + +
    -

    Value

    +

    Value +

    A subset of x.

    + +
    -
    - + + - + + diff --git a/main/reference/emit_tidymodels_register_msg.html b/main/reference/emit_tidymodels_register_msg.html index 1e79b8cc6..9495e067e 100644 --- a/main/reference/emit_tidymodels_register_msg.html +++ b/main/reference/emit_tidymodels_register_msg.html @@ -1,11 +1,27 @@ - -Format a Message to Emit When Tidymodels is Loaded — emit_tidymodels_register_msg • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,18 +123,21 @@
    -

    Usage

    +

    Usage +

    emit_tidymodels_register_msg()
    -

    Value

    +

    Value +

    A character message to emit. Either a ansi-formatted cli output if package 'cli' is available or a plain-text message otherwise.

    + +
    -
    - + + - + + diff --git a/main/reference/emmeans_support.html b/main/reference/emmeans_support.html index d2feb503e..214554499 100644 --- a/main/reference/emmeans_support.html +++ b/main/reference/emmeans_support.html @@ -1,23 +1,39 @@ - -Support for emmeans — emmeans_support • mmrm + + + + + +Support for emmeans — emmeans_support • mmrm + + + + + + + + + + Skip to contents @@ -33,10 +49,12 @@ + + + + +
    @@ -117,7 +144,8 @@
    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -149,7 +177,8 @@ 

    Examples#> Results are averaged over the levels of: RACE, SEX

    -
    + +
    - + + - + + diff --git a/main/reference/emp_start.html b/main/reference/emp_start.html index f86140484..7b9337559 100644 --- a/main/reference/emp_start.html +++ b/main/reference/emp_start.html @@ -1,11 +1,27 @@ - -Empirical Starting Value — emp_start • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,58 +123,72 @@
    -

    Usage

    +

    Usage +

    emp_start(data, model_formula, visit_var, subject_var, subject_groups, ...)
    -

    Arguments

    +

    Arguments +

    -
    data
    +
    +
    data +

    (data.frame)
    data used for model fitting.

    -
    model_formula
    +
    model_formula +

    (formula)
    the formula in mmrm model without covariance structure part.

    -
    visit_var
    +
    visit_var +

    (string)
    visit variable.

    -
    subject_var
    +
    subject_var +

    (string)
    subject id variable.

    -
    subject_groups
    +
    subject_groups +

    (factor)
    subject group assignment.

    -
    ...
    +
    ... +

    not used.

    -
    + +
    -

    Value

    +

    Value +

    A numeric vector of starting values.

    -

    Details

    +

    Details +

    This emp_start only works for unstructured covariance structure. It uses linear regression to first obtain the coefficients and use the residuals to obtain the empirical variance-covariance, and it is then used to obtain the starting values.

    -

    Note

    +

    Note +

    data is used instead of full_frame because full_frame is already transformed if model contains transformations, e.g. log(FEV1) ~ exp(FEV1_BL) will drop FEV1 and FEV1_BL but add log(FEV1) and exp(FEV1_BL) in full_frame.

    + +
    -
    - + + - + + diff --git a/main/reference/fev_data.html b/main/reference/fev_data.html index f33e720ba..049056629 100644 --- a/main/reference/fev_data.html +++ b/main/reference/fev_data.html @@ -1,11 +1,27 @@ - -Example Data on FEV1 — fev_data • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,13 +123,17 @@
    -

    Usage

    +

    Usage +

    fev_data
    -

    Format

    -

    A tibble with 800 rows and 7 variables:

    • USUBJID: subject ID.

    • +

      Format +

      +

      A tibble with 800 rows and 7 variables:

      +
        +
      • USUBJID: subject ID.

      • AVISIT: visit number.

      • ARMCD: treatment, TRT or PBO.

      • RACE: 3-category race.

      • @@ -113,20 +143,24 @@

        Format<
      • WEIGHT: weighting variable.

      • VISITN: integer order of the visit.

      • VISITN2: coordinates of the visit for distance calculation.

      • -

    + +
    -

    Source

    +

    Source +

    This is an artificial dataset.

    -

    Note

    +

    Note +

    Measurements of FEV1 (forced expired volume in one second) is a measure of how quickly the lungs can be emptied. Low levels of FEV1 may indicate chronic obstructive pulmonary disease (COPD).

    + +
    -
    - + + - + + diff --git a/main/reference/fill_names.html b/main/reference/fill_names.html index e3f3e95a0..e2767ff34 100644 --- a/main/reference/fill_names.html +++ b/main/reference/fill_names.html @@ -1,11 +1,27 @@ - -Complete character Vector Names From Values — fill_names • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,26 +123,33 @@
    -

    Usage

    +

    Usage +

    fill_names(x)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (character or list)
    value whose names should be completed from element values.

    -
    + +
    -

    Value

    +

    Value +

    A named vector or list.

    + +
    -
    - + + - + + diff --git a/main/reference/fit_mmrm.html b/main/reference/fit_mmrm.html index c96a16546..894a995a7 100644 --- a/main/reference/fit_mmrm.html +++ b/main/reference/fit_mmrm.html @@ -1,17 +1,33 @@ - -Low-Level Fitting Function for MMRM — fit_mmrm • mmrm + + + + + +Low-Level Fitting Function for MMRM — fit_mmrm • mmrm + + + + + + + + + + Skip to contents @@ -27,10 +43,12 @@ + + + + + @@ -106,7 +132,8 @@
    -

    Usage

    +

    Usage +

    fit_mmrm(
       formula,
       data,
    @@ -120,56 +147,69 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    formula
    +
    +
    formula +

    (formula)
    model formula with exactly one special term specifying the visits within subjects, see details.

    -
    data
    +
    data +

    (data.frame)
    input data containing the variables used in formula.

    -
    weights
    +
    weights +

    (vector)
    input vector containing the weights.

    -
    reml
    +
    reml +

    (flag)
    whether restricted maximum likelihood (REML) estimation is used, otherwise maximum likelihood (ML) is used.

    -
    covariance
    +
    covariance +

    (cov_struct)
    A covariance structure type definition, or value that can be coerced to a covariance structure using as.cov_struct(). If no value is provided, a structure is derived from the provided formula.

    -
    tmb_data
    +
    tmb_data +

    (mmrm_tmb_data)
    object.

    -
    formula_parts
    +
    formula_parts +

    (mmrm_tmb_formula_parts)
    list with formula parts from h_mmrm_tmb_formula_parts().

    -
    control
    +
    control +

    (mmrm_control)
    list of control options produced by mmrm_control().

    -
    + +
    -

    Value

    +

    Value +

    List of class mmrm_tmb, see h_mmrm_tmb_fit() for details. In addition, it contains elements call and optimizer.

    -

    Details

    +

    Details +

    The formula typically looks like:

    FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)

    which specifies response and covariates as usual, and exactly one special term @@ -179,7 +219,8 @@

    Details
    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     data <- fev_data
     system.time(result <- fit_mmrm(formula, data, rep(1, nrow(fev_data))))
    @@ -188,7 +229,8 @@ 

    Examples

    + +

    - + + - + + diff --git a/main/reference/fit_single_optimizer.html b/main/reference/fit_single_optimizer.html index 55a79386f..dfc0cb579 100644 --- a/main/reference/fit_single_optimizer.html +++ b/main/reference/fit_single_optimizer.html @@ -1,15 +1,31 @@ - -Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm + + + + + +Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm + + + + + + + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,7 +129,8 @@
    -

    Usage

    +

    Usage +

    fit_single_optimizer(
       formula,
       data,
    @@ -118,58 +145,72 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    formula
    +
    +
    formula +

    (formula)
    the model formula, see details.

    -
    data
    +
    data +

    (data)
    the data to be used for the model.

    -
    weights
    +
    weights +

    (vector)
    an optional vector of weights to be used in the fitting process. Should be NULL or a numeric vector.

    -
    reml
    +
    reml +

    (flag)
    whether restricted maximum likelihood (REML) estimation is used, otherwise maximum likelihood (ML) is used.

    -
    covariance
    +
    covariance +

    (cov_struct)
    a covariance structure type definition as produced with cov_struct(), or value that can be coerced to a covariance structure using as.cov_struct(). If no value is provided, a structure is derived from the provided formula.

    -
    tmb_data
    +
    tmb_data +

    (mmrm_tmb_data)
    object.

    -
    formula_parts
    +
    formula_parts +

    (mmrm_tmb_formula_parts)
    object.

    -
    ...
    +
    ... +

    Additional arguments to pass to mmrm_control().

    -
    control
    +
    control +

    (mmrm_control)
    object.

    -
    + +
    -

    Value

    +

    Value +

    The mmrm_fit object, with additional attributes containing warnings, messages, optimizer used and convergence status in addition to the mmrm_tmb contents.

    -

    Details

    +

    Details +

    fit_single_optimizer will fit the mmrm model using the control provided. If there are multiple optimizers provided in control, only the first optimizer will be used. @@ -178,7 +219,8 @@

    Details
    -

    Examples

    +

    Examples +

    mod_fit <- fit_single_optimizer(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data,
    @@ -190,7 +232,8 @@ 

    Examples

    + +

    - + + - + + diff --git a/main/reference/flat_expr.html b/main/reference/flat_expr.html index 40b167980..b268009fe 100644 --- a/main/reference/flat_expr.html +++ b/main/reference/flat_expr.html @@ -1,17 +1,33 @@ - -Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm + + + + + +Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm + + + + + + + + + + Skip to contents @@ -27,10 +43,12 @@ + + + + + @@ -106,46 +132,69 @@
    -

    Usage

    +

    Usage +

    flatten_call(call)
     
     flatten_expr(expr)
    -

    Arguments

    +

    Arguments +

    -
    call, expr
    +
    +
    call, expr +

    (language)
    a language object to flatten.

    -
    + +
    -

    Value

    +

    Value +

    A list of atomic values, symbols, infix operator names and subexpressions.

    -

    Details

    +

    Details +

    Where 1 + 2 | 3 in R's syntax tree is (|, (+, 1, 2), 3), flattening it into its visual order produces (1, +, 2, |, 3), which makes for more fluent interpretation of non-standard grammar rules used in formulas.

    -

    Functions

    +

    Functions +

    -
    • flatten_call(): Flatten a call into a list of names and argument expressions.

      +
        +
      • +

        flatten_call(): Flatten a call into a list of names and argument expressions.

        The call name and all arguments are flattened into the same list, meaning a call of the form sp_exp(a, b, c | d / e) produces a list of the form (sp_exp, a, b, c, |, d, /, e).

        -

        flatten_call(quote(sp_exp(a, b, c | d / e)))

      • -
      • flatten_expr(): Flatten nested expressions

        -

        flatten_expr(quote(1 + 2 + 3 | 4))

      • -
    +

    +
    +
    flatten_call(quote(sp_exp(a, b, c | d / e)))
    +

    +
    + +
  • +

    flatten_expr(): Flatten nested expressions

    +

    +
    +
    flatten_expr(quote(1 + 2 + 3 | 4))
    +

    +
    +
  • + + + +
    -
    - + + - + + diff --git a/main/reference/format.cov_struct.html b/main/reference/format.cov_struct.html index 295bfca17..ea92d40d1 100644 --- a/main/reference/format.cov_struct.html +++ b/main/reference/format.cov_struct.html @@ -1,11 +1,27 @@ - -Format Covariance Structure Object — format.cov_struct • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,30 +123,38 @@
    -

    Usage

    +

    Usage +

    # S3 method for class 'cov_struct'
     format(x, ...)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (cov_struct)
    a covariance structure object.

    -
    ...
    +
    ... +

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string for x.

    + +
    -
    - + + - + + diff --git a/main/reference/format_symbols.html b/main/reference/format_symbols.html index 7c77b9506..b78817ad5 100644 --- a/main/reference/format_symbols.html +++ b/main/reference/format_symbols.html @@ -1,13 +1,29 @@ - -Format Symbol Objects — format_symbols • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,25 +126,32 @@
    -

    Usage

    +

    Usage +

    format_symbols(x)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (character) A vector of variable names.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string of comma-separated variables.

    + +
    -
    - + + - + + diff --git a/main/reference/formula_rhs.html b/main/reference/formula_rhs.html index dc4e45bfc..ff1be09f5 100644 --- a/main/reference/formula_rhs.html +++ b/main/reference/formula_rhs.html @@ -1,11 +1,27 @@ - -Extract Right-Hand-Side (rhs) from Formula — formula_rhs • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,28 +123,39 @@
    -

    Usage

    +

    Usage +

    formula_rhs(f)
    -

    Arguments

    +

    Arguments +

    -
    f
    +
    +
    f +

    (formula)
    a formula.

    -
    + +
    -

    Value

    +

    Value +

    A formula without a response, derived from the right-hand-side of the formula, f.

    -

    formula_rhs(a ~ b + c)
    -formula_rhs(~ b + c)

    +

    +
    +
    formula_rhs(a ~ b + c)
    +formula_rhs(~ b + c)
    +

    +
    + +
    -
    - + + - + + diff --git a/main/reference/h_add_covariance_terms.html b/main/reference/h_add_covariance_terms.html index cdb65f9fc..7f5dd98cb 100644 --- a/main/reference/h_add_covariance_terms.html +++ b/main/reference/h_add_covariance_terms.html @@ -1,11 +1,27 @@ - -Add Individual Covariance Variables As Terms to Formula — h_add_covariance_terms • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,37 +123,46 @@
    -

    Usage

    +

    Usage +

    h_add_covariance_terms(f, covariance)
    -

    Arguments

    +

    Arguments +

    -
    f
    +
    +
    f +

    (formula)
    a formula to which covariance structure terms should be added.

    -
    covariance
    +
    covariance +

    (cov_struct)
    a covariance structure object from which additional variables should be sourced.

    -
    + +
    -

    Value

    +

    Value +

    A new formula with included covariance terms.

    -

    Details

    +

    Details +

    stats::update() is used to append the covariance structure and the environment attribute will not be changed. This ensures the returned formula and the input formula have the same environment.

    + + - + + - + + diff --git a/main/reference/h_add_terms.html b/main/reference/h_add_terms.html index 0b70f7954..69ac874e0 100644 --- a/main/reference/h_add_terms.html +++ b/main/reference/h_add_terms.html @@ -1,11 +1,27 @@ - -Add Formula Terms with Character — h_add_terms • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,39 +123,49 @@
    -

    Usage

    +

    Usage +

    h_add_terms(f, adds, drop_response = FALSE)
    -

    Arguments

    +

    Arguments +

    -
    f
    +
    +
    f +

    (formula)
    a formula to be updated.

    -
    adds
    +
    adds +

    (character)
    representation of elements to be added.

    -
    drop_response
    +
    drop_response +

    (flag)
    whether response should be dropped.

    -
    + +
    -

    Value

    +

    Value +

    A new formula with elements in drops removed.

    -

    Details

    +

    Details +

    Elements in adds will be added from the formula, while the environment of the formula is unchanged. If adds is NULL or character(0), the formula is unchanged.

    + + - + + - + + diff --git a/main/reference/h_coef_table.html b/main/reference/h_coef_table.html index 32e4d651c..f67aa2b05 100644 --- a/main/reference/h_coef_table.html +++ b/main/reference/h_coef_table.html @@ -1,11 +1,27 @@ - -Coefficients Table for MMRM Fit — h_coef_table • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,26 +123,33 @@
    -

    Usage

    +

    Usage +

    h_coef_table(object)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    model fit.

    -
    + +
    -

    Value

    +

    Value +

    Matrix with one row per coefficient and columns Estimate, Std. Error, df, t value and Pr(>|t|).

    + +
    -
    - + + - + + diff --git a/main/reference/h_confirm_large_levels.html b/main/reference/h_confirm_large_levels.html index d68188244..ac7c1554f 100644 --- a/main/reference/h_confirm_large_levels.html +++ b/main/reference/h_confirm_large_levels.html @@ -1,13 +1,29 @@ - -Ask for Confirmation on Large Visit Levels — h_confirm_large_levels • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,25 +126,32 @@
    -

    Usage

    +

    Usage +

    h_confirm_large_levels(x)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (numeric)
    number of visit levels.

    -
    + +
    -

    Value

    +

    Value +

    Logical value TRUE.

    + +
    -
    - + + - + + diff --git a/main/reference/h_construct_model_frame_inputs.html b/main/reference/h_construct_model_frame_inputs.html index 34ea68698..725879071 100644 --- a/main/reference/h_construct_model_frame_inputs.html +++ b/main/reference/h_construct_model_frame_inputs.html @@ -1,19 +1,35 @@ - -Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm + + + + + +Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm + + + + + + + + + + Skip to contents @@ -29,10 +45,12 @@ + + + + + @@ -109,7 +135,8 @@
    -

    Usage

    +

    Usage +

    h_construct_model_frame_inputs(
       formula,
       data,
    @@ -120,35 +147,47 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    formula
    +
    +
    formula +

    (mmrm)
    mmrm fit object.

    -
    data
    +
    data +

    optional data frame that will be passed to model.frame() or model.matrix()

    -
    include
    +
    include +

    (character)
    names of variable to include

    -
    full
    +
    full +

    (flag)
    indicator whether to return full model frame (deprecated).

    -
    + +
    -

    Value

    -

    named list with four elements:

    • "formula": the formula including the columns requested in the include= argument.

    • +

      Value +

      +

      named list with four elements:

      +
        +
      • "formula": the formula including the columns requested in the include= argument.

      • "data": a data frame including all columns needed in the formula. full formula are identical

      • -
    + + + +
    -
    - + + - + + diff --git a/main/reference/h_default_value.html b/main/reference/h_default_value.html index 13f897059..135b21089 100644 --- a/main/reference/h_default_value.html +++ b/main/reference/h_default_value.html @@ -1,13 +1,29 @@ - -Default Value on NULL Return default value when first argument is NULL. — h_default_value • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,29 +126,37 @@
    -

    Usage

    +

    Usage +

    h_default_value(x, y)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    Object.

    -
    y
    +
    y +

    Object.

    -
    + +
    -

    Details

    +

    Details +

    If x is NULL, returns y. Otherwise return x.

    + + - + + - + + diff --git a/main/reference/h_df_1d_bw.html b/main/reference/h_df_1d_bw.html index 53c5b5a31..823244b35 100644 --- a/main/reference/h_df_1d_bw.html +++ b/main/reference/h_df_1d_bw.html @@ -1,11 +1,27 @@ - -Calculation of Between-Within Degrees of Freedom for One-Dimensional Contrast — h_df_1d_bw • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,31 +123,39 @@
    -

    Usage

    +

    Usage +

    h_df_1d_bw(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    contrast +

    (numeric)
    contrast vector. Note that this should not include elements for singular coefficient estimates, i.e. only refer to the actually estimated coefficients.

    -
    + +
    -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    - + + - + + diff --git a/main/reference/h_df_1d_kr.html b/main/reference/h_df_1d_kr.html index f87ef6546..5e6d2d1c3 100644 --- a/main/reference/h_df_1d_kr.html +++ b/main/reference/h_df_1d_kr.html @@ -1,13 +1,29 @@ - -Calculation of Kenward-Roger Degrees of Freedom for One-Dimensional Contrast — h_df_1d_kr • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,31 +126,39 @@
    -

    Usage

    +

    Usage +

    h_df_1d_kr(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    contrast +

    (numeric)
    contrast vector. Note that this should not include elements for singular coefficient estimates, i.e. only refer to the actually estimated coefficients.

    -
    + +
    -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    - + + - + + diff --git a/main/reference/h_df_1d_res.html b/main/reference/h_df_1d_res.html index b609860a5..6664de596 100644 --- a/main/reference/h_df_1d_res.html +++ b/main/reference/h_df_1d_res.html @@ -1,13 +1,29 @@ - -Calculation of Residual Degrees of Freedom for One-Dimensional Contrast — h_df_1d_res • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,31 +126,39 @@
    -

    Usage

    +

    Usage +

    h_df_1d_res(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    contrast +

    (numeric)
    contrast vector. Note that this should not include elements for singular coefficient estimates, i.e. only refer to the actually estimated coefficients.

    -
    + +
    -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    - + + - + + diff --git a/main/reference/h_df_1d_sat.html b/main/reference/h_df_1d_sat.html index c82571c9d..d4f855cf3 100644 --- a/main/reference/h_df_1d_sat.html +++ b/main/reference/h_df_1d_sat.html @@ -1,13 +1,29 @@ - -Calculation of Satterthwaite Degrees of Freedom for One-Dimensional Contrast — h_df_1d_sat • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,31 +126,39 @@
    -

    Usage

    +

    Usage +

    h_df_1d_sat(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    contrast +

    (numeric)
    contrast vector. Note that this should not include elements for singular coefficient estimates, i.e. only refer to the actually estimated coefficients.

    -
    + +
    -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    - + + - + + diff --git a/main/reference/h_df_bw_calc.html b/main/reference/h_df_bw_calc.html index 678ce23c8..4a3fa34cb 100644 --- a/main/reference/h_df_bw_calc.html +++ b/main/reference/h_df_bw_calc.html @@ -1,11 +1,27 @@ - -Calculation of Between-Within Degrees of Freedom — h_df_bw_calc • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,27 +123,37 @@
    -

    Usage

    +

    Usage +

    h_df_bw_calc(object)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the fitted MMRM.

    -
    + +
    -

    Value

    -

    List with:

    + + + +
    -
    - + + - + + diff --git a/main/reference/h_df_md_bw.html b/main/reference/h_df_md_bw.html index 184d353b8..0d443f6f9 100644 --- a/main/reference/h_df_md_bw.html +++ b/main/reference/h_df_md_bw.html @@ -1,11 +1,27 @@ - -Calculation of Between-Within Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_bw • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,32 +123,40 @@
    -

    Usage

    +

    Usage +

    h_df_md_bw(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    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

    +

    Value +

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

    + +
    -
    - + + - + + diff --git a/main/reference/h_df_md_from_1d.html b/main/reference/h_df_md_from_1d.html index 8b79d8c7a..f245721e7 100644 --- a/main/reference/h_df_md_from_1d.html +++ b/main/reference/h_df_md_from_1d.html @@ -1,11 +1,27 @@ - -Creating F-Statistic Results from One-Dimensional Contrast — h_df_md_from_1d • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,30 +123,38 @@
    -

    Usage

    +

    Usage +

    h_df_md_from_1d(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    model fit.

    -
    contrast
    +
    contrast +

    (numeric)
    one-dimensional contrast.

    -
    + +
    -

    Value

    +

    Value +

    The one-dimensional degrees of freedom are calculated and then based on that the p-value is calculated.

    + +
    -
    - + + - + + diff --git a/main/reference/h_df_md_kr.html b/main/reference/h_df_md_kr.html index 21de30164..5179df5c4 100644 --- a/main/reference/h_df_md_kr.html +++ b/main/reference/h_df_md_kr.html @@ -1,11 +1,27 @@ - -Calculation of Kenward-Roger Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_kr • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,32 +123,40 @@
    -

    Usage

    +

    Usage +

    h_df_md_kr(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    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

    +

    Value +

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

    + +
    -
    - + + - + + diff --git a/main/reference/h_df_md_res.html b/main/reference/h_df_md_res.html index 4d2d7fb3b..c66480c3e 100644 --- a/main/reference/h_df_md_res.html +++ b/main/reference/h_df_md_res.html @@ -1,11 +1,27 @@ - -Calculation of Residual Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_res • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,32 +123,40 @@
    -

    Usage

    +

    Usage +

    h_df_md_res(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    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

    +

    Value +

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

    + +
    -
    - + + - + + diff --git a/main/reference/h_df_md_sat.html b/main/reference/h_df_md_sat.html index 55b88b2cb..f045b8062 100644 --- a/main/reference/h_df_md_sat.html +++ b/main/reference/h_df_md_sat.html @@ -1,11 +1,27 @@ - -Calculation of Satterthwaite Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_sat • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,32 +123,40 @@
    -

    Usage

    +

    Usage +

    h_df_md_sat(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    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

    +

    Value +

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

    + +
    -
    - + + - + + diff --git a/main/reference/h_df_min_bw.html b/main/reference/h_df_min_bw.html index c9b83c887..e2685cb8a 100644 --- a/main/reference/h_df_min_bw.html +++ b/main/reference/h_df_min_bw.html @@ -1,11 +1,27 @@ - -Assign Minimum Degrees of Freedom Given Involved Coefficients — h_df_min_bw • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,31 +123,39 @@
    -

    Usage

    +

    Usage +

    h_df_min_bw(bw_calc, is_coef_involved)
    -

    Arguments

    +

    Arguments +

    -
    bw_calc
    +
    +
    bw_calc +

    (list)
    from h_df_bw_calc().

    -
    is_coef_involved
    +
    is_coef_involved +

    (logical)
    whether each coefficient is involved in the contrast.

    -
    + +
    -

    Value

    +

    Value +

    The minimum of the degrees of freedom assigned to each involved coefficient according to its between-within categorization.

    + +
    -
    - + + - + + diff --git a/main/reference/h_df_to_tibble.html b/main/reference/h_df_to_tibble.html index d123c192a..4551892ab 100644 --- a/main/reference/h_df_to_tibble.html +++ b/main/reference/h_df_to_tibble.html @@ -1,11 +1,27 @@ - -Coerce a Data Frame to a tibble — h_df_to_tibble • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + +
    @@ -97,24 +124,31 @@
    -

    Usage

    +

    Usage +

    h_df_to_tibble(data)
    -

    Arguments

    +

    Arguments +

    -
    data
    +
    +
    data +

    (data.frame)
    what to coerce.

    -
    + +
    -

    Value

    +

    Value +

    The data as a tibble, potentially with a .rownames column.

    -

    Details

    +

    Details +

    This is only a thin wrapper around tibble::as_tibble(), except giving a useful error message and it checks for rownames and adds them as a new column .rownames if they are not just a numeric sequence as @@ -122,7 +156,8 @@

    Details

    + + - + + - + + diff --git a/main/reference/h_drop_covariance_terms.html b/main/reference/h_drop_covariance_terms.html index 8876e95e1..fc09f868a 100644 --- a/main/reference/h_drop_covariance_terms.html +++ b/main/reference/h_drop_covariance_terms.html @@ -1,11 +1,27 @@ - -Drop Formula Terms used for Covariance Structure Definition — h_drop_covariance_terms • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,31 +123,39 @@
    -

    Usage

    +

    Usage +

    h_drop_covariance_terms(f)
    -

    Arguments

    +

    Arguments +

    -
    f
    +
    +
    f +

    (formula)
    a formula from which covariance terms should be dropped.

    -
    + +
    -

    Value

    +

    Value +

    The formula without accepted covariance terms.

    -

    Details

    +

    Details +

    terms is used and it will preserve the environment attribute. This ensures the returned formula and the input formula have the same environment.

    + + - + + - + + diff --git a/main/reference/h_drop_levels.html b/main/reference/h_drop_levels.html index 5d61c71e0..9a829fc39 100644 --- a/main/reference/h_drop_levels.html +++ b/main/reference/h_drop_levels.html @@ -1,11 +1,27 @@ - -Drop Levels from Dataset — h_drop_levels • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,33 +123,42 @@
    -

    Usage

    +

    Usage +

    h_drop_levels(data, subject_var, visit_var, except)
    -

    Arguments

    +

    Arguments +

    -
    data
    +
    +
    data +

    (data.frame) data to drop levels.

    -
    subject_var
    +
    subject_var +

    (character) subject variable.

    -
    visit_var
    +
    visit_var +

    (character) visit variable.

    -
    except
    +
    except +

    (character) variables to exclude from dropping.

    -
    + + + +
    -
    - + + - + + diff --git a/main/reference/h_extra_levels.html b/main/reference/h_extra_levels.html index a1b0e3387..95d47372e 100644 --- a/main/reference/h_extra_levels.html +++ b/main/reference/h_extra_levels.html @@ -1,11 +1,27 @@ - -Check if a Factor Should Drop Levels — h_extra_levels • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,21 +123,27 @@
    -

    Usage

    +

    Usage +

    h_extra_levels(x)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (vector) vector to check.

    -
    + + + +
    -
    - + + - + + diff --git a/main/reference/h_extract_covariance_terms.html b/main/reference/h_extract_covariance_terms.html index 51b9a8caa..42fa21e26 100644 --- a/main/reference/h_extract_covariance_terms.html +++ b/main/reference/h_extract_covariance_terms.html @@ -1,11 +1,27 @@ - -Extract Formula Terms used for Covariance Structure Definition — h_extract_covariance_terms • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,26 +123,33 @@
    -

    Usage

    +

    Usage +

    h_extract_covariance_terms(f)
    -

    Arguments

    +

    Arguments +

    -
    f
    +
    +
    f +

    (formula)
    a formula from which covariance terms should be extracted.

    -
    + +
    -

    Value

    +

    Value +

    A list of covariance structure expressions found in f.

    + +
    -
    - + + - + + diff --git a/main/reference/h_first_contain_categorical.html b/main/reference/h_first_contain_categorical.html index 85fc2c970..4cd7e3cf9 100644 --- a/main/reference/h_first_contain_categorical.html +++ b/main/reference/h_first_contain_categorical.html @@ -1,11 +1,27 @@ - -Check if the Effect is the First Categorical Effect — h_first_contain_categorical • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,29 +123,37 @@
    -

    Usage

    +

    Usage +

    h_first_contain_categorical(effect, factors, categorical)
    -

    Arguments

    +

    Arguments +

    -
    effect
    +
    +
    effect +

    (string) name of the effect.

    -
    factors
    +
    factors +

    (matrix) the factor matrix.

    -
    categorical
    +
    categorical +

    (character) names of the categorical values.

    -
    + + + +
    -
    - + + - + + diff --git a/main/reference/h_get_contrast.html b/main/reference/h_get_contrast.html index 8a749dd81..ee1155ad7 100644 --- a/main/reference/h_get_contrast.html +++ b/main/reference/h_get_contrast.html @@ -1,11 +1,27 @@ - -Obtain Contrast for Specified Effect — h_get_contrast • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    h_get_contrast(
       object,
       effect,
    @@ -107,32 +134,41 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the fitted MMRM.

    -
    effect
    +
    effect +

    (string) the name of the effect.

    -
    type
    +
    type +

    (string) type of test, "II", "III", '2', or '3'.

    -
    tol
    +
    tol +

    (numeric) threshold blow which values are treated as 0.

    -
    + +
    -

    Value

    +

    Value +

    A matrix of the contrast.

    + +
    -
    - + + - + + diff --git a/main/reference/h_get_cov_default.html b/main/reference/h_get_cov_default.html index 38dafd6f3..e80548acd 100644 --- a/main/reference/h_get_cov_default.html +++ b/main/reference/h_get_cov_default.html @@ -1,13 +1,29 @@ - -Obtain Default Covariance Method — h_get_cov_default • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,26 +126,33 @@
    -

    Usage

    +

    Usage +

    h_get_cov_default(
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within")
     )
    -

    Arguments

    +

    Arguments +

    -
    method
    +
    +
    method +

    (string)
    degrees of freedom method.

    -
    + +
    -

    Value

    +

    Value +

    String of the default covariance method.

    -

    Details

    +

    Details +

    The default covariance method is different for different degrees of freedom method. For "Satterthwaite" or "Between-Within", "Asymptotic" is returned. For "Kenward-Roger" only, "Kenward-Roger" is returned. @@ -127,7 +160,8 @@

    Details

    + + - + + - + + diff --git a/main/reference/h_get_empirical.html b/main/reference/h_get_empirical.html index ec3847ff8..e6fe8e428 100644 --- a/main/reference/h_get_empirical.html +++ b/main/reference/h_get_empirical.html @@ -1,15 +1,31 @@ - -Obtain Empirical/Jackknife/Bias-Reduced Covariance — h_get_empirical • mmrm + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,43 +129,57 @@
    -

    Usage

    +

    Usage +

    h_get_empirical(tmb_data, theta, beta, beta_vcov, type)
    -

    Arguments

    +

    Arguments +

    -
    tmb_data
    +
    +
    tmb_data +

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    -
    theta
    +
    theta +

    (numeric)
    theta estimate.

    -
    beta
    +
    beta +

    (numeric)
    beta estimate.

    -
    beta_vcov
    +
    beta_vcov +

    (matrix)
    covariance of beta estimate.

    -
    type
    +
    type +

    (string)
    type of empirical method, including "Empirical", "Empirical-Jackknife" and "Empirical-Bias-Reduced".

    -
    + +
    -

    Value

    -

    Named list with elements:

    • cov: matrix empirical covariance.

    • +

      Value +

      +

      Named list with elements:

      +
        +
      • cov: matrix empirical covariance.

      • df_mat: matrix to calculate Satterthwaite degree of freedom.

      • -
    + + + +
    -
    - + + - + + diff --git a/main/reference/h_get_index.html b/main/reference/h_get_index.html index 0dfcb8c0e..cdafe8be2 100644 --- a/main/reference/h_get_index.html +++ b/main/reference/h_get_index.html @@ -1,11 +1,27 @@ - -Test if the First Vector is Subset of the Second Vector — h_get_index • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_get_index(x, y)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (vector) the first list.

    -
    y
    +
    y +

    (vector) the second list.

    -
    + + + +
    -
    - + + - + + diff --git a/main/reference/h_get_kr_comp.html b/main/reference/h_get_kr_comp.html index a83b2112c..6c9959934 100644 --- a/main/reference/h_get_kr_comp.html +++ b/main/reference/h_get_kr_comp.html @@ -1,13 +1,29 @@ - -Obtain Kenward-Roger Adjustment Components — h_get_kr_comp • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,30 +126,41 @@
    -

    Usage

    +

    Usage +

    h_get_kr_comp(tmb_data, theta)
    -

    Arguments

    +

    Arguments +

    -
    tmb_data
    +
    +
    tmb_data +

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    -
    theta
    +
    theta +

    (numeric)
    theta estimate.

    -
    + +
    -

    Value

    -

    Named list with elements:

    • P: matrix of \(P\) component.

    • +

      Value +

      +

      Named list with elements:

      +
        +
      • P: matrix of \(P\) component.

      • Q: matrix of \(Q\) component.

      • R: matrix of \(R\) component.

      • -
    + +
    -

    Details

    +

    Details +

    the function returns a named list, \(P\), \(Q\) and \(R\), which corresponds to the paper in 1997. The matrices are stacked in columns so that \(P\), \(Q\) and \(R\) has the same column number(number of beta parameters). The number of rows, is dependent on @@ -135,7 +172,8 @@

    Details

    + + - + + - + + diff --git a/main/reference/h_get_na_action.html b/main/reference/h_get_na_action.html index ad73ab672..d48893ecb 100644 --- a/main/reference/h_get_na_action.html +++ b/main/reference/h_get_na_action.html @@ -1,11 +1,27 @@ - -Obtain na.action as Function — h_get_na_action • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,12 +123,14 @@
    -

    Usage

    +

    Usage +

    h_get_na_action(na_action)
    - + + - + + - + + diff --git a/main/reference/h_get_optimizers.html b/main/reference/h_get_optimizers.html index 5d3abd7f9..b1d6cbc8b 100644 --- a/main/reference/h_get_optimizers.html +++ b/main/reference/h_get_optimizers.html @@ -1,11 +1,27 @@ - -Obtain Optimizer according to Optimizer String Value — h_get_optimizers • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    h_get_optimizers(
       optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"),
       optimizer_fun = h_optimizer_fun(optimizer),
    @@ -107,49 +134,65 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    optimizer
    +
    +
    optimizer +

    (character)
    names of built-in optimizers to try, subset of "L-BFGS-B", "BFGS", "CG" and "nlminb".

    -
    optimizer_fun
    +
    optimizer_fun +

    (function or list of function)
    alternatively to optimizer, an optimizer function or a list of optimizer functions can be passed directly here.

    -
    optimizer_args
    +
    optimizer_args +

    (list)
    additional arguments for optimizer_fun.

    -
    optimizer_control
    +
    optimizer_control +

    (list)
    passed to argument control in optimizer_fun.

    -
    + +
    -

    Value

    +

    Value +

    Named list of optimizers created by h_partial_fun_args().

    -

    Details

    -

    If you want to use only the built-in optimizers:

    • optimizer is a shortcut to create a list of built-in optimizer functions +

      Details +

      +

      If you want to use only the built-in optimizers:

      +
        +
      • optimizer is a shortcut to create a list of built-in optimizer functions passed to optimizer_fun.

      • Allowed are "L-BFGS-B", "BFGS", "CG" (using stats::optim() with corresponding method) and "nlminb" (using stats::nlminb()).

      • Other arguments should go into optimizer_args.

      • -

      If you want to use your own optimizer function:

      • Make sure that there are three arguments: parameter (start value), objective function +

      +

      If you want to use your own optimizer function:

      +
        +
      • Make sure that there are three arguments: parameter (start value), objective function and gradient function are sequentially in the function arguments.

      • If there are other named arguments in front of these, make sure they are correctly specified through optimizer_args.

      • If the hessian can be used, please make sure its argument name is hessian and please add attribute use_hessian = TRUE to the function, using attr(fun, "use_hessian) <- TRUE.

      • -
    + + + + - + + - + + diff --git a/main/reference/h_get_prediction.html b/main/reference/h_get_prediction.html index 4b8e74817..4a33ccfa6 100644 --- a/main/reference/h_get_prediction.html +++ b/main/reference/h_get_prediction.html @@ -1,11 +1,27 @@ - -Get Prediction — h_get_prediction • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,43 +123,57 @@
    -

    Usage

    +

    Usage +

    h_get_prediction(tmb_data, theta, beta, beta_vcov)
    -

    Arguments

    +

    Arguments +

    -
    tmb_data
    +
    +
    tmb_data +

    (mmrm_tmb_data)
    object.

    -
    theta
    +
    theta +

    (numeric)
    theta value.

    -
    beta
    +
    beta +

    (numeric)
    beta value.

    -
    beta_vcov
    +
    beta_vcov +

    (matrix)
    beta_vcov matrix.

    -
    + +
    -

    Value

    -

    List with:

    • prediction: Matrix with columns fit, conf_var, and var.

    • +

      Value +

      +

      List with:

      +
        +
      • prediction: Matrix with columns fit, conf_var, and var.

      • covariance: List with subject specific covariance matrices.

      • index: List of zero-based subject indices.

      • -
    + +
    -

    Details

    +

    Details +

    See predict function in predict.cpp which is called internally.

    + + - + + - + + diff --git a/main/reference/h_get_prediction_variance.html b/main/reference/h_get_prediction_variance.html index c1ba9e20a..93b5af534 100644 --- a/main/reference/h_get_prediction_variance.html +++ b/main/reference/h_get_prediction_variance.html @@ -1,11 +1,27 @@ - -Get Prediction Variance — h_get_prediction_variance • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,29 +123,37 @@
    -

    Usage

    +

    Usage +

    h_get_prediction_variance(object, nsim, tmb_data)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm_tmb)
    the fitted MMRM.

    -
    nsim
    +
    nsim +

    (count)
    number of samples.

    -
    tmb_data
    +
    tmb_data +

    (mmrm_tmb_data)
    object.

    -
    + + + +
    -
    - + + - + + diff --git a/main/reference/h_get_sim_per_subj.html b/main/reference/h_get_sim_per_subj.html index 75c5215c8..048a2394f 100644 --- a/main/reference/h_get_sim_per_subj.html +++ b/main/reference/h_get_sim_per_subj.html @@ -1,11 +1,27 @@ - -Get simulated values by patient. — h_get_sim_per_subj • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,29 +123,37 @@
    -

    Usage

    +

    Usage +

    h_get_sim_per_subj(predict_res, nsub, nsim)
    -

    Arguments

    +

    Arguments +

    -
    predict_res
    +
    +
    predict_res +

    (list)
    from h_get_prediction().

    -
    nsub
    +
    nsub +

    (count)
    number of subjects.

    -
    nsim
    +
    nsim +

    (count)
    number of values to simulate.

    -
    + + + +
    -
    - + + - + + diff --git a/main/reference/h_get_theta_from_cov.html b/main/reference/h_get_theta_from_cov.html index a7a90495e..fc93c7730 100644 --- a/main/reference/h_get_theta_from_cov.html +++ b/main/reference/h_get_theta_from_cov.html @@ -1,11 +1,27 @@ - -Obtain Theta from Covariance Matrix — h_get_theta_from_cov • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,30 +123,38 @@
    -

    Usage

    +

    Usage +

    h_get_theta_from_cov(covariance)
    -

    Arguments

    +

    Arguments +

    -
    covariance
    +
    +
    covariance +

    (matrix) of covariance matrix values.

    -
    + +
    -

    Value

    +

    Value +

    Numeric vector of the theta values.

    -

    Details

    +

    Details +

    If the covariance matrix has NA in some of the elements, they will be replaced by 0 (non-diagonal) and 1 (diagonal). This ensures that the matrix is positive definite.

    + + - + + - + + diff --git a/main/reference/h_gradient.html b/main/reference/h_gradient.html index 7472d1225..a0ef1a9e3 100644 --- a/main/reference/h_gradient.html +++ b/main/reference/h_gradient.html @@ -1,13 +1,29 @@ - -Computation of a Gradient Given Jacobian and Contrast Vector — h_gradient • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,32 +126,40 @@
    -

    Usage

    +

    Usage +

    h_gradient(jac_list, contrast)
    -

    Arguments

    +

    Arguments +

    -
    jac_list
    +
    +
    jac_list +

    (list)
    Jacobian list produced e.g. by h_jac_list().

    -
    contrast
    +
    contrast +

    (numeric)
    contrast vector, which needs to have the same number of elements as there are rows and columns in each element of jac_list.

    -
    + +
    -

    Value

    +

    Value +

    Numeric vector which contains the quadratic forms of each element of jac_list with the contrast vector.

    + +
    -
    - + + - + + diff --git a/main/reference/h_jac_list.html b/main/reference/h_jac_list.html index a54b1543d..1125cacad 100644 --- a/main/reference/h_jac_list.html +++ b/main/reference/h_jac_list.html @@ -1,11 +1,27 @@ - -Obtain List of Jacobian Matrix Entries for Covariance Matrix — h_jac_list • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,35 +123,44 @@
    -

    Usage

    +

    Usage +

    h_jac_list(tmb_data, theta_est, beta_vcov)
    -

    Arguments

    +

    Arguments +

    -
    tmb_data
    +
    +
    tmb_data +

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    -
    theta_est
    +
    theta_est +

    (numeric)
    variance parameters point estimate.

    -
    beta_vcov
    +
    beta_vcov +

    (matrix)
    vairance covariance matrix of coefficients.

    -
    + +
    -

    Value

    +

    Value +

    List with one element per variance parameter containing a matrix of the same dimensions as the covariance matrix. The values are the derivatives with regards to this variance parameter.

    + +
    -
    - + + - + + diff --git a/main/reference/h_kr_df.html b/main/reference/h_kr_df.html index ab453ee08..bb1bdffc4 100644 --- a/main/reference/h_kr_df.html +++ b/main/reference/h_kr_df.html @@ -1,13 +1,29 @@ - -Obtain the Adjusted Kenward-Roger degrees of freedom — h_kr_df • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,38 +126,51 @@
    -

    Usage

    +

    Usage +

    h_kr_df(v0, l, w, p)
    -

    Arguments

    +

    Arguments +

    -
    v0
    +
    +
    v0 +

    (matrix)
    unadjusted covariance matrix.

    -
    l
    +
    l +

    (matrix)
    linear combination matrix.

    -
    w
    +
    w +

    (matrix)
    hessian matrix.

    -
    p
    +
    p +

    (matrix)
    P matrix from h_get_kr_comp().

    -
    + +
    -

    Value

    -

    Named list with elements:

    • m: numeric degrees of freedom.

    • +

      Value +

      +

      Named list with elements:

      +
        +
      • m: numeric degrees of freedom.

      • lambda: numeric F statistic scale parameter.

      • -
    + + + +
    -
    - + + - + + diff --git a/main/reference/h_md_denom_df.html b/main/reference/h_md_denom_df.html index d69f14459..a2ed47daa 100644 --- a/main/reference/h_md_denom_df.html +++ b/main/reference/h_md_denom_df.html @@ -1,11 +1,27 @@ - -Calculating Denominator Degrees of Freedom for the Multi-Dimensional Case — h_md_denom_df • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,32 +123,40 @@
    -

    Usage

    +

    Usage +

    h_md_denom_df(t_stat_df)
    -

    Arguments

    +

    Arguments +

    -
    t_stat_df
    +
    +
    t_stat_df +

    (numeric)
    n t-statistic derived degrees of freedom.

    -
    + +
    -

    Value

    +

    Value +

    Usually the calculation is returning 2 * E / (E - n) where E is the sum of t / (t - 2) over all t_stat_df values t.

    -

    Note

    +

    Note +

    If the input values are two similar to each other then just the average of them is returned. If any of the inputs is not larger than 2 then 2 is returned.

    + +
    -
    - + + - + + diff --git a/main/reference/h_mmrm_tmb_assert_start.html b/main/reference/h_mmrm_tmb_assert_start.html index f9b54c93c..a0d777986 100644 --- a/main/reference/h_mmrm_tmb_assert_start.html +++ b/main/reference/h_mmrm_tmb_assert_start.html @@ -1,11 +1,27 @@ - -Asserting Sane Start Values for TMB Fit — h_mmrm_tmb_assert_start • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_assert_start(tmb_object)
    -

    Arguments

    +

    Arguments +

    -
    tmb_object
    +
    +
    tmb_object +

    (list)
    created with TMB::MakeADFun().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used for assertions.

    + +
    -
    - + + - + + diff --git a/main/reference/h_mmrm_tmb_check_conv.html b/main/reference/h_mmrm_tmb_check_conv.html index 2c6f3c998..a4d78a21b 100644 --- a/main/reference/h_mmrm_tmb_check_conv.html +++ b/main/reference/h_mmrm_tmb_check_conv.html @@ -1,11 +1,27 @@ - -Checking the TMB Optimization Result — h_mmrm_tmb_check_conv • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,30 +123,38 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_check_conv(tmb_opt, mmrm_tmb)
    -

    Arguments

    +

    Arguments +

    -
    tmb_opt
    +
    +
    tmb_opt +

    (list)
    optimization result.

    -
    mmrm_tmb
    +
    mmrm_tmb +

    (mmrm_tmb)
    result from h_mmrm_tmb_fit().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used to generate warnings in case that the model did not converge.

    + +
    -
    - + + - + + diff --git a/main/reference/h_mmrm_tmb_data.html b/main/reference/h_mmrm_tmb_data.html index 7fabddcf4..00a35d1c5 100644 --- a/main/reference/h_mmrm_tmb_data.html +++ b/main/reference/h_mmrm_tmb_data.html @@ -1,11 +1,27 @@ - -Data for TMB Fit — h_mmrm_tmb_data • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_data(
       formula_parts,
       data,
    @@ -113,47 +140,61 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    formula_parts
    +
    +
    formula_parts +

    (mmrm_tmb_formula_parts)
    list with formula parts from h_mmrm_tmb_formula_parts().

    -
    data
    +
    data +

    (data.frame)
    which contains variables used in formula_parts.

    -
    weights
    +
    weights +

    (vector)
    weights to be used in the fitting process.

    -
    reml
    +
    reml +

    (flag)
    whether restricted maximum likelihood (REML) estimation is used, otherwise maximum likelihood (ML) is used.

    -
    singular
    +
    singular +

    (string)
    choices of method deal with rank-deficient matrices. "error" to stop the function return the error, "drop" to drop these columns, and "keep" to keep all the columns.

    -
    drop_visit_levels
    +
    drop_visit_levels +

    (flag)
    whether to drop levels for visit variable, if visit variable is a factor.

    -
    allow_na_response
    +
    allow_na_response +

    (flag)
    whether NA in response is allowed.

    -
    drop_levels
    +
    drop_levels +

    (flag)
    whether drop levels for covariates. If not dropped could lead to singular matrix.

    -
    + +
    -

    Value

    -

    List of class mmrm_tmb_data with elements:

    • full_frame: data.frame with n rows containing all variables needed in the model.

    • +

      Value +

      +

      List of class mmrm_tmb_data with elements:

      +
        +
      • full_frame: data.frame with n rows containing all variables needed in the model.

      • data: data.frame of input dataset.

      • x_matrix: matrix with n rows and p columns specifying the overall design matrix.

      • x_cols_aliased: logical with potentially more than p elements indicating which @@ -173,9 +214,11 @@

        Value

        reml: int specifying whether REML estimation is used (1), otherwise ML (0).

      • subject_groups: factor specifying the grouping for each subject.

      • n_groups: int with the number of total groups

      • -
    + +
    -

    Details

    +

    Details +

    Note that the subject_var must not be factor but can also be character. If it is character, then it will be converted to factor internally. Here the levels will be the unique values, sorted alphabetically and numerically if there @@ -184,7 +227,8 @@

    Details

    + + - + + - + + diff --git a/main/reference/h_mmrm_tmb_extract_cov.html b/main/reference/h_mmrm_tmb_extract_cov.html index eeab40b06..0d8b6d32f 100644 --- a/main/reference/h_mmrm_tmb_extract_cov.html +++ b/main/reference/h_mmrm_tmb_extract_cov.html @@ -1,13 +1,29 @@ - -Extract covariance matrix from TMB report and input data — h_mmrm_tmb_extract_cov • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,39 +126,49 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_extract_cov(tmb_report, tmb_data, visit_var, is_spatial)
    -

    Arguments

    +

    Arguments +

    -
    tmb_report
    +
    +
    tmb_report +

    (list)
    report created with TMB::MakeADFun() report function.

    -
    tmb_data
    +
    tmb_data +

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    -
    visit_var
    +
    visit_var +

    (character)
    character vector of the visit variable

    -
    is_spatial
    +
    is_spatial +

    (flag)
    indicator whether the covariance structure is spatial.

    -
    + +
    -

    Value

    +

    Value +

    Return a simple covariance matrix if there is no grouping, or a named list of estimated grouped covariance matrices, with its name equal to the group levels.

    + +
    -
    - + + - + + diff --git a/main/reference/h_mmrm_tmb_fit.html b/main/reference/h_mmrm_tmb_fit.html index e0f5f3f63..5c69ae6c8 100644 --- a/main/reference/h_mmrm_tmb_fit.html +++ b/main/reference/h_mmrm_tmb_fit.html @@ -1,13 +1,29 @@ - -Build TMB Fit Result List — h_mmrm_tmb_fit • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,34 +126,45 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_fit(tmb_object, tmb_opt, formula_parts, tmb_data)
    -

    Arguments

    +

    Arguments +

    -
    tmb_object
    +
    +
    tmb_object +

    (list)
    created with TMB::MakeADFun().

    -
    tmb_opt
    +
    tmb_opt +

    (list)
    optimization result.

    -
    formula_parts
    +
    formula_parts +

    (mmrm_tmb_formula_parts)
    produced by h_mmrm_tmb_formula_parts().

    -
    tmb_data
    +
    tmb_data +

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    -
    + +
    -

    Value

    -

    List of class mmrm_tmb with:

    • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

    • +

      Value +

      +

      List of class mmrm_tmb with:

      +
        +
      • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

      • beta_est: vector of coefficient estimates.

      • beta_vcov: Variance-covariance matrix for coefficient estimates.

      • beta_vcov_inv_L: Lower triangular matrix L of the inverse variance-covariance matrix decomposition.

      • @@ -142,16 +179,19 @@

        Value

        opt_details: list with optimization details including convergence code.

      • tmb_object: original TMB object created with TMB::MakeADFun().

      • tmb_data: input.

      • -
    + +
    -

    Details

    +

    Details +

    Instead of inverting or decomposing beta_vcov, it can be more efficient to use its robust Cholesky decomposition LDL^T, therefore we return the corresponding two components L and D as well since they have been available on the C++ side already.

    + + - + + - + + diff --git a/main/reference/h_mmrm_tmb_formula_parts.html b/main/reference/h_mmrm_tmb_formula_parts.html index 62add50b7..6044d5d58 100644 --- a/main/reference/h_mmrm_tmb_formula_parts.html +++ b/main/reference/h_mmrm_tmb_formula_parts.html @@ -1,11 +1,27 @@ - -Processing the Formula for TMB Fit — h_mmrm_tmb_formula_parts • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_formula_parts(
       formula,
       covariance = as.cov_struct(formula, warn_partial = FALSE)
    @@ -105,21 +132,29 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    formula
    +
    +
    formula +

    (formula)
    Original formula.

    -
    covariance
    +
    covariance +

    (cov_struct)
    A covariance structure from which additional formula parts should be added.

    -
    + +
    -

    Value

    -

    List of class mmrm_tmb_formula_parts with elements:

    • formula: the original input.

    • +

      Value +

      +

      List of class mmrm_tmb_formula_parts with elements:

      +
        +
      • formula: the original input.

      • model_formula: formula with the covariance term is removed.

      • model_formula: formula with the covariance term removed.

      • full_formula: same as model_formula but includes the covariance @@ -132,10 +167,12 @@

        Value

        group_var: string with the group variable name. If no group specified, this element is NULL.

      • model_var: character with the variables names of the formula, except subject_var.

      • -
    + + + +
    -
    - + + - + + diff --git a/main/reference/h_mmrm_tmb_parameters.html b/main/reference/h_mmrm_tmb_parameters.html index 0234f40ad..2d981b068 100644 --- a/main/reference/h_mmrm_tmb_parameters.html +++ b/main/reference/h_mmrm_tmb_parameters.html @@ -1,11 +1,27 @@ - -Start Parameters for TMB Fit — h_mmrm_tmb_parameters • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,40 +123,50 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_parameters(formula_parts, tmb_data, start, n_groups = 1L)
    -

    Arguments

    +

    Arguments +

    -
    formula_parts
    +
    +
    formula_parts +

    (mmrm_tmb_formula_parts)
    produced by h_mmrm_tmb_formula_parts().

    -
    tmb_data
    +
    tmb_data +

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    -
    start
    +
    start +

    (numeric or NULL)
    optional start values for variance parameters.

    -
    n_groups
    +
    n_groups +

    (int)
    number of groups.

    -
    + +
    -

    Value

    +

    Value +

    List with element theta containing the start values for the variance parameters.

    + +
    -
    - + + - + + diff --git a/main/reference/h_newdata_add_pred.html b/main/reference/h_newdata_add_pred.html index f5cee5aa2..835c5f9a7 100644 --- a/main/reference/h_newdata_add_pred.html +++ b/main/reference/h_newdata_add_pred.html @@ -1,11 +1,27 @@ - -Add Prediction Results to New Data — h_newdata_add_pred • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,44 +123,55 @@
    -

    Usage

    +

    Usage +

    h_newdata_add_pred(x, newdata, se_fit, interval, ...)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (mmrm)
    fit.

    -
    newdata
    +
    newdata +

    (data.frame)
    data to predict.

    -
    se_fit
    +
    se_fit +

    (flag)
    whether to return standard error of prediction, can only be used when interval is not "none".

    -
    interval
    +
    interval +

    (string)
    type of interval.

    -
    ...
    +
    ... +

    passed to predict.mmrm_tmb().

    -
    + +
    -

    Value

    +

    Value +

    The newdata as a tibble with additional columns .fitted, .lower, .upper (if interval is not none) and .se.fit (if se_fit requested).

    + +
    -
    - + + - + + diff --git a/main/reference/h_obtain_lvls.html b/main/reference/h_obtain_lvls.html index 09f6700df..a9f6036a0 100644 --- a/main/reference/h_obtain_lvls.html +++ b/main/reference/h_obtain_lvls.html @@ -1,11 +1,27 @@ - -Obtain Levels Prior and Posterior — h_obtain_lvls • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,33 +123,42 @@
    -

    Usage

    +

    Usage +

    h_obtain_lvls(var, additional_vars, xlev, factors)
    -

    Arguments

    +

    Arguments +

    -
    var
    +
    +
    var +

    (string) name of the effect.

    -
    additional_vars
    +
    additional_vars +

    (character) names of additional variables.

    -
    xlev
    +
    xlev +

    (list) named list of character levels.

    -
    factors
    +
    factors +

    (matrix) the factor matrix.

    -
    + + + +
    -
    - + + - + + diff --git a/main/reference/h_optimizer_fun.html b/main/reference/h_optimizer_fun.html index 6b67352d9..ef03e9274 100644 --- a/main/reference/h_optimizer_fun.html +++ b/main/reference/h_optimizer_fun.html @@ -1,11 +1,27 @@ - -Obtain Optimizer Function with Character — h_optimizer_fun • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_optimizer_fun(optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"))
    -

    Arguments

    +

    Arguments +

    -
    optimizer
    +
    +
    optimizer +

    (character)
    vector of optimizers.

    -
    + +
    -

    Value

    +

    Value +

    A (list)
    of optimizer functions generated from h_partial_fun_args().

    + +
    -
    - + + - + + diff --git a/main/reference/h_partial_fun_args.html b/main/reference/h_partial_fun_args.html index fc6414e79..aecde671a 100644 --- a/main/reference/h_partial_fun_args.html +++ b/main/reference/h_partial_fun_args.html @@ -1,11 +1,27 @@ - -Create Partial Functions — h_partial_fun_args • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,33 +123,42 @@
    -

    Usage

    +

    Usage +

    h_partial_fun_args(fun, ..., additional_attr = list())
    -

    Arguments

    +

    Arguments +

    -
    fun
    +
    +
    fun +

    (function)
    to be wrapped.

    -
    ...
    +
    ... +

    Additional arguments for fun.

    -
    additional_attr
    +
    additional_attr +

    (list)
    of additional attributes to apply to the result.

    -
    + +
    -

    Value

    +

    Value +

    Object with S3 class "partial", a function with args attribute (and possibly more attributes from additional_attr).

    -

    Details

    +

    Details +

    This function add args attribute to the original function, and add an extra class partial to the function. args is the argument for the function, and elements in ... will override the existing @@ -131,7 +166,8 @@

    Details

    + + - + + - + + diff --git a/main/reference/h_print_aic_list.html b/main/reference/h_print_aic_list.html index 85f823222..6f5cbbdbb 100644 --- a/main/reference/h_print_aic_list.html +++ b/main/reference/h_print_aic_list.html @@ -1,11 +1,27 @@ - -Printing AIC and other Model Fit Criteria — h_print_aic_list • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_print_aic_list(aic_list, digits = 1)
    -

    Arguments

    +

    Arguments +

    -
    aic_list
    +
    +
    aic_list +

    (list)
    list as part of from summary.mmrm().

    -
    digits
    +
    digits +

    (number)
    number of decimal places used with round().

    -
    + + + +
    -
    - + + - + + diff --git a/main/reference/h_print_call.html b/main/reference/h_print_call.html index a5cf9df0d..c3c0d5cb0 100644 --- a/main/reference/h_print_call.html +++ b/main/reference/h_print_call.html @@ -1,11 +1,27 @@ - -Printing MMRM Function Call — h_print_call • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,33 +123,42 @@
    -

    Usage

    +

    Usage +

    h_print_call(call, n_obs, n_subjects, n_timepoints)
    -

    Arguments

    +

    Arguments +

    -
    call
    +
    +
    call +

    (call)
    original mmrm() function call.

    -
    n_obs
    +
    n_obs +

    (int)
    number of observations.

    -
    n_subjects
    +
    n_subjects +

    (int)
    number of subjects.

    -
    n_timepoints
    +
    n_timepoints +

    (int)
    number of timepoints.

    -
    + + + +
    -
    - + + - + + diff --git a/main/reference/h_print_cov.html b/main/reference/h_print_cov.html index 2872a6a34..e04d872ed 100644 --- a/main/reference/h_print_cov.html +++ b/main/reference/h_print_cov.html @@ -1,11 +1,27 @@ - -Printing MMRM Covariance Type — h_print_cov • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,29 +123,37 @@
    -

    Usage

    +

    Usage +

    h_print_cov(cov_type, n_theta, n_groups)
    -

    Arguments

    +

    Arguments +

    -
    cov_type
    +
    +
    cov_type +

    (string)
    covariance structure abbreviation.

    -
    n_theta
    +
    n_theta +

    (count)
    number of variance parameters.

    -
    n_groups
    +
    n_groups +

    (count)
    number of groups.

    -
    + + + +
    -
    - + + - + + diff --git a/main/reference/h_quad_form.html b/main/reference/h_quad_form.html index 96ae55a5f..c38f926e5 100644 --- a/main/reference/h_quad_form.html +++ b/main/reference/h_quad_form.html @@ -1,13 +1,29 @@ - -Quadratic Form Calculations — h_quad_form • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,43 +126,54 @@
    -

    Usage

    +

    Usage +

    h_quad_form_vec(vec, center)
     
     h_quad_form_mat(mat, center)
    -

    Arguments

    +

    Arguments +

    -
    vec
    +
    +
    vec +

    (numeric)
    interpreted as a row vector.

    -
    center
    +
    center +

    (matrix)
    square numeric matrix with the same dimensions as x as the center of the quadratic form.

    -
    mat
    +
    mat +

    (matrix)
    numeric matrix to be multiplied left and right of center, therefore needs to have as many columns as there are rows and columns in center.

    -
    + +
    -

    Functions

    +

    Functions +

    -
    • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) +

        +
      • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) as a numeric (not a matrix).

      • h_quad_form_mat(): calculates the quadratic form mat %*% center %*% t(mat) as a matrix, the result is square and has dimensions identical to the number of rows in mat.

      • -
    + + + +
    -
    - + + - + + diff --git a/main/reference/h_reconcile_cov_struct.html b/main/reference/h_reconcile_cov_struct.html index 13e7ce559..a591fd6b9 100644 --- a/main/reference/h_reconcile_cov_struct.html +++ b/main/reference/h_reconcile_cov_struct.html @@ -1,11 +1,27 @@ - -Reconcile Possible Covariance Structure Inputs — h_reconcile_cov_struct • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,34 +123,42 @@
    -

    Usage

    +

    Usage +

    h_reconcile_cov_struct(formula = NULL, covariance = NULL)
    -

    Arguments

    +

    Arguments +

    -
    formula
    +
    +
    formula +

    (formula)
    the model formula, see details.

    -
    covariance
    +
    covariance +

    (cov_struct)
    a covariance structure type definition as produced with cov_struct(), or value that can be coerced to a covariance structure using as.cov_struct(). If no value is provided, a structure is derived from the provided formula.

    -
    + +
    -

    Value

    +

    Value +

    The value covariance if it's provided or a covariance structure derived from the provided formula otherwise. An error is raised of both are provided.

    + +
    -
    - + + - + + diff --git a/main/reference/h_record_all_output.html b/main/reference/h_record_all_output.html index 82f1d468e..e2e229765 100644 --- a/main/reference/h_record_all_output.html +++ b/main/reference/h_record_all_output.html @@ -1,15 +1,31 @@ - -Capture all Output — h_record_all_output • mmrm + + + + + +Capture all Output — h_record_all_output • mmrm + + + + + + + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,41 +129,53 @@
    -

    Usage

    +

    Usage +

    h_record_all_output(expr, remove = list(), divergence = list())
    -

    Arguments

    +

    Arguments +

    -
    expr
    +
    +
    expr +

    (expression)
    to be executed.

    -
    remove
    +
    remove +

    (list)
    optional list with elements warnings, errors, messages which can be character vectors, which will be removed from the results if specified.

    -
    divergence
    +
    divergence +

    (list)
    optional list similar as remove, but these character vectors will be moved to the divergence result and signal that the fit did not converge.

    -
    + +
    -

    Value

    -

    A list containing

    • result: The object returned by expr or list() if an error was thrown.

    • +

      Value +

      +

      A list containing

      +
        +
      • result: The object returned by expr or list() if an error was thrown.

      • warnings: NULL or a character vector if warnings were thrown.

      • errors: NULL or a string if an error was thrown.

      • messages: NULL or a character vector if messages were produced.

      • divergence: NULL or a character vector if divergence messages were caught.

      • -
    + + + +
    -
    - + + - + + diff --git a/main/reference/h_register_s3.html b/main/reference/h_register_s3.html index 98505e6c7..4d7d33359 100644 --- a/main/reference/h_register_s3.html +++ b/main/reference/h_register_s3.html @@ -1,13 +1,29 @@ - -Register S3 Method Register S3 method to a generic. — h_register_s3 • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,37 +126,47 @@
    -

    Usage

    +

    Usage +

    h_register_s3(pkg, generic, class, envir = parent.frame())
    -

    Arguments

    +

    Arguments +

    -
    pkg
    +
    +
    pkg +

    (string) name of the package name.

    -
    generic
    +
    generic +

    (string) name of the generic.

    -
    class
    +
    class +

    (string) class name the function want to dispatch.

    -
    envir
    +
    envir +

    (environment) the location the method is defined.

    -
    + +
    -

    Details

    +

    Details +

    This function is adapted from emmeans:::register_s3_method().

    + + - + + - + + diff --git a/main/reference/h_residuals_normalized.html b/main/reference/h_residuals_normalized.html index 7dbe4d439..17cbc9e89 100644 --- a/main/reference/h_residuals_normalized.html +++ b/main/reference/h_residuals_normalized.html @@ -1,11 +1,27 @@ - -Calculate normalized residuals — h_residuals_normalized • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_residuals_normalized(object)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    - + + - + + diff --git a/main/reference/h_residuals_pearson.html b/main/reference/h_residuals_pearson.html index 6b77fb272..a59333018 100644 --- a/main/reference/h_residuals_pearson.html +++ b/main/reference/h_residuals_pearson.html @@ -1,11 +1,27 @@ - -Calculate Pearson Residuals — h_residuals_pearson • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_residuals_pearson(object)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals.

    + +
    -
    - + + - + + diff --git a/main/reference/h_residuals_response.html b/main/reference/h_residuals_response.html index 0ea60ef7b..792238c5d 100644 --- a/main/reference/h_residuals_response.html +++ b/main/reference/h_residuals_response.html @@ -1,11 +1,27 @@ - -Calculate response residuals. — h_residuals_response • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_residuals_response(object)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    - + + - + + diff --git a/main/reference/h_split_control.html b/main/reference/h_split_control.html index d3b85429b..e71637689 100644 --- a/main/reference/h_split_control.html +++ b/main/reference/h_split_control.html @@ -1,13 +1,29 @@ - -Split Control List — h_split_control • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,29 +126,37 @@
    -

    Usage

    +

    Usage +

    h_split_control(control, ...)
    -

    Arguments

    +

    Arguments +

    -
    control
    +
    +
    control +

    (mmrm_control)
    object.

    -
    ...
    +
    ... +

    additional parameters to update the control object.

    -
    + +
    -

    Value

    +

    Value +

    A list of mmrm_control entries.

    + +
    -
    - + + - + + diff --git a/main/reference/h_summarize_all_fits.html b/main/reference/h_summarize_all_fits.html index 5316322b6..d9241f95c 100644 --- a/main/reference/h_summarize_all_fits.html +++ b/main/reference/h_summarize_all_fits.html @@ -1,11 +1,27 @@ - -Summarizing List of Fits — h_summarize_all_fits • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_summarize_all_fits(all_fits)
    -

    Arguments

    +

    Arguments +

    -
    all_fits
    +
    +
    all_fits +

    (list of mmrm_fit or try-error)
    list of fits.

    -
    + +
    -

    Value

    +

    Value +

    List with warnings, messages, log_liks and converged results.

    + +
    -
    - + + - + + diff --git a/main/reference/h_tbl_confint_terms.html b/main/reference/h_tbl_confint_terms.html index 1421f453d..f24e84b1a 100644 --- a/main/reference/h_tbl_confint_terms.html +++ b/main/reference/h_tbl_confint_terms.html @@ -1,11 +1,27 @@ - -Extract tibble with Confidence Intervals and Term Names — h_tbl_confint_terms • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,29 +123,37 @@
    -

    Usage

    +

    Usage +

    h_tbl_confint_terms(x, ...)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (mmrm)
    fit object.

    -
    ...
    +
    ... +

    passed to stats::confint(), hence not used at the moment.

    -
    + +
    -

    Value

    +

    Value +

    A tibble with term, conf.low, conf.high columns.

    + +
    -
    - + + - + + diff --git a/main/reference/h_test_1d.html b/main/reference/h_test_1d.html index cf7e6ef1c..b2e282712 100644 --- a/main/reference/h_test_1d.html +++ b/main/reference/h_test_1d.html @@ -1,13 +1,29 @@ - -Creating T-Statistic Test Results For One-Dimensional Contrast — h_test_1d • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,35 +126,44 @@
    -

    Usage

    +

    Usage +

    h_test_1d(object, contrast, df)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    contrast +

    (numeric)
    contrast vector. Note that this should not include elements for singular coefficient estimates, i.e. only refer to the actually estimated coefficients.

    -
    df
    +
    df +

    (number)
    degrees of freedom for the one-dimensional contrast.

    -
    + +
    -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val (2-sided p-value).

    + +
    -
    - + + - + + diff --git a/main/reference/h_test_md.html b/main/reference/h_test_md.html index bb646c8b3..8e25c7b85 100644 --- a/main/reference/h_test_md.html +++ b/main/reference/h_test_md.html @@ -1,13 +1,29 @@ - -Creating F-Statistic Test Results For Multi-Dimensional Contrast — h_test_md • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,37 +126,47 @@
    -

    Usage

    +

    Usage +

    h_test_md(object, contrast, df, f_stat_factor = 1)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    contrast +

    (matrix)
    numeric contrast matrix.

    -
    df
    +
    df +

    (number)
    denominator degrees of freedom for the multi-dimensional contrast.

    -
    f_stat_factor
    +
    f_stat_factor +

    (number)
    optional scaling factor on top of the standard F-statistic.

    -
    + +
    -

    Value

    +

    Value +

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

    + +
    -
    - + + - + + diff --git a/main/reference/h_tmb_version_sufficient.html b/main/reference/h_tmb_version_sufficient.html index 8931e5d3e..cd64b3352 100644 --- a/main/reference/h_tmb_version_sufficient.html +++ b/main/reference/h_tmb_version_sufficient.html @@ -1,11 +1,27 @@ - -Predicate if the TMB Version Used to Compile the Package is Sufficient — h_tmb_version_sufficient • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,17 +123,20 @@
    -

    Usage

    +

    Usage +

    h_tmb_version_sufficient()
    -

    Value

    +

    Value +

    Flag whether the TMB version is sufficient.

    + +
    -
    - + + - + + diff --git a/main/reference/h_tmb_warn_non_deterministic.html b/main/reference/h_tmb_warn_non_deterministic.html index 149c3a5be..4d8e1ddbd 100644 --- a/main/reference/h_tmb_warn_non_deterministic.html +++ b/main/reference/h_tmb_warn_non_deterministic.html @@ -1,15 +1,31 @@ - -Warn if TMB is Configured to Use Non-Deterministic Hash for Tape Optimizer — h_tmb_warn_non_deterministic • mmrm + + + + + +Warn if TMB is Configured to Use Non-Deterministic Hash for Tape Optimizer — h_tmb_warn_non_deterministic • mmrm + + + + + + + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,17 +129,20 @@
    -

    Usage

    +

    Usage +

    h_tmb_warn_non_deterministic()
    -

    Value

    +

    Value +

    No return value, called for side effects.

    + +
    -
    - + + - + + diff --git a/main/reference/h_tr.html b/main/reference/h_tr.html index a600cdb99..5734d4313 100644 --- a/main/reference/h_tr.html +++ b/main/reference/h_tr.html @@ -1,11 +1,27 @@ - -Trace of a Matrix — h_tr • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_tr(x)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (matrix)
    square matrix input.

    -
    + +
    -

    Value

    +

    Value +

    The trace of the square matrix.

    + +
    -
    - + + - + + diff --git a/main/reference/h_valid_formula.html b/main/reference/h_valid_formula.html index 525761ea1..d5700b932 100644 --- a/main/reference/h_valid_formula.html +++ b/main/reference/h_valid_formula.html @@ -1,11 +1,27 @@ - -Validate mmrm Formula — h_valid_formula • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,26 +123,33 @@
    -

    Usage

    +

    Usage +

    h_valid_formula(formula)
    -

    Arguments

    +

    Arguments +

    -
    formula
    +
    +
    formula +

    (formula)
    to check.

    -
    + +
    -

    Details

    +

    Details +

    In mmrm models, . is not allowed as it introduces ambiguity of covariates to be used, so it is not allowed to be in formula.

    + + - + + - + + diff --git a/main/reference/h_var_adj.html b/main/reference/h_var_adj.html index c40b2954c..2d4b1a1ff 100644 --- a/main/reference/h_var_adj.html +++ b/main/reference/h_var_adj.html @@ -1,15 +1,31 @@ - -Obtain the Adjusted Covariance Matrix — h_var_adj • mmrm + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,45 +129,57 @@
    -

    Usage

    +

    Usage +

    h_var_adj(v, w, p, q, r, linear = FALSE)
    -

    Arguments

    +

    Arguments +

    -
    v
    +
    +
    v +

    (matrix)
    unadjusted covariance matrix.

    -
    w
    +
    w +

    (matrix)
    hessian matrix.

    -
    p
    +
    p +

    (matrix)
    P matrix from h_get_kr_comp().

    -
    q
    +
    q +

    (matrix)
    Q matrix from h_get_kr_comp().

    -
    r
    +
    r +

    (matrix)
    R matrix from h_get_kr_comp().

    -
    linear
    +
    linear +

    (flag)
    whether to use linear Kenward-Roger approximation.

    -
    + +
    -

    Value

    +

    Value +

    The matrix of adjusted covariance matrix.

    + +
    -
    - + + - + + diff --git a/main/reference/h_warn_na_action.html b/main/reference/h_warn_na_action.html index 043807787..9e1a8cf1e 100644 --- a/main/reference/h_warn_na_action.html +++ b/main/reference/h_warn_na_action.html @@ -1,11 +1,27 @@ - -Warn on na.action — h_warn_na_action • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,12 +123,14 @@
    -

    Usage

    +

    Usage +

    h_warn_na_action()
    - + + - + + - + + diff --git a/main/reference/h_within_or_between.html b/main/reference/h_within_or_between.html index 39e9307f6..916a722a1 100644 --- a/main/reference/h_within_or_between.html +++ b/main/reference/h_within_or_between.html @@ -1,13 +1,29 @@ - -Determine Within or Between for each Design Matrix Column — h_within_or_between • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,30 +126,38 @@
    -

    Usage

    +

    Usage +

    h_within_or_between(x_matrix, subject_ids)
    -

    Arguments

    +

    Arguments +

    -
    x_matrix
    +
    +
    x_matrix +

    (matrix)
    the design matrix with column names.

    -
    subject_ids
    +
    subject_ids +

    (factor)
    the subject IDs.

    -
    + +
    -

    Value

    +

    Value +

    Character vector with "intercept", "within" or "between" for each design matrix column identified via the names of the vector.

    + +
    -
    - + + - + + diff --git a/main/reference/index.html b/main/reference/index.html index 4825e139c..e25ac8284 100644 --- a/main/reference/index.html +++ b/main/reference/index.html @@ -1,11 +1,25 @@ - -Package index • mmrm + + + + + + + + + Skip to contents @@ -21,10 +35,12 @@ + + + + + @@ -91,217 +115,284 @@
    -

    Package

    +

    Package +

    -
    +
    +
    -
    +
    +
    mmrm-package
    -
    mmrm Package
    -
    -

    Functions

    +
    +mmrm Package
    + +
    +
    +

    Functions +

    -
    +
    +
    -
    +
    +
    mmrm() stable
    Fit an MMRM
    -
    +
    +
    +
    fit_mmrm() stable
    Low-Level Fitting Function for MMRM
    -
    +
    +
    +
    mmrm_control() stable
    Control Parameters for Fitting an MMRM
    -
    +
    +
    +
    fit_single_optimizer() stable
    Fitting an MMRM with Single Optimizer
    -
    +
    +
    +
    refit_multiple_optimizers() stable
    Refitting MMRM with Multiple Optimizers
    -
    +
    +
    +
    df_1d() stable
    Calculation of Degrees of Freedom for One-Dimensional Contrast
    -
    +
    +
    +
    df_md() stable
    Calculation of Degrees of Freedom for Multi-Dimensional Contrast
    -
    +
    +
    +
    component() stable
    Component Access for mmrm_tmb Objects
    -
    -

    Start Values

    + +
    +
    +

    Start Values +

    -
    +
    +
    -
    +
    +
    std_start()
    Standard Starting Value
    -
    +
    +
    +
    emp_start()
    Empirical Starting Value
    -
    -

    Methods

    + +
    +
    +

    Methods +

    -
    +
    +
    -

    Covariance Structures

    + +
    +
    +

    Covariance Structures +

    -
    +
    +
    -
    +
    +
    cov_struct() stable
    Define a Covariance Structure
    -
    +
    +
    +
    as.cov_struct() stable
    Coerce into a Covariance Structure Definition
    -
    +
    +
    +
    format(<cov_struct>)
    Format Covariance Structure Object
    -
    +
    +
    +
    print(<cov_struct>)
    Print a Covariance Structure Object
    -
    +
    +
    +
    cov_types() stable
    Covariance Types
    -
    -

    Estimate Marginal Means

    + +
    +
    +

    Estimate Marginal Means +

    -
    +
    +
    -
    +
    +
    emmeans_support stable
    -
    Support for emmeans
    -
    -

    Datasets

    +
    Support for emmeans +
    + +
    +
    +

    Datasets +

    -
    +
    +
    -
    +
    +
    fev_data stable
    Example Data on FEV1
    -
    +
    +
    +
    bcva_data stable
    Example Data on BCVA
    -
    + + + + - + + - + + diff --git a/main/reference/is_infix.html b/main/reference/is_infix.html index 7cbbddea4..e4610c8ca 100644 --- a/main/reference/is_infix.html +++ b/main/reference/is_infix.html @@ -1,11 +1,27 @@ - -Test Whether a Symbol is an Infix Operator — is_infix • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,30 +123,41 @@
    -

    Usage

    +

    Usage +

    is_infix(name)
    -

    Arguments

    +

    Arguments +

    -
    name
    +
    +
    name +

    (symbol or name or string)
    a possible reference to an infix operator to check.

    -
    + +
    -

    Value

    +

    Value +

    A logical indicating whether the name is the name of an infix operator.

    -

    is_infix(as.name("|"))
    +

    +
    +
    is_infix(as.name("|"))
     is_infix("|")
    -is_infix("c")

    +is_infix("c")
    +

    +
    + +
    -
    - + + - + + diff --git a/main/reference/mmrm-package.html b/main/reference/mmrm-package.html index a3d288ce0..41691f4bc 100644 --- a/main/reference/mmrm-package.html +++ b/main/reference/mmrm-package.html @@ -1,11 +1,27 @@ - -mmrm Package — mmrm-package • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + +
    @@ -98,15 +125,23 @@
    -

    See also

    -
    -

    Author

    +

    Author +

    Maintainer: Daniel Sabanes Bove daniel.sabanes_bove@rconis.com (ORCID)

    -

    Authors:

    + +
    + +
    -
    - + + - + + diff --git a/main/reference/mmrm.html b/main/reference/mmrm.html index 8fd85dc1a..5746894b7 100644 --- a/main/reference/mmrm.html +++ b/main/reference/mmrm.html @@ -1,13 +1,29 @@ - -Fit an MMRM — mmrm • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,7 +126,8 @@
    -

    Usage

    +

    Usage +

    mmrm(
       formula,
       data,
    @@ -113,49 +140,61 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    formula
    +
    +
    formula +

    (formula)
    the model formula, see details.

    -
    data
    +
    data +

    (data)
    the data to be used for the model.

    -
    weights
    +
    weights +

    (vector)
    an optional vector of weights to be used in the fitting process. Should be NULL or a numeric vector.

    -
    covariance
    +
    covariance +

    (cov_struct)
    a covariance structure type definition as produced with cov_struct(), or value that can be coerced to a covariance structure using as.cov_struct(). If no value is provided, a structure is derived from the provided formula.

    -
    reml
    +
    reml +

    (flag)
    whether restricted maximum likelihood (REML) estimation is used, otherwise maximum likelihood (ML) is used.

    -
    control
    +
    control +

    (mmrm_control)
    fine-grained fitting specifications list created with mmrm_control().

    -
    ...
    +
    ... +

    arguments passed to mmrm_control().

    -
    + +
    -

    Value

    +

    Value +

    An mmrm object.

    -

    Details

    +

    Details +

    The formula typically looks like: FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID) so specifies response and covariates as usual, and exactly one special term @@ -181,15 +220,19 @@

    Detailsmmrm.

    -

    Note

    +

    Note +

    The mmrm object is also an mmrm_fit and an mmrm_tmb object, therefore corresponding methods also work (see mmrm_tmb_methods).

    -

    Additional contents depend on the choice of the adjustment method:

    • If Satterthwaite adjustment is used, the Jacobian information jac_list +

      Additional contents depend on the choice of the adjustment method:

      +
        +
      • If Satterthwaite adjustment is used, the Jacobian information jac_list is included.

      • If Kenward-Roger adjustment is used, kr_comp contains necessary components and beta_vcov_adj includes the adjusted coefficients covariance matrix.

      • -

      Use of the package emmeans is supported, see emmeans_support.

      +
    +

    Use of the package emmeans is supported, see emmeans_support.

    NA values are always omitted regardless of na.action setting.

    When the number of visit levels is large, it usually requires large memory to create the covariance matrix. By default, the maximum allowed visit levels is 100, and if there are more @@ -200,7 +243,8 @@

    Note

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -224,7 +268,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/mmrm_control.html b/main/reference/mmrm_control.html index ae9acf088..10358a71b 100644 --- a/main/reference/mmrm_control.html +++ b/main/reference/mmrm_control.html @@ -1,15 +1,31 @@ - -Control Parameters for Fitting an MMRM — mmrm_control • mmrm + + + + + +Control Parameters for Fitting an MMRM — mmrm_control • mmrm + + + + + + + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,7 +129,8 @@
    -

    Usage

    +

    Usage +

    mmrm_control(
       n_cores = 1L,
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within"),
    @@ -117,50 +144,63 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    n_cores
    +
    +
    n_cores +

    (count)
    number of cores to be used.

    -
    method
    +
    method +

    (string)
    adjustment method for degrees of freedom.

    -
    vcov
    +
    vcov +

    (string)
    coefficients covariance matrix adjustment method.

    -
    start
    +
    start +

    (NULL, numeric or function)
    optional start values for variance parameters. See details for more information.

    -
    accept_singular
    +
    accept_singular +

    (flag)
    whether singular design matrices are reduced to full rank automatically and additional coefficient estimates will be missing.

    -
    drop_visit_levels
    +
    drop_visit_levels +

    (flag)
    whether to drop levels for visit variable, if visit variable is a factor, see details.

    -
    ...
    +
    ... +

    additional arguments passed to h_get_optimizers().

    -
    optimizers
    +
    optimizers +

    (list)
    optimizer specification, created with h_get_optimizers().

    -
    + +
    -

    Value

    +

    Value +

    List of class mmrm_control with the control parameters.

    -

    Details

    +

    Details +

    For example, if the data only has observations at visits VIS1, VIS3 and VIS4, by default they are treated to be equally spaced, the distance from VIS1 to VIS3, and from VIS3 to VIS4, are identical. However, you can manually convert this visit into a factor, with @@ -168,14 +208,45 @@

    DetailsVIS1 to VIS3 will be double, as VIS2 is a valid visit. However, please be cautious because this can lead to convergence failure when using an unstructured covariance matrix and there are no observations -at the missing visits.

    + +
    -

    Examples

    +

    Examples +

    mmrm_control(
       optimizer_fun = stats::optim,
       optimizer_args = list(method = "L-BFGS-B")
    @@ -311,7 +384,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/mmrm_methods.html b/main/reference/mmrm_methods.html index e439113dd..935395906 100644 --- a/main/reference/mmrm_methods.html +++ b/main/reference/mmrm_methods.html @@ -1,11 +1,27 @@ - -Methods for mmrm Objects — mmrm_methods • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for class 'mmrm'
     summary(object, ...)
     
    @@ -114,52 +141,71 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the fitted MMRM including Jacobian and call etc.

    -
    ...
    +
    ... +

    not used.

    -
    + +
    -

    Value

    +

    Value +

    Depends on the method, see Details and Functions.

    -

    Details

    -

    While printing the summary of (mmrm)
    object, the following will be displayed:

    1. Formula. The formula used in the model.

    2. +

      Details +

      +

      While printing the summary of (mmrm)
      object, the following will be displayed:

      +
        +
      1. Formula. The formula used in the model.

      2. Data. The data used for analysis, including number of subjects, number of valid observations.

      3. Covariance. The covariance structure and number of variance parameters.

      4. Method. Restricted maximum likelihood(REML) or maximum likelihood(ML).

      5. Model selection criteria. AIC, BIC, log likelihood and deviance.

      6. Coefficients. Coefficients of the covariates.

      7. -
      8. Covariance estimate. The covariance estimate(for each group).

        1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available +

        2. +

          Covariance estimate. The covariance estimate(for each group).

          +
            +
          1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available in data will be displayed.

          2. If the covariance structure is spatial, the covariance matrix of two time points with unit distance will be displayed.

          3. -
        3. -

        confint is used to obtain the confidence intervals for the coefficients. +

      + +
    +

    confint is used to obtain the confidence intervals for the coefficients. Please note that this is different from the confidence interval of difference of least square means from emmeans.

    -

    Functions

    +

    Functions +

    -
    • summary(mmrm): summarizes the MMRM fit results.

    • +
        +
      • summary(mmrm): summarizes the MMRM fit results.

      • print(summary.mmrm): prints the MMRM fit summary.

      • confint(mmrm): obtain the confidence intervals for the coefficients.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_tmb_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- mmrm(formula, fev_data)
     # Summary:
    @@ -230,7 +276,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/mmrm_tidiers.html b/main/reference/mmrm_tidiers.html index e70a555f1..e90d60c3f 100644 --- a/main/reference/mmrm_tidiers.html +++ b/main/reference/mmrm_tidiers.html @@ -1,15 +1,31 @@ - -Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm + + + + + +Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm + + + + + + + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,7 +129,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for class 'mmrm'
     tidy(x, conf.int = FALSE, conf.level = 0.95, ...)
     
    @@ -122,56 +149,72 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (mmrm)
    fitted model.

    -
    conf.int
    +
    conf.int +

    (flag)
    if TRUE columns for the lower (conf.low) and upper bounds (conf.high) of coefficient estimates are included.

    -
    conf.level
    +
    conf.level +

    (number)
    defines the range of the optional confidence internal.

    -
    ...
    +
    ... +

    only used by augment() to pass arguments to the predict.mmrm_tmb() method.

    -
    newdata
    +
    newdata +

    (data.frame or NULL)
    optional new data frame.

    -
    interval
    +
    interval +

    (string)
    type of interval calculation.

    -
    se_fit
    +
    se_fit +

    (flag)
    whether to return standard errors of fit.

    -
    type.residuals
    +
    type.residuals +

    (string)
    passed on to residuals.mmrm_tmb().

    -
    + +
    -

    Functions

    +

    Functions +

    -
    • tidy(mmrm): derives tidy tibble from an mmrm object.

    • +
        +
      • tidy(mmrm): derives tidy tibble from an mmrm object.

      • glance(mmrm): derives glance tibble from an mmrm object.

      • augment(mmrm): derives augment tibble from an mmrm object.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tmb_methods for additional methods.

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -263,7 +306,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/mmrm_tmb_methods.html b/main/reference/mmrm_tmb_methods.html index a729fbb28..d8dd445ad 100644 --- a/main/reference/mmrm_tmb_methods.html +++ b/main/reference/mmrm_tmb_methods.html @@ -1,11 +1,27 @@ - -Methods for mmrm_tmb Objects — mmrm_tmb_methods • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for class 'mmrm_tmb'
     coef(object, complete = TRUE, ...)
     
    @@ -171,110 +198,137 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm_tmb)
    the fitted MMRM object.

    -
    complete
    +
    complete +

    (flag)
    whether to include potential non-estimable coefficients.

    -
    ...
    +
    ... +

    mostly not used; Exception is model.matrix() passing ... to the default method.

    -
    newdata
    +
    newdata +

    (data.frame)
    optional new data, otherwise data from object is used.

    -
    se.fit
    +
    se.fit +

    (flag)
    indicator if standard errors are required.

    -
    interval
    +
    interval +

    (string)
    type of interval calculation. Can be abbreviated.

    -
    level
    +
    level +

    (number)
    tolerance/confidence level.

    -
    nsim
    +
    nsim +

    (count)
    number of simulations to use.

    -
    conditional
    +
    conditional +

    (flag)
    indicator if the prediction is conditional on the observation or not.

    -
    formula
    +
    formula +

    (mmrm_tmb)
    same as object.

    -
    data
    +
    data +

    (data.frame)
    object in which to construct the frame.

    -
    include
    +
    include +

    (character)
    names of variable types to include. Must be NULL or one or more of c("subject_var", "visit_var", "group_var", "response_var").

    -
    full
    +
    full +

    (flag)
    indicator whether to return full model frame (deprecated).

    -
    na.action
    +
    na.action +

    (string)
    na action.

    -
    use_response
    +
    use_response +

    (flag)
    whether to use the response for complete rows.

    -
    x
    +
    x +

    (mmrm_tmb)
    same as object.

    -
    sigma
    +
    sigma +

    cannot be used (this parameter does not exist in MMRM).

    -
    corrected
    +
    corrected +

    (flag)
    whether corrected AIC should be calculated.

    -
    k
    +
    k +

    (number)
    the penalty per parameter to be used; default k = 2 is the classical AIC.

    -
    type
    +
    type +

    (string)
    unscaled (response), pearson or normalized. Default is response, and this is the only type available for use with models with a spatial covariance structure.

    -
    seed
    +
    seed +

    unused argument from stats::simulate().

    -
    method
    +
    method +

    (string)
    simulation method to use. If "conditional", simulated values are sampled given the estimated covariance matrix of object. If "marginal", the variance of the estimated covariance matrix is taken into account.

    -
    + +
    -

    Value

    +

    Value +

    Depends on the method, see Functions.

    -

    Details

    +

    Details +

    include argument controls the variables the returned model frame will include. Possible options are "response_var", "subject_var", "visit_var" and "group_var", representing the response variable, subject variable, visit variable or group variable. @@ -282,9 +336,11 @@

    Detailsmodel.matrix.

    -

    Functions

    +

    Functions +

    -
    • coef(mmrm_tmb): obtains the estimated coefficients.

    • +
        +
      • coef(mmrm_tmb): obtains the estimated coefficients.

      • fitted(mmrm_tmb): obtains the fitted values.

      • predict(mmrm_tmb): predict conditional means for new data; optionally with standard errors and confidence or prediction intervals. @@ -317,21 +373,29 @@

        Functions -

        References

        +

        References +

        -
        • hurvich1989regressionmmrm

        • +
            +
          • hurvich1989regressionmmrm

          • burnham1998practicalmmrm

          • -
          • galecki2013linearmmrm

          • -
    + +
      +
    • galecki2013linearmmrm

    • +
    +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- fit_mmrm(formula, fev_data, weights = rep(1, nrow(fev_data)))
     # Estimated coefficients:
    @@ -3870,7 +3934,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/parsnip_add_mmrm.html b/main/reference/parsnip_add_mmrm.html index e11330eac..2726e6b54 100644 --- a/main/reference/parsnip_add_mmrm.html +++ b/main/reference/parsnip_add_mmrm.html @@ -1,11 +1,27 @@ - -Register mmrm For Use With tidymodels — parsnip_add_mmrm • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + +
    @@ -97,30 +124,38 @@
    -

    Usage

    +

    Usage +

    parsnip_add_mmrm(quietly = FALSE)
    -

    Arguments

    +

    Arguments +

    -
    quietly
    +
    +
    quietly +

    logical: should progress and error messages be suppressed?

    -
    + +
    -

    Value

    +

    Value +

    A logical value indicating whether registration was successful.

    -

    Details

    +

    Details +

    We can use parsnip::show_model_info("linear_reg") to check the registration with parsnip and thus the wider tidymodels ecosystem.

    + + - + + - + + diff --git a/main/reference/position_symbol.html b/main/reference/position_symbol.html index 1f6a17b1a..6217dc645 100644 --- a/main/reference/position_symbol.html +++ b/main/reference/position_symbol.html @@ -1,15 +1,31 @@ - -Search For the Position of a Symbol — position_symbol • mmrm + + + + + +Search For the Position of a Symbol — position_symbol • mmrm + + + + + + + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,36 +129,45 @@
    -

    Usage

    +

    Usage +

    position_symbol(x, sym, ...)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (list of language)
    a list of language objects in which to search for a specific symbol.

    -
    sym
    +
    sym +

    (name or symbol or character)
    a symbol to search for in x.

    -
    ...
    +
    ... +

    Additional arguments passed to Position().

    -
    + +
    -

    Value

    +

    Value +

    The position of the symbol if found, or the nomatch value otherwise.

    + +
    -
    - + + - + + diff --git a/main/reference/print.cov_struct.html b/main/reference/print.cov_struct.html index 9fa284549..757d8455d 100644 --- a/main/reference/print.cov_struct.html +++ b/main/reference/print.cov_struct.html @@ -1,11 +1,27 @@ - -Print a Covariance Structure Object — print.cov_struct • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,30 +123,38 @@
    -

    Usage

    +

    Usage +

    # S3 method for class 'cov_struct'
     print(x, ...)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (cov_struct)
    a covariance structure object.

    -
    ...
    +
    ... +

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    x invisibly.

    + +
    -
    - + + - + + diff --git a/main/reference/reexports.html b/main/reference/reexports.html index 86f8856b2..56ae12247 100644 --- a/main/reference/reexports.html +++ b/main/reference/reexports.html @@ -1,25 +1,41 @@ - -Objects exported from other packages — reexports • mmrm + + + + + +Objects exported from other packages — reexports • mmrm + + + + + + + + + + Skip to contents @@ -35,10 +51,12 @@ + + + + + @@ -109,15 +135,18 @@

    These objects are imported from other packages. Follow the links below to see their documentation.

    -
    generics
    +
    +
    generics

    augment, glance, tidy

    -
    + + - + +
    -
    - + + - + + diff --git a/main/reference/refit_multiple_optimizers.html b/main/reference/refit_multiple_optimizers.html index 419475c40..2ec6b42a9 100644 --- a/main/reference/refit_multiple_optimizers.html +++ b/main/reference/refit_multiple_optimizers.html @@ -1,11 +1,27 @@ - -Refitting MMRM with Multiple Optimizers — refit_multiple_optimizers • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,37 +123,47 @@
    -

    Usage

    +

    Usage +

    refit_multiple_optimizers(fit, ..., control = mmrm_control(...))
    -

    Arguments

    +

    Arguments +

    -
    fit
    +
    +
    fit +

    (mmrm_fit)
    original model fit from fit_single_optimizer().

    -
    ...
    +
    ... +

    Additional arguments passed to mmrm_control().

    -
    control
    +
    control +

    (mmrm_control)
    object.

    -
    + +
    -

    Value

    +

    Value +

    The best (in terms of log likelihood) fit which converged.

    -

    Note

    +

    Note +

    For Windows, no parallel computations are currently implemented.

    -

    Examples

    +

    Examples +

    fit <- fit_single_optimizer(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data,
    @@ -138,7 +174,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/main/reference/register_on_load.html b/main/reference/register_on_load.html index 85f3c6a63..a186fd92a 100644 --- a/main/reference/register_on_load.html +++ b/main/reference/register_on_load.html @@ -1,11 +1,27 @@ - -Helper Function for Registering Functionality With Suggests Packages — register_on_load • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    register_on_load(
       pkg,
       ver = c(NA_character_, NA_character_),
    @@ -107,39 +134,48 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    pkg
    +
    +
    pkg +

    (string)
    package name.

    -
    ver
    +
    ver +

    (character)
    of length 2 whose elements can be provided to numeric_version(), representing a minimum and maximum (inclusive) version requirement for interoperability. When NA, no version requirement is imposed. Defaults to no version requirement.

    -
    callback
    +
    callback +

    (function(...) ANY)
    a callback to execute upon package load. Note that no arguments are passed to this function. Any necessary data must be provided upon construction.

    -
    message
    +
    message +

    (NULL or string)
    an optional message to print after the callback is executed upon successful registration.

    -
    + +
    -

    Value

    +

    Value +

    A logical (invisibly) indicating whether registration was successful. If not, a onLoad hook was set for the next time the package is loaded.

    + +
    -
    - + + - + + diff --git a/main/reference/std_start.html b/main/reference/std_start.html index c7e2538bf..d350908a8 100644 --- a/main/reference/std_start.html +++ b/main/reference/std_start.html @@ -1,11 +1,27 @@ - -Standard Starting Value — std_start • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,36 +123,46 @@
    -

    Usage

    +

    Usage +

    std_start(cov_type, n_visits, n_groups, ...)
    -

    Arguments

    +

    Arguments +

    -
    cov_type
    +
    +
    cov_type +

    (string)
    name of the covariance structure.

    -
    n_visits
    +
    n_visits +

    (int)
    number of visits.

    -
    n_groups
    +
    n_groups +

    (int)
    number of groups.

    -
    ...
    +
    ... +

    not used.

    -
    + +
    -

    Value

    +

    Value +

    A numeric vector of starting values.

    -

    Details

    +

    Details +

    std_start will try to provide variance parameter from identity matrix. However, for ar1 and ar1h the corresponding values are not ideal because the \(\rho\) is usually a positive number thus using 0 as starting value can lead to @@ -134,7 +170,8 @@

    Details

    + + - + + - + + diff --git a/main/reference/tmb_cov_type.html b/main/reference/tmb_cov_type.html index 12769de1d..d81a48dd7 100644 --- a/main/reference/tmb_cov_type.html +++ b/main/reference/tmb_cov_type.html @@ -1,11 +1,27 @@ - -Produce A Covariance Identifier Passing to TMB — tmb_cov_type • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    tmb_cov_type(cov)
    -

    Arguments

    +

    Arguments +

    -
    cov
    +
    +
    cov +

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    A string used for method dispatch when passed to TMB.

    + +
    -
    - + + - + + diff --git a/main/reference/validate_cov_struct.html b/main/reference/validate_cov_struct.html index 1f0d24c5b..bb8512aee 100644 --- a/main/reference/validate_cov_struct.html +++ b/main/reference/validate_cov_struct.html @@ -1,11 +1,27 @@ - -Validate Covariance Structure Data — validate_cov_struct • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    validate_cov_struct(x)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    x if successful, or an error is thrown otherwise.

    + +
    -
    - + + - + + diff --git a/v0.2.2/404.html b/v0.2.2/404.html index 925b96cea..5bd04a9e7 100644 --- a/v0.2.2/404.html +++ b/v0.2.2/404.html @@ -1,5 +1,4 @@ - - + @@ -64,11 +63,10 @@ Changelog +v0.2.2 + + + + - + @@ -86,46 +112,66 @@

    Thank you for your interest in contributing to this repo! Your contribution is highly valued. Please go through this document for guidance on how to contribute.

    -

    Programming conventions

    +

    Programming conventions +

    Please follow the programming conventions to ensure a consistent programming style across the package.

    Generally we follow the tidyverse style guide. Some specific conventions that deviate from this are explained below.

    -

    Functions

    -
    1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
    2. +

      Functions +

      +
        +
      1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
      2. Functions starting with h_ are helper functions and they should not be exported.
      3. Functions should be well documented using roxygen2 (even when they are not exported).
      4. Functions must be unit tested (even when they are not exported).
      5. -
    + +
    -

    Imports

    +

    Imports +

    In package mmrm, we follow the following convention in package imports.

    -
    1. When only a few functions from another package are needed: -
      1. In DESCRIPTION, add that package into Imports.
      2. +
          +
        1. When only a few functions from another package are needed: +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we add a importFrom with a single function from the package. -
            1. The function imported can be any random function within the package.
            2. -
          3. +
              +
            1. The function imported can be any random function within the package.
            2. +
            +
          4. Always use package::function style wherever you need to use the function.
          5. Example: stats.
          6. -
        2. +
        +
      3. When many functions from another package are needed: -
        1. In DESCRIPTION, add that package into Imports.
        2. +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we use a import to import every function.
          3. Use the functions directly without prefix.
          4. Example: checkmate.
          5. -
          -
    + + + +
    -

    Comments

    -
    • Comments should always follow sentence style.
    • +

      Comments +

      +
        +
      • Comments should always follow sentence style.
      • Comments should be as minimal as possible: Generally the code and variable names should be clear enough to not need any comments. Only use them when needed and explain the “Why” and not the “What”.
      • -
    + +
    -

    Documentation

    -
    • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

    • +

      Documentation +

      +
        +
      • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

      • Exported objects must have a lifecycle badge to clarify the maturity.

        -
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • -
      • +
          +
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • +
        +
      • Use Title Style for the title of the documentation.

      • Always include a @description part with at least one sentence describing the object.

      • @@ -136,38 +182,55 @@

        Documentationwebsite.

      • In vignettes, you cannot directly reference help pages but only pkgdown web pages. Note that this includes only exported objects. To make it look similar to the help page references, please here also use function() style.

      • -
    + +
    -

    Github conventions

    +

    Github conventions +

    When using github to collaborate, the following conventions are needed:

    -
    1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. -
      • If you are going to work on this issue, please assign yourself.
      • -
    2. +
        +
      1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. +
          +
        • If you are going to work on this issue, please assign yourself.
        • +
        +
      2. Please create a branch in the mmrm repository, instead of creating forks, unless you are not yet a team member. -
        • Branches should be associated with a GitHub issue and linked to an issue id.
        • +
            +
          • Branches should be associated with a GitHub issue and linked to an issue id.
          • The name of a branch should be of the form: <issue_id>_<short_discription>.
          • -
          +
        +
      3. Add changes to the branch and push it to github. -
        • Please use clear commit messages.
        • +
            +
          • Please use clear commit messages.
          • Please keep your changes focused on the issue. If there are independent changes, please separate it into another PR linking to another issue.
          • -
          +
        +
      4. Please create a Pull Request when you think your code changes are ready: -
        • Functions are well documented.
        • +
            +
          • Functions are well documented.
          • Functions have corresponding unit tests.
          • Changes pass all the github action checks.
          • The checklist in the corresponding issue is completed.
          • -
          +
        +
      5. Address all the comments you receive. -
        • at least one approval is needed to merge.
        • -
      6. -
    +
      +
    • at least one approval is needed to merge.
    • +
    + + +
    -

    Contribution tips

    +

    Contribution tips +

    -

    Development environment Set-up

    +

    Development environment Set-up +

    The development this mmrm package is based on the latest R version and C++ compilers. The package dependencies are the most recent versions from CRAN. We recommend that your working environment is set up in the same way. Additionally, there are some tools we recommend you to install:

    -
    1. +
        +
      1. RTools if you work on a Windows operating system. Alternatively you can use docker to separate the operating system and the development system.
      2. GitKraken is a very useful user interface for git including visualization of git commit graphs, file history, etc.
      3. @@ -175,43 +238,82 @@

        Development environment Set-uplintr will allow you to perform static code analysis.
      4. pre-commit is a Python module that allows you to identify issues before you commit locally.
      5. -

    + +
    -

    Issue labels

    +

    Issue labels +

    The issues are categorized with several labels:

    - +
    Label name
    ++++ + + - + + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + -
    Label name Description
    SPx
    SPx SP (story points) indicate complexity, and the larger the subsequent number, the more time consuming the issue is expected to be
    priority
    priority Issues with this label should be completed with higher priority
    good first issue
    good first issue Good choices for new team members
    blocked
    blocked Blocked by other issues
    bug
    bug Something isn’t working
    devops
    devops Development and Operation
    discussion
    discussion Discussion needed
    documentation
    documentation Improvement of documentation is needed
    duplicate
    duplicate The issue already exists
    enhancement
    enhancement New feature or request
    help wanted
    help wanted Extra attention is needed
    invalid
    invalid This doesn’t seem right
    question
    question Further information needed

    Please choose an issue based on your interest, issue complexity, and priority.

    + + + +

    Please choose an issue based on your interest, issue complexity, and priority.

    -

    Add new unit tests

    +

    Add new unit tests +

    To add a new unit test, you need to first identify the test scope. Does the test fit in the scope of existing tests? If so, please modify the existing test files under tests/testthat/ folder or src/ folder, depending on whether the code to be tested is R or C++. Otherwise please create a new test file, with a name prefix of “test-”.

    In each test case, use the following structure:

    @@ -224,19 +326,25 @@ 

    Add new unit tests -

    Add integration tests

    +

    Add integration tests +

    Integration tests compare the results of SAS and R and assures the quality of our code. To add an integration test, you need to do the following:

    -
    1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
    2. +
        +
      1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
      2. Save the results in .txt format in the design/SAS/ folder.
      3. Decide the key outputs that are needed for comparison.
      4. Add a unit test verifying that the R implementation of the same model has the same results (conversion may be needed).
      5. -
    + +
    -

    Get started with C++

    +

    Get started with C++ +

    If you have no experience with C++, it is totally fine: TMB has provided us with many high-level functionalities that is very similar to R. Here we only list the most important things that you need to go through before you begin C++ programming.

    -
    1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
    2. +
        +
      1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
      2. Types. C++ is a strong type programming language and all objects need to be declared with type. Sometimes you can combine the declaration and definition. -
        1. +
            +
          1. int i = 1; This works, as we declare i as int and define it to be 1.
          2. i = 1; This fails, because i is not declared yet.
          3. @@ -244,53 +352,70 @@

            Get started with C++
          4. in R, if (TRUE) { a = '123' }; print(a) is legal.
          5. +
              +
            1. in R, if (TRUE) { a = '123' }; print(a) is legal.
            2. in C++, if (1) {string a = '123'}; std::stdout << a << std::endl; is illegal, because object a is terminated already.
            3. in C++, string a; if (1) {a = '123'}; std::stdout << a << std::endl; is legal, a is declared prior to if statement.
            4. -
            +

          +
        2. Polymorphism. Unlike in R, where function arguments have no explicitly defined types, in C++ the type of each argument of a function must be pre-specified. -
          1. +
              +
            1. Template is a special function that works with generic argument type. We could imagine a single function that could work on arguments of arbitrary type, and template functions make this possible through separation of function logic from the argument declaration. In this way we can use template functions and avoid the need to replicate the whole code for each type.
            2. -
          2. -

          With these points in mind, you are about ready to go.

          +
        +
      3. +
      +

      With these points in mind, you are about ready to go.

    -

    Get started with TMB

    +

    Get started with TMB +

    In mmrm we are not including any latent variables and so the Laplace approximation aspect of TMB is not used. We only use the automatic differentiation part of TMB. For detailed documentation of TMB, visit the TMB reference.

    One important feature of TMB are the R style matrix/array calculations. This is important because we mainly use this part to conduct our calculations. See matrix_arrays.cpp for examples.

    -

    Add a new covariance structure

    +

    Add a new covariance structure +

    To add a new covariance structure, you need to do the following:

    -
    1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
    2. +
        +
      1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
      2. Implement the covariance structure on the C++ side and the corresponding R interface.
      3. Add unit tests to make sure the new covariance structure is working as expected.
      4. Add integration tests under design/SAS/ folder to make sure SAS and R produce similar results (within tolerance).
      5. -
    + +
    -

    Add additional data

    +

    Add additional data +

    To add additional data to mmrm, please follow the next steps:

    -
    1. Make sure the data is needed.
    2. +
        +
      1. Make sure the data is needed.
      2. Document the data in R/data.R.
      3. Use save to create an rda data only containing this dataset. Here the function usethis::use_data can also be helpful.
      4. -
    + +
    -

    Communications within team

    +

    Communications within team +

    There are several communication channels, please use appropriate ones.

    -

    GitHub

    +

    GitHub +

    GitHub issues and pull requests are where implementations are discussed and reviewed. Feature requests, bugs, enhancements, technical implementations can be discussed here. When you have ideas that needs to be documented, it is better to have them in github.

    -

    Slack

    +

    Slack +

    Slack is a messaging tool and we have the mmrm channel under the rinpharma space. You can put anything in the slack channel, e.g., you have completed a issue and are waiting for review, or you have some questions and don’t want to wait until the next stand-up meeting.

    To join the slack channel, please make sure you have a slack account, and send the email address to any team member.

    -

    Stand-up meetings

    +

    Stand-up meetings +

    We have stand-up meetings currently three times a week. The purpose of stand-up meetings is for team members to discuss the current work progress and raise any issue/questions for team discussion if needed.

    You don’t need to join all three meetings.

    @@ -298,22 +423,26 @@

    Stand-up meetings

    + + + + - - + + diff --git a/v0.2.2/PULL_REQUEST_TEMPLATE.html b/v0.2.2/PULL_REQUEST_TEMPLATE.html index d0a0666b3..46f957228 100644 --- a/v0.2.2/PULL_REQUEST_TEMPLATE.html +++ b/v0.2.2/PULL_REQUEST_TEMPLATE.html @@ -1,5 +1,23 @@ - -Description • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +44,8 @@ + - + + - + @@ -87,22 +113,26 @@ - + +
    -
    + + - - + + diff --git a/v0.2.2/articles/algorithm.html b/v0.2.2/articles/algorithm.html index 586ce3166..a5acadc17 100644 --- a/v0.2.2/articles/algorithm.html +++ b/v0.2.2/articles/algorithm.html @@ -1,5 +1,4 @@ - - + @@ -66,11 +65,10 @@ Changelog +v0.2.2 + + + + - + @@ -85,35 +111,47 @@

    All vignettes

    -
    Details of the Model Fitting in `mmrm`
    +
    +
    Details of the Model Fitting in `mmrm`
    -
    Covariance Structures in `mmrm`
    + +
    Covariance Structures in `mmrm`
    -
    Introduction to `mmrm`
    + +
    Introduction to `mmrm`
    -
    Details of the Kenward-Roger calculations
    + +
    Details of the Kenward-Roger calculations
    -
    Package Structure
    + +
    Package Structure
    -
    Details of the Satterthwaite calculations
    + +
    Details of the Satterthwaite calculations
    -
    - + +
    + + +
    -
    + + - - + + diff --git a/v0.2.2/articles/introduction.html b/v0.2.2/articles/introduction.html index 5cd4eccef..3b93210b5 100644 --- a/v0.2.2/articles/introduction.html +++ b/v0.2.2/articles/introduction.html @@ -1,5 +1,4 @@ - - + @@ -66,11 +65,10 @@ Changelog +v0.2.2 + + + + - + @@ -84,7 +110,8 @@

    Authors

    -
    • +
        +
      • Daniel Sabanes Bove. Author, maintainer.

      • @@ -132,7 +159,8 @@

        Authors

        Merck Sharp & Dohme, Inc.. Copyright holder, funder.

        -
    + +

    Citation

    @@ -151,22 +179,26 @@

    Citation

    }
    + +
    -
    + + - - + + diff --git a/v0.2.2/index.html b/v0.2.2/index.html index 3229e797d..346d7fd05 100644 --- a/v0.2.2/index.html +++ b/v0.2.2/index.html @@ -1,5 +1,4 @@ - - + @@ -90,11 +89,10 @@ Changelog +v0.2.2 + + + + - + @@ -83,56 +109,77 @@
    -

    mmrm 0.2.2

    +

    mmrm 0.2.2 +

    -

    New Features

    -
    • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
    • +

      New Features +

      +
        +
      • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
      • Update the mmrm arguments to allow users more fine-grained control, e.g. mmrm(..., start = start, optimizer = c("BFGS", "nlminb")) to set the starting values for the variance estimates and to choose the available optimizers. These arguments will be passed to the new function mmrm_control.
      • Add new argument drop_visit_levels to allow users to keep all levels in visits, even when they are not observed in the data. Dropping unobserved levels was done silently previously, and now a message will be given. See ?mmrm_control for more details.
      • -
    + +
    -

    Bug Fixes

    -
    • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
    • +

      Bug Fixes +

      +
        +
      • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
      • Previously in mmrm calls, the weights object in the environment where the formula is defined was replaced by the weights used internally. Now this behavior is removed and your variable weights e.g. in the global environment will no longer be replaced.
      • -
    + +
    -

    Miscellaneous

    -
    • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
    • +

      Miscellaneous +

      +
        +
      • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
      • Deprecated optimizer = "automatic" in favor of not specifying the optimizer. By default, all remaining optimizers will be tried if the first optimizer fails to reach convergence.
      • -
    + +
    -

    mmrm 0.1.5

    CRAN release: 2022-10-18

    -
    • First CRAN version of the package.
    • +

      mmrm 0.1.5 +

      +

      CRAN release: 2022-10-18

      +
        +
      • First CRAN version of the package.
      • The package fits mixed models for repeated measures (MMRM) based on the marginal linear model without random effects.
      • The motivation for this package is to have a fast, reliable (in terms of convergence behavior) and feature complete implementation of MMRM in R.
      • -
      -

      New Features

      -
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • +
      +
      +

      New Features +

      +
        +
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • Fast C++ implementation of Maximum Likelihood (ML) and Restricted Maximum Likelihood (REML) estimation.
      • Currently Satterthwaite adjusted degrees of freedom calculation is supported.
      • Interface to the emmeans package for computing estimated marginal means (also called least-square means) for the coefficients.
      • Multiple optimizers are run to reach convergence in as many cases as possible.
      • Flexible formula based model specification and support for standard S3 methods such as summary, logLik, etc.
      • -
      +
    +
    + +
    -
    + + - - + + diff --git a/v0.2.2/reference/component.html b/v0.2.2/reference/component.html index 8a8071d47..a5be94df4 100644 --- a/v0.2.2/reference/component.html +++ b/v0.2.2/reference/component.html @@ -1,5 +1,25 @@ - -Component Access for mmrm_tmb Objects — component • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -88,7 +116,8 @@
    -

    Usage

    +

    Usage +

    component(
       object,
       name = c("cov_type", "n_theta", "n_subjects", "n_timepoints", "n_obs", "beta_vcov",
    @@ -100,24 +129,31 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    name

    (character)
    the component(s) to be retrieved.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding component of the object, see details.

    -

    Details

    -

    Available component() names are as follows:

    + +
    -

    See also

    +

    See also +

    In the lme4 package there is a similar function getME().

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -2512,22 +2551,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.2.2/reference/covariance_types.html b/v0.2.2/reference/covariance_types.html index c1555bb18..d9f6893b6 100644 --- a/v0.2.2/reference/covariance_types.html +++ b/v0.2.2/reference/covariance_types.html @@ -1,5 +1,25 @@ - -covariance type — covariance_types • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -88,55 +116,144 @@
    -

    Usage

    +

    Usage +

    cov_type
     
     cov_type_spatial
    -

    Format

    +

    Format +

    vector of supported covariance structures. cov_type for common time points covariance structures, cov_type_spatial for spatial covariance structures.

    -

    Details

    -

    abbreviation for covariance structures

    -

    Common Covariance Structures

    -
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, respectively, out of total \(m\) time points, \(1 \leq i, j \leq m\).

    +

    Details +

    +

    abbreviation for covariance structures

    +
    +

    Common Covariance Structures +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)
    +

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, respectively, out of total \(m\) time points, \(1 \leq i, j \leq m\).

    Note the ante-dependence covariance structure in this package refers to homogeneous ante-dependence, while the ante-dependence covariance structure from SAS PROC MIXED refers to heterogeneous ante-dependence and the homogeneous version is not available in SAS.

    -

    Spatial Covariance structures

    -
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)

    where \(d_{ij}\) denotes the Euclidean distance between time points \(i\) and \(j\).

    +

    Spatial Covariance structures +

    + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)
    +

    where \(d_{ij}\) denotes the Euclidean distance between time points \(i\) and \(j\).

    -

    Functions

    +

    Functions +

    -
    • cov_type: non-spatial covariance structure

    • +
        +
      • cov_type: non-spatial covariance structure

      • cov_type_spatial: spatial covariance structure

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.2.2/reference/df_1d.html b/v0.2.2/reference/df_1d.html index fa24ade6b..c9baf3a14 100644 --- a/v0.2.2/reference/df_1d.html +++ b/v0.2.2/reference/df_1d.html @@ -1,9 +1,29 @@ - - + + + + + +Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm +Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -94,13 +122,16 @@
    -

    Usage

    +

    Usage +

    df_1d(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -109,16 +140,19 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -144,22 +178,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.2.2/reference/df_md.html b/v0.2.2/reference/df_md.html index 9ab93eee7..5edffe77a 100644 --- a/v0.2.2/reference/df_md.html +++ b/v0.2.2/reference/df_md.html @@ -1,11 +1,31 @@ - - + + + + + +Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm +Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -97,13 +125,16 @@
    -

    Usage

    +

    Usage +

    df_md(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -113,16 +144,19 @@

    Arguments -

    Value

    +

    Value +

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

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -145,22 +179,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.2.2/reference/emmeans_support.html b/v0.2.2/reference/emmeans_support.html index 9326d703d..6b83fd92c 100644 --- a/v0.2.2/reference/emmeans_support.html +++ b/v0.2.2/reference/emmeans_support.html @@ -1,11 +1,31 @@ - - + + + + + +Support for emmeans — emmeans_support • mmrm +Support for emmeans — emmeans_support • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - +
    @@ -99,7 +128,8 @@
    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -132,22 +162,26 @@ 

    Examples#> Confidence level used: 0.95

    -
    + +
    + + - - + + diff --git a/v0.2.2/reference/fev_data.html b/v0.2.2/reference/fev_data.html index cc0f6aaec..9da80e8e8 100644 --- a/v0.2.2/reference/fev_data.html +++ b/v0.2.2/reference/fev_data.html @@ -1,5 +1,25 @@ - -Example Data on FEV1 — fev_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -88,13 +116,17 @@
    -

    Usage

    +

    Usage +

    fev_data
    -

    Format

    -

    A tibble with 800 rows and 7 variables:

    • USUBJID: subject ID.

    • +

      Format +

      +

      A tibble with 800 rows and 7 variables:

      +
        +
      • USUBJID: subject ID.

      • AVISIT: visit number.

      • ARMCD: treatment, TRT or PBO.

      • RACE: 3-category race.

      • @@ -102,35 +134,42 @@

        Format<
      • FEV1_BL: FEV1 at baseline (%).

      • FEV1: FEV1 at study visits.

      • WEIGHT: weighting variable.

      • -

    + +
    -

    Source

    +

    Source +

    This is an artificial dataset.

    -

    Note

    +

    Note +

    Measurements of FEV1 (forced expired volume in one second) is a measure of how quickly the lungs can be emptied. Low levels of FEV1 may indicate chronic obstructive pulmonary disease (COPD).

    + +
    -
    + + - - + + diff --git a/v0.2.2/reference/fit_mmrm.html b/v0.2.2/reference/fit_mmrm.html index 2ed94d8f9..358227a84 100644 --- a/v0.2.2/reference/fit_mmrm.html +++ b/v0.2.2/reference/fit_mmrm.html @@ -1,11 +1,31 @@ - - + + + + + +Low-Level Fitting Function for MMRM — fit_mmrm • mmrm +Low-Level Fitting Function for MMRM — fit_mmrm • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -97,13 +125,16 @@
    -

    Usage

    +

    Usage +

    fit_mmrm(formula, data, weights, reml = TRUE, control = mmrm_control())
    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    model formula with exactly one special term specifying the visits within subjects, see details.

    @@ -126,15 +157,18 @@

    Argumentsmmrm_control().

    -

    + +
    -

    Value

    +

    Value +

    List of class mmrm_tmb, see h_mmrm_tmb_fit() for details.

    -

    Details

    +

    Details +

    The formula typically looks like: FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID) so specifies response and covariates as usual, and exactly one special term @@ -144,7 +178,8 @@

    Details
    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     data <- fev_data
     system.time(result <- fit_mmrm(formula, data, rep(1, nrow(fev_data))))
    @@ -153,22 +188,26 @@ 

    Examples

    + +

    + + - - + + diff --git a/v0.2.2/reference/fit_single_optimizer.html b/v0.2.2/reference/fit_single_optimizer.html index dc62c453e..aa9f326dd 100644 --- a/v0.2.2/reference/fit_single_optimizer.html +++ b/v0.2.2/reference/fit_single_optimizer.html @@ -1,9 +1,29 @@ - - + + + + + +Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm +Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -94,7 +122,8 @@
    -

    Usage

    +

    Usage +

    fit_single_optimizer(
       formula,
       data,
    @@ -106,8 +135,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -132,9 +163,11 @@

    Arguments -

    Value

    +

    Value +

    The mmrm_fit object, with additional attributes containing warnings, @@ -142,14 +175,16 @@

    Value

    mmrm_tmb
    contents.

    -

    Details

    +

    Details +

    fit_single_optimizer will fit the mmrm model using the control provided. If there are multiple optimizers provided in control, only the first optimizer will be used.

    -

    Examples

    +

    Examples +

    mod_fit <- fit_single_optimizer(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data,
    @@ -161,22 +196,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.2.2/reference/free_cores.html b/v0.2.2/reference/free_cores.html index b5d904835..e7cd1cc28 100644 --- a/v0.2.2/reference/free_cores.html +++ b/v0.2.2/reference/free_cores.html @@ -1,7 +1,27 @@ - -Get an approximate number of free cores. — free_cores • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -91,49 +119,59 @@
    -

    Usage

    +

    Usage +

    free_cores()
    -

    Value

    +

    Value +

    The approximate number of free cores, which is an integer between 1 and one less than the total cores.

    -

    Details

    +

    Details +

    -
    • This uses the maximum load average at 1, 5 and 15 minutes on Linux and Mac +

        +
      • This uses the maximum load average at 1, 5 and 15 minutes on Linux and Mac machines to approximate the number of busy cores. For Windows, the load percentage is multiplied with the total number of cores.

      • We then subtract this from the number of all detected cores. One additional core is not used for extra safety.

      • -
    + +
    -

    Note

    +

    Note +

    If executed during a unit test and on CRAN then always returns 1 to avoid any parallelization.

    + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_coef_table.html b/v0.2.2/reference/h_coef_table.html index d66aa1a96..1618cba5d 100644 --- a/v0.2.2/reference/h_coef_table.html +++ b/v0.2.2/reference/h_coef_table.html @@ -1,5 +1,25 @@ - -Coefficients Table for MMRM Fit — h_coef_table • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -88,18 +116,23 @@
    -

    Usage

    +

    Usage +

    h_coef_table(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    model fit.

    -
    + +
    -

    Value

    +

    Value +

    Matrix with one row per coefficient and columns @@ -107,22 +140,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_covbeta_fun.html b/v0.2.2/reference/h_covbeta_fun.html index 612deee51..62953b1e9 100644 --- a/v0.2.2/reference/h_covbeta_fun.html +++ b/v0.2.2/reference/h_covbeta_fun.html @@ -1,7 +1,27 @@ - -Covariance Matrix for Coefficients Given Variance Parameters — h_covbeta_fun • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -91,18 +119,23 @@
    -

    Usage

    +

    Usage +

    h_covbeta_fun(model)
    -

    Arguments

    -
    model
    +

    Arguments +

    +
    +
    model

    (mmrm_tmb)
    initial model fit.

    -
    + +
    -

    Value

    +

    Value +

    Function with argument theta that calculates the covariance matrix @@ -110,22 +143,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_df_1d_kr.html b/v0.2.2/reference/h_df_1d_kr.html index 6f99e6f69..dd4a26d77 100644 --- a/v0.2.2/reference/h_df_1d_kr.html +++ b/v0.2.2/reference/h_df_1d_kr.html @@ -1,9 +1,29 @@ - -Calculation of Kenward-Roger Degrees of Freedom for One-Dimensional Contrast — h_df_1d_kr • mmrm +Calculation of Kenward-Roger Degrees of Freedom for One-Dimensional Contrast — h_df_1d_kr • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -94,13 +122,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_kr(object, contrast, linear = FALSE)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    object created by mmrm() with Kenward-Roger(-Linear) method.

    @@ -111,31 +142,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_df_1d_list.html b/v0.2.2/reference/h_df_1d_list.html index 92ef2b972..6f70d2f3c 100644 --- a/v0.2.2/reference/h_df_1d_list.html +++ b/v0.2.2/reference/h_df_1d_list.html @@ -1,7 +1,27 @@ - -Creating Results List for One-Dimensional Contrast — h_df_1d_list • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -91,13 +119,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_list(est, var, v_num, v_denom)
    -

    Arguments

    -
    est
    +

    Arguments +

    +
    +
    est

    (number)
    estimate.

    @@ -112,31 +143,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val (2-sided p-value).

    + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_df_1d_sat.html b/v0.2.2/reference/h_df_1d_sat.html index 8c4c085e0..4c1847176 100644 --- a/v0.2.2/reference/h_df_1d_sat.html +++ b/v0.2.2/reference/h_df_1d_sat.html @@ -1,9 +1,29 @@ - -Calculation of Satterthwaite Degrees of Freedom for One-Dimensional Contrast — h_df_1d_sat • mmrm +Calculation of Satterthwaite Degrees of Freedom for One-Dimensional Contrast — h_df_1d_sat • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -94,13 +122,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_sat(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -109,31 +140,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_df_md_from_1d.html b/v0.2.2/reference/h_df_md_from_1d.html index 9ef603fa3..bcdf237c8 100644 --- a/v0.2.2/reference/h_df_md_from_1d.html +++ b/v0.2.2/reference/h_df_md_from_1d.html @@ -1,5 +1,25 @@ - -Creating F-Statistic Results from One-Dimensional Contrast — h_df_md_from_1d • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -88,22 +116,27 @@
    -

    Usage

    +

    Usage +

    h_df_md_from_1d(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    model fit.

    contrast

    (numeric)
    one-dimensional contrast.

    -
    + +
    -

    Value

    +

    Value +

    The one-dimensional results are calculated and then returned as per @@ -111,22 +144,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_df_md_kr.html b/v0.2.2/reference/h_df_md_kr.html index 5a0bc9534..17a998cc0 100644 --- a/v0.2.2/reference/h_df_md_kr.html +++ b/v0.2.2/reference/h_df_md_kr.html @@ -1,7 +1,27 @@ - -Calculation of Kenward-Roger Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_kr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -91,13 +119,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_kr(object, contrast, linear = FALSE)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    object.

    @@ -108,31 +139,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_df_md_list.html b/v0.2.2/reference/h_df_md_list.html index 36295b178..d88e7c7dc 100644 --- a/v0.2.2/reference/h_df_md_list.html +++ b/v0.2.2/reference/h_df_md_list.html @@ -1,7 +1,27 @@ - -Creating Results List for Multi-Dimensional Contrast — h_df_md_list • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -91,13 +119,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_list(f_stat, num_df, denom_df)
    -

    Arguments

    -
    f_stat
    +

    Arguments +

    +
    +
    f_stat

    (number)
    F-statistic.

    @@ -108,31 +139,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_df_md_sat.html b/v0.2.2/reference/h_df_md_sat.html index d1baae57b..1d751f65a 100644 --- a/v0.2.2/reference/h_df_md_sat.html +++ b/v0.2.2/reference/h_df_md_sat.html @@ -1,7 +1,27 @@ - -Calculation of Satterthwaite Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_sat • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -91,13 +119,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_sat(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -107,31 +138,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_get_kr_comp.html b/v0.2.2/reference/h_get_kr_comp.html index dd973d428..d1e00f4da 100644 --- a/v0.2.2/reference/h_get_kr_comp.html +++ b/v0.2.2/reference/h_get_kr_comp.html @@ -1,7 +1,27 @@ - -Obtain Kenward-Roger Adjustment Components — h_get_kr_comp • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -91,30 +119,39 @@
    -

    Usage

    +

    Usage +

    h_get_kr_comp(tmb_data, theta)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    theta

    (numeric)
    theta estimate.

    -
    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • P: matrix of \(P\) component.

    • +

      Named list with elements:

      +
        +
      • P: matrix of \(P\) component.

      • Q: matrix of \(Q\) component.

      • R: matrix of \(R\) component.

      • -
    + +
    -

    Details

    +

    Details +

    the function returns a named list, \(P\), \(Q\) and \(R\), which corresponds to the paper in 1997. The matrices are stacked in columns so that \(P\), \(Q\) and \(R\) has the same column number(number of beta parameters). The number of rows, is dependent on @@ -126,22 +163,26 @@

    Details

    + + + + - - + + diff --git a/v0.2.2/reference/h_get_optimizers.html b/v0.2.2/reference/h_get_optimizers.html index 3a8764775..e19c856ac 100644 --- a/v0.2.2/reference/h_get_optimizers.html +++ b/v0.2.2/reference/h_get_optimizers.html @@ -1,5 +1,25 @@ - -Obtain Optimizer according to Optimizer String Value — h_get_optimizers • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -88,7 +116,8 @@
    -

    Usage

    +

    Usage +

    h_get_optimizers(
       optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"),
       optimizer_fun = h_optimizer_fun(optimizer),
    @@ -98,8 +127,10 @@ 

    Usage

    -

    Arguments

    -
    optimizer
    +

    Arguments +

    +
    +
    optimizer

    (character)
    names of built-in optimizers to try, subset of "L-BFGS-B", "BFGS", "CG" and "nlminb".

    @@ -116,46 +147,59 @@

    Arguments -

    Value

    +

    Value +

    Named list of optimizers created by h_partial_fun_args().

    -

    Details

    -

    If you want to use only the built-in optimizers:

    • optimizer is a shortcut to create a list of built-in optimizer functions +

      Details +

      +

      If you want to use only the built-in optimizers:

      +
        +
      • optimizer is a shortcut to create a list of built-in optimizer functions passed to optimizer_fun.

      • Allowed are "L-BFGS-B", "BFGS", "CG" (using stats::optim() with corresponding method) and "nlminb" (using stats::nlminb()).

      • Other arguments should go into optimizer_args.

      • -

      If you want to use your own optimizer function:

      • Make sure that there are three arguments: parameter (start value), objective function +

      +

      If you want to use your own optimizer function:

      +
        +
      • Make sure that there are three arguments: parameter (start value), objective function and gradient function are sequentially in the function arguments.

      • If there are other named arguments in front of these, make sure they are correctly specified through optimizer_args.

      • If the hessian can be used, please make sure its argument name is hessian and please add attribute use_hessian = TRUE to the function, using attr(fun, "use_hessian) <- TRUE.

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_gradient.html b/v0.2.2/reference/h_gradient.html index 8b94d32ae..e083ac745 100644 --- a/v0.2.2/reference/h_gradient.html +++ b/v0.2.2/reference/h_gradient.html @@ -1,7 +1,27 @@ - -Computation of a Gradient Given Jacobian and Contrast Vector — h_gradient • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -91,13 +119,16 @@
    -

    Usage

    +

    Usage +

    h_gradient(jac_list, contrast)
    -

    Arguments

    -
    jac_list
    +

    Arguments +

    +
    +
    jac_list

    (list)
    Jacobian list produced e.g. by h_jac_list().

    @@ -106,9 +137,11 @@

    Arguments -

    Value

    +

    Value +

    Numeric vector which contains the quadratic forms of each element of @@ -116,22 +149,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_jac_col_as_matrix.html b/v0.2.2/reference/h_jac_col_as_matrix.html index ceba6ce9b..d1e481156 100644 --- a/v0.2.2/reference/h_jac_col_as_matrix.html +++ b/v0.2.2/reference/h_jac_col_as_matrix.html @@ -1,5 +1,25 @@ - -Formatting a Column from Jacobian Matrix as Matrix — h_jac_col_as_matrix • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -88,22 +116,27 @@
    -

    Usage

    +

    Usage +

    h_jac_col_as_matrix(jac_matrix, col)
    -

    Arguments

    -
    jac_matrix
    +

    Arguments +

    +
    +
    jac_matrix

    (matrix)
    full Jacobian matrix.

    col

    (int)
    column index.

    -
    + +
    -

    Value

    +

    Value +

    The column col of jac_matrix as a square matrix. @@ -112,22 +145,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_jac_list.html b/v0.2.2/reference/h_jac_list.html index 211d503dc..b2fee0204 100644 --- a/v0.2.2/reference/h_jac_list.html +++ b/v0.2.2/reference/h_jac_list.html @@ -1,5 +1,25 @@ - -Obtain List of Jacobian Matrix Entries for Covariance Matrix — h_jac_list • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -88,13 +116,16 @@
    -

    Usage

    +

    Usage +

    h_jac_list(covbeta_fun, theta_est)
    -

    Arguments

    -
    covbeta_fun
    +

    Arguments +

    +
    +
    covbeta_fun

    (function)
    function calculating the covariance matrix of coefficients given variance parameters (theta), see h_covbeta_fun() to obtain this from a mmrm_tmb object.

    @@ -103,9 +134,11 @@

    Arguments -

    Value

    +

    Value +

    List with one element per variance parameter containing a matrix @@ -114,22 +147,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_kr_df.html b/v0.2.2/reference/h_kr_df.html index b90c33eb5..2240521d6 100644 --- a/v0.2.2/reference/h_kr_df.html +++ b/v0.2.2/reference/h_kr_df.html @@ -1,7 +1,27 @@ - -Obtain the Adjusted Kenward-Roger Degree of Freedom — h_kr_df • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -91,13 +119,16 @@
    -

    Usage

    +

    Usage +

    h_kr_df(v0, l, w, p)
    -

    Arguments

    -
    v0
    +

    Arguments +

    +
    +
    v0

    (matrix)
    unadjusted covariance matrix.

    @@ -112,32 +143,41 @@

    Argumentsh_get_kr_comp().

    -

    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • m: numeric degree of freedom.

    • +

      Named list with elements:

      +
        +
      • m: numeric degree of freedom.

      • lambda: numeric F statistic scale parameter.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_md_denom_df.html b/v0.2.2/reference/h_md_denom_df.html index 22cedb71d..46e8d7f54 100644 --- a/v0.2.2/reference/h_md_denom_df.html +++ b/v0.2.2/reference/h_md_denom_df.html @@ -1,5 +1,25 @@ - -Calculating Denominator Degrees of Freedom for the Multi-Dimensional Case — h_md_denom_df • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -88,47 +116,57 @@
    -

    Usage

    +

    Usage +

    h_md_denom_df(t_stat_df)
    -

    Arguments

    -
    t_stat_df
    +

    Arguments +

    +
    +
    t_stat_df

    (numeric)
    n t-statistic derived degrees of freedom.

    -
    + +
    -

    Value

    +

    Value +

    Usually the calculation is returning 2 * E / (E - n) where E is the sum of t / (t - 2) over all t_stat_df values t.

    -

    Note

    +

    Note +

    If the input values are two similar to each other then just the average of them is returned. If any of the inputs is not larger than 2 then 2 is returned.

    + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_mmrm_tmb_assert_start.html b/v0.2.2/reference/h_mmrm_tmb_assert_start.html index b790ac6a7..2adbec7c7 100644 --- a/v0.2.2/reference/h_mmrm_tmb_assert_start.html +++ b/v0.2.2/reference/h_mmrm_tmb_assert_start.html @@ -1,5 +1,25 @@ - -Asserting Sane Start Values for TMB Fit — h_mmrm_tmb_assert_start • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -88,40 +116,49 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_assert_start(tmb_object)
    -

    Arguments

    -
    tmb_object
    +

    Arguments +

    +
    +
    tmb_object

    (list)
    created with TMB::MakeADFun().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used for assertions.

    + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_mmrm_tmb_check_conv.html b/v0.2.2/reference/h_mmrm_tmb_check_conv.html index 92f1e193c..87ef062dc 100644 --- a/v0.2.2/reference/h_mmrm_tmb_check_conv.html +++ b/v0.2.2/reference/h_mmrm_tmb_check_conv.html @@ -1,5 +1,25 @@ - -Checking the TMB Optimization Result — h_mmrm_tmb_check_conv • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -88,22 +116,27 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_check_conv(tmb_opt, mmrm_tmb)
    -

    Arguments

    -
    tmb_opt
    +

    Arguments +

    +
    +
    tmb_opt

    (list)
    optimization result.

    mmrm_tmb

    (mmrm_tmb)
    result from h_mmrm_tmb_fit().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used to generate warnings in case that the model @@ -111,22 +144,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_mmrm_tmb_data.html b/v0.2.2/reference/h_mmrm_tmb_data.html index f829b49ae..e5769b7b8 100644 --- a/v0.2.2/reference/h_mmrm_tmb_data.html +++ b/v0.2.2/reference/h_mmrm_tmb_data.html @@ -1,5 +1,25 @@ - -Data for TMB Fit — h_mmrm_tmb_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -88,7 +116,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_data(
       formula_parts,
       data,
    @@ -100,8 +129,10 @@ 

    Usage

    -

    Arguments

    -
    formula_parts
    +

    Arguments +

    +
    +
    formula_parts

    (mmrm_tmb_formula_parts)
    list with formula parts from h_mmrm_tmb_formula_parts().

    @@ -128,12 +159,16 @@

    Arguments -

    Value

    +

    Value +

    -

    List of class mmrm_tmb_data with elements:

    • full_frame: data.frame with n rows containing all variables needed in the model.

    • +

      List of class mmrm_tmb_data with elements:

      +
        +
      • full_frame: data.frame with n rows containing all variables needed in the model.

      • x_matrix: matrix with n rows and p columns specifying the overall design matrix.

      • x_cols_aliased: logical with potentially more than p elements indicating which columns in the original design matrix have been left out to obtain a full rank @@ -153,9 +188,11 @@

        Value

        reml: int specifying whether REML estimation is used (1), otherwise ML (0).

      • subject_groups: factor specifying the grouping for each subject.

      • n_groups: int with the number of total groups

      • -
    + +
    -

    Details

    +

    Details +

    Note that the subject_var must not be factor but can also be character. If it is character, then it will be converted to factor internally. Here the levels will be the unique values, sorted alphabetically and numerically if there @@ -164,22 +201,26 @@

    Details

    + + + + - - + + diff --git a/v0.2.2/reference/h_mmrm_tmb_extract_cov.html b/v0.2.2/reference/h_mmrm_tmb_extract_cov.html index a78c637a6..6dd4b04cc 100644 --- a/v0.2.2/reference/h_mmrm_tmb_extract_cov.html +++ b/v0.2.2/reference/h_mmrm_tmb_extract_cov.html @@ -1,7 +1,27 @@ - -Extract covariance matrix from TMB report and input data — h_mmrm_tmb_extract_cov • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -91,13 +119,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_extract_cov(tmb_report, tmb_data, visit_var, is_spatial)
    -

    Arguments

    -
    tmb_report
    +

    Arguments +

    +
    +
    tmb_report

    (list)
    report created with TMB::MakeADFun() report function.

    @@ -112,9 +143,11 @@

    Arguments -

    Value

    +

    Value +

    Return a simple covariance matrix if there is no grouping, or a named @@ -123,22 +156,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_mmrm_tmb_extract_terms.html b/v0.2.2/reference/h_mmrm_tmb_extract_terms.html index ae1a37902..54ab20cbc 100644 --- a/v0.2.2/reference/h_mmrm_tmb_extract_terms.html +++ b/v0.2.2/reference/h_mmrm_tmb_extract_terms.html @@ -1,5 +1,25 @@ - -Extract group/subject vars from covariance term — h_mmrm_tmb_extract_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -88,27 +116,36 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_extract_terms(cov_content)
    -

    Arguments

    -
    cov_content
    +

    Arguments +

    +
    +
    cov_content

    (call)
    covariance term.

    -
    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • visit_var: character with the visit variable name.

    • +

      Named list with elements:

      +
        +
      • visit_var: character with the visit variable name.

      • subject_var: string with the subject variable name.

      • group_var: string with the group variable name. If no group specified, this element is NULL.

      • -
    + +
    -

    Details

    +

    Details +

    a covariance term, which takes the following form: us(time | group / subject), or sp_exp(time1, time2, ... | group / subject). Only for spatial covariance structure can have multiple time coordinates. @@ -117,22 +154,26 @@

    Details

    + + + + - - + + diff --git a/v0.2.2/reference/h_mmrm_tmb_extract_vars.html b/v0.2.2/reference/h_mmrm_tmb_extract_vars.html index f26610a62..d59bb1645 100644 --- a/v0.2.2/reference/h_mmrm_tmb_extract_vars.html +++ b/v0.2.2/reference/h_mmrm_tmb_extract_vars.html @@ -1,5 +1,25 @@ - -Processing the covariance term — h_mmrm_tmb_extract_vars • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -88,44 +116,56 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_extract_vars(cov_term)
    -

    Arguments

    -
    cov_term
    +

    Arguments +

    +
    +
    cov_term

    (call)
    covariance term.

    -
    + +
    -

    Value

    +

    Value +

    -

    Named list of with elements:

    • visit_var: character with the visit variable name.

    • +

      Named list of with elements:

      +
        +
      • visit_var: character with the visit variable name.

      • subject_var: string with the subject variable name.

      • group_var: string with the group variable name. If no group specified, this element is NULL.

      • is_spatial: logical indicator of whether the covariance structure is spatial

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_mmrm_tmb_fit.html b/v0.2.2/reference/h_mmrm_tmb_fit.html index 91ed3b4bd..1c13dbd6e 100644 --- a/v0.2.2/reference/h_mmrm_tmb_fit.html +++ b/v0.2.2/reference/h_mmrm_tmb_fit.html @@ -1,7 +1,27 @@ - -Build TMB Fit Result List — h_mmrm_tmb_fit • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -91,13 +119,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_fit(tmb_object, tmb_opt, data, weights, formula_parts, tmb_data)
    -

    Arguments

    -
    tmb_object
    +

    Arguments +

    +
    +
    tmb_object

    (list)
    created with TMB::MakeADFun().

    @@ -122,12 +153,16 @@

    Argumentsh_mmrm_tmb_data().

    -

    + +
    -

    Value

    +

    Value +

    -

    List of class mmrm_tmb with:

    • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

    • +

      List of class mmrm_tmb with:

      +
        +
      • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

      • beta_est: vector of coefficient estimates.

      • beta_vcov: Variance-covariance matrix for coefficient estimates.

      • theta_est: vector of variance parameter estimates.

      • @@ -140,25 +175,30 @@

        Value

        opt_details: list with optimization details including convergence code.

      • tmb_object: original TMB object created with TMB::MakeADFun().

      • tmb_data: input.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_mmrm_tmb_formula_parts.html b/v0.2.2/reference/h_mmrm_tmb_formula_parts.html index 54e23fbc5..f895007df 100644 --- a/v0.2.2/reference/h_mmrm_tmb_formula_parts.html +++ b/v0.2.2/reference/h_mmrm_tmb_formula_parts.html @@ -1,5 +1,25 @@ - -Processing the Formula for TMB Fit — h_mmrm_tmb_formula_parts • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -88,21 +116,28 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_formula_parts(formula)
    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    original formula.

    -
    + +
    -

    Value

    +

    Value +

    -

    List of class mmrm_tmb_formula_parts with elements:

    • formula: the original input.

    • +

      List of class mmrm_tmb_formula_parts with elements:

      +
        +
      • formula: the original input.

      • model_formula: formula with the covariance term is removed.

      • full_formula: same as model_formula but includes the subject_var and visit_var.

      • @@ -112,25 +147,30 @@

        Value

        subject_var: string with the subject variable name.

      • group_var: string with the group variable name. If no group specified, this element is NULL.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_mmrm_tmb_parameters.html b/v0.2.2/reference/h_mmrm_tmb_parameters.html index 1494aa90b..a3ac4affa 100644 --- a/v0.2.2/reference/h_mmrm_tmb_parameters.html +++ b/v0.2.2/reference/h_mmrm_tmb_parameters.html @@ -1,5 +1,25 @@ - -Start Parameters for TMB Fit — h_mmrm_tmb_parameters • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -88,13 +116,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_parameters(formula_parts, tmb_data, start, n_groups = 1L)
    -

    Arguments

    -
    formula_parts
    +

    Arguments +

    +
    +
    formula_parts

    (mmrm_tmb_formula_parts)
    produced by h_mmrm_tmb_formula_parts().

    @@ -111,9 +142,11 @@

    Arguments -

    Value

    +

    Value +

    List with element theta containing the start values for the variance @@ -121,22 +154,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_optimizer_fun.html b/v0.2.2/reference/h_optimizer_fun.html index 38592c995..c2a3c6d63 100644 --- a/v0.2.2/reference/h_optimizer_fun.html +++ b/v0.2.2/reference/h_optimizer_fun.html @@ -1,5 +1,25 @@ - -Obtain Optimizer Function with Character — h_optimizer_fun • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -88,40 +116,49 @@
    -

    Usage

    +

    Usage +

    h_optimizer_fun(optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"))
    -

    Arguments

    -
    optimizer
    +

    Arguments +

    +
    +
    optimizer

    (character)
    vector of optimizers.

    -
    + +
    -

    Value

    +

    Value +

    A (list)
    of optimizer functions generated from h_partial_fun_args().

    + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_partial_fun_args.html b/v0.2.2/reference/h_partial_fun_args.html index 5d91bc8bd..f0a486443 100644 --- a/v0.2.2/reference/h_partial_fun_args.html +++ b/v0.2.2/reference/h_partial_fun_args.html @@ -1,5 +1,25 @@ - -Create Partial Functions — h_partial_fun_args • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -88,13 +116,16 @@
    -

    Usage

    +

    Usage +

    h_partial_fun_args(fun, ..., additional_attr = list())
    -

    Arguments

    -
    fun
    +

    Arguments +

    +
    +
    fun

    (function)
    to be wrapped.

    @@ -105,16 +136,19 @@

    Arguments -

    Value

    +

    Value +

    Object with S3 class "partial", a function with args attribute (and possibly more attributes from additional_attr).

    -

    Details

    +

    Details +

    This function add args attribute to the original function, and add an extra class partial to the function. args is the argument for the function, and elements in ... will override the existing @@ -122,22 +156,26 @@

    Details

    + + + + - - + + diff --git a/v0.2.2/reference/h_print_aic_list.html b/v0.2.2/reference/h_print_aic_list.html index 69baab85c..7ddee2f45 100644 --- a/v0.2.2/reference/h_print_aic_list.html +++ b/v0.2.2/reference/h_print_aic_list.html @@ -1,5 +1,25 @@ - -Printing AIC and other Model Fit Criteria — h_print_aic_list • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -88,38 +116,46 @@
    -

    Usage

    +

    Usage +

    h_print_aic_list(aic_list, digits = 1)
    -

    Arguments

    -
    aic_list
    +

    Arguments +

    +
    +
    aic_list

    (list)
    list as part of from summary.mmrm().

    digits

    (number)
    number of decimal places used with round().

    -
    + + + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_print_call.html b/v0.2.2/reference/h_print_call.html index 0e27864d5..2e1b281f7 100644 --- a/v0.2.2/reference/h_print_call.html +++ b/v0.2.2/reference/h_print_call.html @@ -1,5 +1,25 @@ - -Printing MMRM Function Call — h_print_call • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -88,13 +116,16 @@
    -

    Usage

    +

    Usage +

    h_print_call(call, n_obs, n_subjects, n_timepoints)
    -

    Arguments

    -
    call
    +

    Arguments +

    +
    +
    call

    (call)
    original mmrm() function call.

    @@ -109,25 +140,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.2.2/reference/h_print_cov.html b/v0.2.2/reference/h_print_cov.html index dc6240ef0..3ed0dc728 100644 --- a/v0.2.2/reference/h_print_cov.html +++ b/v0.2.2/reference/h_print_cov.html @@ -1,5 +1,25 @@ - -Printing MMRM Covariance Type — h_print_cov • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -88,13 +116,16 @@
    -

    Usage

    +

    Usage +

    h_print_cov(cov_type, n_theta, n_groups)
    -

    Arguments

    -
    cov_type
    +

    Arguments +

    +
    +
    cov_type

    (string)
    covariance structure abbreviation.

    @@ -105,25 +136,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.2.2/reference/h_quad_form.html b/v0.2.2/reference/h_quad_form.html index b67623271..1d15e44e3 100644 --- a/v0.2.2/reference/h_quad_form.html +++ b/v0.2.2/reference/h_quad_form.html @@ -1,7 +1,27 @@ - -Quadratic Form Calculations — h_quad_form • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -91,15 +119,18 @@
    -

    Usage

    +

    Usage +

    h_quad_form_vec(vec, center)
     
     h_quad_form_mat(mat, center)
    -

    Arguments

    -
    vec
    +

    Arguments +

    +
    +
    vec

    (numeric)
    interpreted as a row vector.

    @@ -113,34 +144,42 @@

    Arguments -

    Functions

    +

    Functions +

    -
    • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) +

        +
      • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) as a numeric (not a matrix).

      • h_quad_form_mat(): calculates the quadratic form mat %*% center %*% t(mat) as a matrix, the result is square and has dimensions identical to the number of rows in mat.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_record_all_output.html b/v0.2.2/reference/h_record_all_output.html index 62a51902d..e0b3812d2 100644 --- a/v0.2.2/reference/h_record_all_output.html +++ b/v0.2.2/reference/h_record_all_output.html @@ -1,9 +1,29 @@ - - + + + + + +Capture all Output — h_record_all_output • mmrm +Capture all Output — h_record_all_output • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -94,13 +122,16 @@
    -

    Usage

    +

    Usage +

    h_record_all_output(expr, remove = list())
    -

    Arguments

    -
    expr
    +

    Arguments +

    +
    +
    expr

    (expression)
    to be executed.

    @@ -109,34 +140,43 @@

    Arguments -

    Value

    +

    Value +

    -

    A list containing

    • result: The object returned by expr or list() if an error was thrown.

    • +

      A list containing

      +
        +
      • result: The object returned by expr or list() if an error was thrown.

      • warnings: NULL or a character vector if warnings were thrown.

      • errors: NULL or a string if an error was thrown.

      • messages: NULL or a character vector if messages were produced.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_split_control.html b/v0.2.2/reference/h_split_control.html index 9c7d1fd44..7e2956439 100644 --- a/v0.2.2/reference/h_split_control.html +++ b/v0.2.2/reference/h_split_control.html @@ -1,7 +1,27 @@ - -Split Control List — h_split_control • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -91,44 +119,53 @@
    -

    Usage

    +

    Usage +

    h_split_control(control, ...)
    -

    Arguments

    -
    control
    +

    Arguments +

    +
    +
    control

    (mmrm_control)
    object.

    ...

    additional parameters to update the control object.

    -
    + +
    -

    Value

    +

    Value +

    A list of mmrm_control entries.

    + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_summarize_all_fits.html b/v0.2.2/reference/h_summarize_all_fits.html index 6ada241ee..4eb86e7ce 100644 --- a/v0.2.2/reference/h_summarize_all_fits.html +++ b/v0.2.2/reference/h_summarize_all_fits.html @@ -1,5 +1,25 @@ - -Summarizing List of Fits — h_summarize_all_fits • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -88,40 +116,49 @@
    -

    Usage

    +

    Usage +

    h_summarize_all_fits(all_fits)
    -

    Arguments

    -
    all_fits
    +

    Arguments +

    +
    +
    all_fits

    (list of mmrm_fit or try-error)
    list of fits.

    -
    + +
    -

    Value

    +

    Value +

    List with warnings, messages, log_liks and converged results.

    + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_tr.html b/v0.2.2/reference/h_tr.html index f22dd1282..e6b53ab24 100644 --- a/v0.2.2/reference/h_tr.html +++ b/v0.2.2/reference/h_tr.html @@ -1,5 +1,25 @@ - -Trace of a Matrix — h_tr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -88,40 +116,49 @@
    -

    Usage

    +

    Usage +

    h_tr(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (matrix)
    square matrix input.

    -
    + +
    -

    Value

    +

    Value +

    The trace of the square matrix.

    + +
    -
    + + - - + + diff --git a/v0.2.2/reference/h_var_adj.html b/v0.2.2/reference/h_var_adj.html index f5a9da6a7..203eaef85 100644 --- a/v0.2.2/reference/h_var_adj.html +++ b/v0.2.2/reference/h_var_adj.html @@ -1,9 +1,29 @@ - -Obtain the Adjusted Covariance Matrix — h_var_adj • mmrm +Obtain the Adjusted Covariance Matrix — h_var_adj • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -94,13 +122,16 @@
    -

    Usage

    +

    Usage +

    h_var_adj(v, w, p, q, r, linear = FALSE)
    -

    Arguments

    -
    v
    +

    Arguments +

    +
    +
    v

    (matrix)
    unadjusted covariance matrix.

    @@ -123,31 +154,37 @@

    Arguments -

    Value

    +

    Value +

    The matrix of adjusted covariance matrix.

    + +
    -
    + + - - + + diff --git a/v0.2.2/reference/index.html b/v0.2.2/reference/index.html index ff68c21a5..6ace18dcb 100644 --- a/v0.2.2/reference/index.html +++ b/v0.2.2/reference/index.html @@ -1,5 +1,23 @@ - -Function reference • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +44,8 @@ + - + + - + @@ -82,175 +108,231 @@
    -

    Package

    +

    Package +

    -
    +
    +
    -
    +
    +
    mmrm-package _PACKAGE
    -
    mmrm Package
    -
    -

    Functions

    +
    +mmrm Package
    + +
    +
    +

    Functions +

    -
    +
    +
    -
    +
    +
    mmrm()
    Fit an MMRM
    -
    +
    +
    +
    fit_mmrm()
    Low-Level Fitting Function for MMRM
    -
    +
    +
    +
    mmrm_control()
    Control Parameters for Fitting an MMRM
    -
    +
    +
    +
    fit_single_optimizer()
    Fitting an MMRM with Single Optimizer
    -
    +
    +
    +
    refit_multiple_optimizers()
    Refitting MMRM with Multiple Optimizers
    -
    +
    +
    +
    df_1d()
    Calculation of Degrees of Freedom for One-Dimensional Contrast
    -
    +
    +
    +
    df_md()
    Calculation of Degrees of Freedom for Multi-Dimensional Contrast
    -
    +
    +
    +
    component()
    Component Access for mmrm_tmb Objects
    -
    -

    Methods

    + +
    +
    +

    Methods +

    -
    +
    +
    -

    Covariance Structures

    + +
    +
    +

    Covariance Structures +

    -
    +
    +
    -
    +
    +
    cov_type cov_type_spatial
    covariance type
    -
    -

    Estimate Marginal Means

    + +
    +
    +

    Estimate Marginal Means +

    -
    +
    +
    -
    +
    +
    emmeans_support
    -
    Support for emmeans
    -
    -

    Datasets

    +
    Support for emmeans +
    + +
    +
    +

    Datasets +

    -
    +
    +
    -
    +
    +
    fev_data
    Example Data on FEV1
    -
    -

    Deprecated

    + +
    +
    +

    Deprecated +

    -
    +
    +
    -
    +
    +
    free_cores()
    Get an approximate number of free cores.
    -
    + + + +
    -
    + + - - + + diff --git a/v0.2.2/reference/mmrm-package.html b/v0.2.2/reference/mmrm-package.html index cddb4bcba..3005a7432 100644 --- a/v0.2.2/reference/mmrm-package.html +++ b/v0.2.2/reference/mmrm-package.html @@ -1,5 +1,25 @@ - -mmrm Package — mmrm-package • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -89,44 +118,60 @@
    -

    See also

    -
    -

    Author

    +

    Author +

    Maintainer: Daniel Sabanes Bove daniel.sabanes_bove@roche.com

    -

    Authors:

    + +
    + +
    -
    + + - - + + diff --git a/v0.2.2/reference/mmrm.html b/v0.2.2/reference/mmrm.html index a82af4faa..7b800f4b0 100644 --- a/v0.2.2/reference/mmrm.html +++ b/v0.2.2/reference/mmrm.html @@ -1,7 +1,27 @@ - -Fit an MMRM — mmrm • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -91,7 +119,8 @@
    -

    Usage

    +

    Usage +

    mmrm(
       formula,
       data,
    @@ -103,8 +132,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -130,15 +161,18 @@

    Argumentsmmrm_control().

    -

    + +
    -

    Value

    +

    Value +

    An mmrm object.

    -

    Details

    +

    Details +

    The formula typically looks like: FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID) so specifies response and covariates as usual, and exactly one special term @@ -163,19 +197,24 @@

    Detailsmmrm.

    -

    Note

    +

    Note +

    The mmrm object is also an mmrm_fit and an mmrm_tmb object, therefore corresponding methods also work (see mmrm_tmb_methods).

    -

    Additional contents depend on the choice of the adjustment method:

    • If Satterthwaite adjustment is used, the Jacobian information jac_list +

      Additional contents depend on the choice of the adjustment method:

      +
        +
      • If Satterthwaite adjustment is used, the Jacobian information jac_list is included.

      • If Kenward-Roger adjustment is used, kr_comp contains necessary components and beta_vcov_adj includes the adjusted coefficients covariance matrix.

      • -

      Use of the package emmeans is supported, see emmeans_support.

      +
    +

    Use of the package emmeans is supported, see emmeans_support.

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -199,22 +238,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.2.2/reference/mmrm_control.html b/v0.2.2/reference/mmrm_control.html index 201798f14..e07202f1b 100644 --- a/v0.2.2/reference/mmrm_control.html +++ b/v0.2.2/reference/mmrm_control.html @@ -1,9 +1,29 @@ - - + + + + + +Control Parameters for Fitting an MMRM — mmrm_control • mmrm +Control Parameters for Fitting an MMRM — mmrm_control • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -94,7 +122,8 @@
    -

    Usage

    +

    Usage +

    mmrm_control(
       n_cores = 1L,
       method = c("Satterthwaite", "Kenward-Roger", "Kenward-Roger-Linear"),
    @@ -107,8 +136,10 @@ 

    Usage

    -

    Arguments

    -
    n_cores
    +

    Arguments +

    +
    +
    n_cores

    (int)
    number of cores to be used.

    @@ -139,15 +170,18 @@

    Argumentsh_get_optimizers().

    -

    + +
    -

    Value

    +

    Value +

    List of class mmrm_control with the control parameters.

    -

    Details

    +

    Details +

    The drop_visit_levels flag will decide whether unobserved visits will be kept for analysis. For example, if the data only has observations at visits VIS1, VIS3 and VIS4, by default they are treated to be equally spaced, the distance from VIS1 to VIS3, and from VIS3 to VIS4, @@ -160,7 +194,8 @@

    Details
    -

    Examples

    +

    Examples +

    mmrm_control(
       optimizer_fun = stats::optim,
       optimizer_args = list(method = "L-BFGS-B")
    @@ -261,22 +296,26 @@ 

    Examples

    + +

    + + - - + + diff --git a/v0.2.2/reference/mmrm_methods.html b/v0.2.2/reference/mmrm_methods.html index c2becf2a5..c3706f10a 100644 --- a/v0.2.2/reference/mmrm_methods.html +++ b/v0.2.2/reference/mmrm_methods.html @@ -1,5 +1,25 @@ - -Methods for mmrm Objects — mmrm_methods • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -88,7 +116,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm
     summary(object, ...)
     
    @@ -102,44 +131,60 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the fitted MMRM including Jacobian and call etc.

    ...

    not used.

    -
    + +
    -

    Value

    +

    Value +

    Depends on the method, see Details and Functions.

    -

    Details

    -

    While printing the summary of (mmrm)
    object, the following will be displayed:

    1. Formula. The formula used in the model.

    2. +

      Details +

      +

      While printing the summary of (mmrm)
      object, the following will be displayed:

      +
        +
      1. Formula. The formula used in the model.

      2. Data. The data used for analysis, including number of subjects, number of valid observations.

      3. Covariance. The covariance structure and number of variance parameters.

      4. Method. Restricted maximum likelihood(REML) or maximum likelihood(ML).

      5. Model selection criteria. AIC, BIC, log likelihood and deviance.

      6. Coefficients. Coefficients of the covariates.

      7. -
      8. Covariance estimate. The covariance estimate(for each group).

        1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available +

        2. +

          Covariance estimate. The covariance estimate(for each group).

          +
            +
          1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available in data will be displayed.

          2. If the covariance structure is spatial, the covariance matrix of two time points with unit distance will be displayed.

          3. -
        3. -
    + + + +
    -

    Functions

    +

    Functions +

    -
    • summary(mmrm): summarizes the MMRM fit results.

    • +
        +
      • summary(mmrm): summarizes the MMRM fit results.

      • print(summary.mmrm): prints the MMRM fit summary.

      • -
    + +
    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- mmrm(formula, fev_data)
     # Summary:
    @@ -195,22 +240,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.2.2/reference/mmrm_tmb_methods.html b/v0.2.2/reference/mmrm_tmb_methods.html index 9d169e5ed..0528ea09c 100644 --- a/v0.2.2/reference/mmrm_tmb_methods.html +++ b/v0.2.2/reference/mmrm_tmb_methods.html @@ -1,5 +1,25 @@ - -Methods for mmrm_tmb Objects — mmrm_tmb_methods • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -88,7 +116,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm_tmb
     coef(object, complete = TRUE, ...)
     
    @@ -124,8 +153,10 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM object.

    @@ -162,17 +193,21 @@

    Arguments -

    Value

    +

    Value +

    Depends on the method, see Functions.

    -

    Functions

    +

    Functions +

    -
    • coef(mmrm_tmb): obtains the estimated coefficients.

    • +
        +
      • coef(mmrm_tmb): obtains the estimated coefficients.

      • fitted(mmrm_tmb): obtains the fitted values.

      • model.frame(mmrm_tmb): obtains the model frame.

      • logLik(mmrm_tmb): obtains the attained log likelihood value.

      • @@ -194,11 +229,14 @@

        Functions -

        References

        +

        References +

        -
    + +
    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- fit_mmrm(formula, fev_data, weights = rep(1, nrow(fev_data)))
     # Estimated coefficients:
    @@ -1536,22 +1576,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.2.2/reference/refit_multiple_optimizers.html b/v0.2.2/reference/refit_multiple_optimizers.html index 8a4faaa1b..532d19862 100644 --- a/v0.2.2/reference/refit_multiple_optimizers.html +++ b/v0.2.2/reference/refit_multiple_optimizers.html @@ -1,5 +1,25 @@ - -Refitting MMRM with Multiple Optimizers — refit_multiple_optimizers • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -88,13 +116,16 @@
    -

    Usage

    +

    Usage +

    refit_multiple_optimizers(fit, ..., control = mmrm_control(...))
    -

    Arguments

    -
    fit
    +

    Arguments +

    +
    +
    fit

    (mmrm_fit)
    original model fit from fit_single_optimizer().

    @@ -105,20 +136,24 @@

    Arguments -

    Value

    +

    Value +

    The best (in terms of log likelihood) fit which converged.

    -

    Note

    +

    Note +

    For Windows, no parallel computations are currently implemented.

    -

    Examples

    +

    Examples +

    fit <- fit_single_optimizer(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data,
    @@ -129,22 +164,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.0/404.html b/v0.3.0/404.html index 074f2d499..8b0357d4f 100644 --- a/v0.3.0/404.html +++ b/v0.3.0/404.html @@ -1,5 +1,4 @@ - - + @@ -81,11 +80,10 @@ Changelog +v0.2.2 + + - + + - + @@ -110,46 +136,66 @@

    Thank you for your interest in contributing to this repo! Your contribution is highly valued. Please go through this document for guidance on how to contribute.

    -

    Programming conventions

    +

    Programming conventions +

    Please follow the programming conventions to ensure a consistent programming style across the package.

    Generally we follow the tidyverse style guide. Some specific conventions that deviate from this are explained below.

    -

    Functions

    -
    1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
    2. +

      Functions +

      +
        +
      1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
      2. Functions starting with h_ are helper functions and they should not be exported.
      3. Functions should be well documented using roxygen2 (even when they are not exported).
      4. Functions must be unit tested (even when they are not exported).
      5. -
    + +
    -

    Imports

    +

    Imports +

    In package mmrm, we follow the following convention in package imports.

    -
    1. When only a few functions from another package are needed: -
      1. In DESCRIPTION, add that package into Imports.
      2. +
          +
        1. When only a few functions from another package are needed: +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we add a importFrom with a single function from the package. -
            1. The function imported can be any random function within the package.
            2. -
          3. +
              +
            1. The function imported can be any random function within the package.
            2. +
            +
          4. Always use package::function style wherever you need to use the function.
          5. Example: stats.
          6. -
        2. +
        +
      3. When many functions from another package are needed: -
        1. In DESCRIPTION, add that package into Imports.
        2. +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we use a import to import every function.
          3. Use the functions directly without prefix.
          4. Example: checkmate.
          5. -
          -
    + + + +
    -

    Comments

    -
    • Comments should always follow sentence style.
    • +

      Comments +

      +
        +
      • Comments should always follow sentence style.
      • Comments should be as minimal as possible: Generally the code and variable names should be clear enough to not need any comments. Only use them when needed and explain the “Why” and not the “What”.
      • -
    + +
    -

    Documentation

    -
    • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

    • +

      Documentation +

      +
        +
      • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

      • Exported objects must have a lifecycle badge to clarify the maturity.

        -
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • -
      • +
          +
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • +
        +
      • Use Title Style for the title of the documentation.

      • Always include a @description part with at least one sentence describing the object.

      • @@ -161,38 +207,55 @@

        Documentationwebsite.

      • In vignettes, you cannot directly reference help pages but only pkgdown web pages. Note that this includes only exported objects. To make it look similar to the help page references, please here also use function() style.

      • mmrm_review_methods.Rmd is a large vignette and we precompute this vignette to make the GitHub actions faster. Run the script vignettes/precompile.R to regenerate the precomputed vignette and subsequently update it in GitHub. Before every release we need to run this again. Please note you need to install the package and then compile the vignette because efficiency is better after installation to provide a fair comparison.

      • -
    + +
    -

    Github conventions

    +

    Github conventions +

    When using GitHub to collaborate, the following conventions are needed:

    -
    1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. -
      • If you are going to work on this issue, please assign yourself.
      • -
    2. +
        +
      1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. +
          +
        • If you are going to work on this issue, please assign yourself.
        • +
        +
      2. Please create a branch in the mmrm repository, instead of creating forks, unless you are not yet a team member. -
        • Branches should be associated with a GitHub issue and linked to an issue id.
        • +
            +
          • Branches should be associated with a GitHub issue and linked to an issue id.
          • The name of a branch should be of the form: <issue_id>_<short_discription>.
          • -
          +
        +
      3. Add changes to the branch and push it to GitHub. -
        • Please use clear commit messages.
        • +
            +
          • Please use clear commit messages.
          • Please keep your changes focused on the issue. If there are independent changes, please separate it into another PR linking to another issue.
          • -
          +
        +
      4. Please create a Pull Request when you think your code changes are ready: -
        • Functions are well documented.
        • +
            +
          • Functions are well documented.
          • Functions have corresponding unit tests.
          • Changes pass all the GitHub action checks.
          • The checklist in the corresponding issue is completed.
          • -
          +
        +
      5. Address all the comments you receive. -
        • at least one approval is needed to merge.
        • -
      6. -
    +
      +
    • at least one approval is needed to merge.
    • +
    + + +
    -

    Contribution tips

    +

    Contribution tips +

    -

    Development environment Set-up

    +

    Development environment Set-up +

    The development this mmrm package is based on the latest R version and C++ compilers. The package dependencies are the most recent versions from CRAN. We recommend that your working environment is set up in the same way. Additionally, there are some tools we recommend you to install:

    -
    1. +
        +
      1. RTools if you work on a Windows operating system. Alternatively you can use docker to separate the operating system and the development system.
      2. GitKraken is a very useful user interface for git including visualization of git commit graphs, file history, etc.
      3. @@ -200,43 +263,82 @@

        Development environment Set-uplintr will allow you to perform static code analysis.
      4. pre-commit is a Python module that allows you to identify issues before you commit locally.
      5. -

    + +
    -

    Issue labels

    +

    Issue labels +

    The issues are categorized with several labels:

    - +
    Label name
    ++++ + + - + + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + -
    Label name Description
    SPx
    SPx SP (story points) indicate complexity, and the larger the subsequent number, the more time consuming the issue is expected to be
    priority
    priority Issues with this label should be completed with higher priority
    good first issue
    good first issue Good choices for new team members
    blocked
    blocked Blocked by other issues
    bug
    bug Something isn’t working
    devops
    devops Development and Operation
    discussion
    discussion Discussion needed
    documentation
    documentation Improvement of documentation is needed
    duplicate
    duplicate The issue already exists
    enhancement
    enhancement New feature or request
    help wanted
    help wanted Extra attention is needed
    invalid
    invalid This doesn’t seem right
    question
    question Further information needed

    Please choose an issue based on your interest, issue complexity, and priority.

    + + + +

    Please choose an issue based on your interest, issue complexity, and priority.

    -

    Add new unit tests

    +

    Add new unit tests +

    To add a new unit test, you need to first identify the test scope. Does the test fit in the scope of existing tests? If so, please modify the existing test files under tests/testthat/ folder or src/ folder, depending on whether the code to be tested is R or C++. Otherwise please create a new test file, with a name prefix of “test-”.

    In each test case, use the following structure:

    @@ -249,19 +351,25 @@ 

    Add new unit tests -

    Add integration tests

    +

    Add integration tests +

    Integration tests compare the results of SAS and R and assures the quality of our code. To add an integration test, you need to do the following:

    -
    1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
    2. +
        +
      1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
      2. Save the results in .txt format in the design/SAS/ folder.
      3. Decide the key outputs that are needed for comparison.
      4. Add a unit test verifying that the R implementation of the same model has the same results (conversion may be needed).
      5. -
    + +
    -

    Get started with C++

    +

    Get started with C++ +

    If you have no experience with C++, it is totally fine: TMB has provided us with many high-level functionalities that is very similar to R. Here we only list the most important things that you need to go through before you begin C++ programming.

    -
    1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
    2. +
        +
      1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
      2. Types. C++ is a strong type programming language and all objects need to be declared with type. Sometimes you can combine the declaration and definition. -
        1. +
            +
          1. int i = 1; This works, as we declare i as int and define it to be 1.
          2. i = 1; This fails, because i is not declared yet.
          3. @@ -269,53 +377,70 @@

            Get started with C++
          4. in R, if (TRUE) { a = '123' }; print(a) is legal.
          5. +
              +
            1. in R, if (TRUE) { a = '123' }; print(a) is legal.
            2. in C++, if (1) {string a = '123'}; std::stdout << a << std::endl; is illegal, because object a is terminated already.
            3. in C++, string a; if (1) {a = '123'}; std::stdout << a << std::endl; is legal, a is declared prior to if statement.
            4. -
            +

          +
        2. Polymorphism. Unlike in R, where function arguments have no explicitly defined types, in C++ the type of each argument of a function must be pre-specified. -
          1. +
              +
            1. Template is a special function that works with generic argument type. We could imagine a single function that could work on arguments of arbitrary type, and template functions make this possible through separation of function logic from the argument declaration. In this way we can use template functions and avoid the need to replicate the whole code for each type.
            2. -
          2. -

          With these points in mind, you are about ready to go.

          +
        +
      3. +
      +

      With these points in mind, you are about ready to go.

    -

    Get started with TMB

    +

    Get started with TMB +

    In mmrm we are not including any latent variables and so the Laplace approximation aspect of TMB is not used. We only use the automatic differentiation part of TMB. For detailed documentation of TMB, visit the TMB reference.

    One important feature of TMB are the R style matrix/array calculations. This is important because we mainly use this part to conduct our calculations. See matrix_arrays.cpp for examples.

    -

    Add a new covariance structure

    +

    Add a new covariance structure +

    To add a new covariance structure, you need to do the following:

    -
    1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
    2. +
        +
      1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
      2. Implement the covariance structure on the C++ side and the corresponding R interface.
      3. Add unit tests to make sure the new covariance structure is working as expected.
      4. Add integration tests under design/SAS/ folder to make sure SAS and R produce similar results (within tolerance).
      5. -
    + +
    -

    Add additional data

    +

    Add additional data +

    To add additional data to mmrm, please follow the next steps:

    -
    1. Make sure the data is needed.
    2. +
        +
      1. Make sure the data is needed.
      2. Document the data in R/data.R.
      3. Use save to create an rda data only containing this dataset. Here the function usethis::use_data can also be helpful.
      4. -
    + +
    -

    Communications within team

    +

    Communications within team +

    There are several communication channels, please use appropriate ones.

    -

    GitHub

    +

    GitHub +

    GitHub issues and pull requests are where implementations are discussed and reviewed. Feature requests, bugs, enhancements, technical implementations can be discussed here. When you have ideas that needs to be documented, it is better to have them in GitHub.

    -

    Slack

    +

    Slack +

    Slack is a messaging tool and we have the mmrm channel under the rinpharma space. You can put anything in the slack channel, e.g., you have completed a issue and are waiting for review, or you have some questions and don’t want to wait until the next stand-up meeting.

    To join the slack channel, please make sure you have a slack account, and send the email address to any team member.

    -

    Stand-up meetings

    +

    Stand-up meetings +

    We have stand-up meetings currently three times a week. The purpose of stand-up meetings is for team members to discuss the current work progress and raise any issue/questions for team discussion if needed.

    You don’t need to join all three meetings.

    @@ -323,22 +448,26 @@

    Stand-up meetings

    + + + + - - + + diff --git a/v0.3.0/PULL_REQUEST_TEMPLATE.html b/v0.3.0/PULL_REQUEST_TEMPLATE.html index ded976077..662fb2aeb 100644 --- a/v0.3.0/PULL_REQUEST_TEMPLATE.html +++ b/v0.3.0/PULL_REQUEST_TEMPLATE.html @@ -1,5 +1,23 @@ - -Description • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +44,8 @@ + - + + - + @@ -111,22 +137,26 @@ - + +
    -
    + + - - + + diff --git a/v0.3.0/articles/algorithm.html b/v0.3.0/articles/algorithm.html index e8e42e343..36f63a8cd 100644 --- a/v0.3.0/articles/algorithm.html +++ b/v0.3.0/articles/algorithm.html @@ -1,5 +1,4 @@ - - + @@ -83,11 +82,10 @@ Changelog +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + - + + - + @@ -109,73 +135,101 @@

    Introduction

    -
    Package Introduction
    +
    +
    Package Introduction
    -
    Mixed Models for Repeated Measures
    + +
    Mixed Models for Repeated Measures
    -
    Comparison with other software
    + +
    Comparison with other software
    -
    + +
    +

    Covariance Structures

    -
    Covariance Structures
    +
    +
    Covariance Structures
    -
    + + + + + + + + + + + + + + + + +
    -
    + + - - + + diff --git a/v0.3.0/articles/introduction.html b/v0.3.0/articles/introduction.html index 67cb48c77..df826d734 100644 --- a/v0.3.0/articles/introduction.html +++ b/v0.3.0/articles/introduction.html @@ -1,5 +1,4 @@ - - + @@ -83,11 +82,10 @@ Changelog +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + - + + - + @@ -108,7 +134,8 @@

    Authors

    -
    • +
        +
      • Daniel Sabanes Bove. Author, maintainer.

      • @@ -180,7 +207,8 @@

        Authors

        AstraZeneca plc. Copyright holder, funder.

        -
    + +

    Citation

    @@ -199,22 +227,26 @@

    Citation

    }
    + +
    -
    + + - - + + diff --git a/v0.3.0/index.html b/v0.3.0/index.html index 4c6821e2c..23a6888bb 100644 --- a/v0.3.0/index.html +++ b/v0.3.0/index.html @@ -1,5 +1,4 @@ - - + @@ -107,11 +106,10 @@ Changelog +v0.2.2 + + - + + - + @@ -107,10 +133,13 @@
    -

    mmrm 0.3.0

    +

    mmrm 0.3.0 +

    -

    New Features

    -
    • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
    • +

      New Features +

      +
        +
      • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
      • Add empirical, empirical Jackknife and empirical bias-reduced adjusted coefficients covariance estimates, which can be specified via the new vcov argument of mmrm().
      • Add residual and between-within degrees of freedom methods.
      • Add Kenward-Roger support for spatial covariance structures.
      • @@ -121,74 +150,103 @@

        New FeaturesAdd tidy(), glance() and augment() methods to tidy the fit results into summary tables.
      • Add tidymodels framework support via a parsnip interface.
      • Add argument covariance to mmrm() to allow for easier programmatic access to specifying the model’s covariance structure and to expose covariance customization through the tidymodels interface.
      • -

    + +
    -

    Bug Fixes

    -
    • Previously mmrm() follows the global option na.action and if it is set other than "na.omit" an assertion would fail. This is now fixed and hence NA values are always removed prior to model fitting, independent of the global na.action option.
    • +

      Bug Fixes +

      +
        +
      • Previously mmrm() follows the global option na.action and if it is set other than "na.omit" an assertion would fail. This is now fixed and hence NA values are always removed prior to model fitting, independent of the global na.action option.
      • Previously a model.frame() call on an mmrm object with transformed terms, or new data, e.g. model.frame(mmrm(Y ~ log(X) + ar1(VISIT|ID), data = new_data), would fail. This is now fixed.
      • Previously mmrm() always required a data argument. Now fitting mmrm can also use environment variables instead of requiring data argument. (Note that fit_mmrm is not affected.)
      • Previously emmeans() failed when using transformed terms or not including the visit variable in the model formula. This is now fixed.
      • Previously mmrm() might provide non-finite values in the Jacobian calculations, leading to errors in the Satterthwaite degrees of freedom calculations. This will raise an error now and thus alert the user that the model fit was not successful.
      • -
    + +
    -

    Miscellaneous

    -
    • Use automatic differentiation to calculate Satterthwaite adjusted degrees of freedom, resulting in 10-fold speed-up of the Satterthwaite calculations after the initial model fit.
    • +

      Miscellaneous +

      +
        +
      • Use automatic differentiation to calculate Satterthwaite adjusted degrees of freedom, resulting in 10-fold speed-up of the Satterthwaite calculations after the initial model fit.
      • Add an interactive confirmation step if the number of visit levels is too large for non-spatial covariance structures. Use options(mmrm.max_visits = ) to specify the maximum number of visits allowed in non-interactive mode.
      • Removed free_cores() in favor of parallelly::availableCores(omit = 1).
      • The model.frame() method has been updated: The full argument is deprecated and the include argument can be used instead; by default all relevant variables are returned. Furthermore, it returns a data.frame the size of the number of observations utilized in the model for all combinations of the include argument when na.action= "na.omit".
      • -
    + +
    -

    mmrm 0.2.2

    CRAN release: 2022-12-20

    +

    mmrm 0.2.2 +

    +

    CRAN release: 2022-12-20

    -

    New Features

    -
    • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
    • +

      New Features +

      +
        +
      • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
      • Update the mmrm arguments to allow users more fine-grained control, e.g. mmrm(..., start = start, optimizer = c("BFGS", "nlminb")) to set the starting values for the variance estimates and to choose the available optimizers. These arguments will be passed to the new function mmrm_control.
      • Add new argument drop_visit_levels to allow users to keep all levels in visits, even when they are not observed in the data. Dropping unobserved levels was done silently previously, and now a message will be given. See ?mmrm_control for more details.
      • -
    + +
    -

    Bug Fixes

    -
    • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
    • +

      Bug Fixes +

      +
        +
      • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
      • Previously in mmrm calls, the weights object in the environment where the formula is defined was replaced by the weights used internally. Now this behavior is removed and your variable weights e.g. in the global environment will no longer be replaced.
      • -
    + +
    -

    Miscellaneous

    -
    • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
    • +

      Miscellaneous +

      +
        +
      • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
      • Deprecated optimizer = "automatic" in favor of not specifying the optimizer. By default, all remaining optimizers will be tried if the first optimizer fails to reach convergence.
      • -
    + +
    -

    mmrm 0.1.5

    CRAN release: 2022-10-18

    -
    • First CRAN version of the package.
    • +

      mmrm 0.1.5 +

      +

      CRAN release: 2022-10-18

      +
        +
      • First CRAN version of the package.
      • The package fits mixed models for repeated measures (MMRM) based on the marginal linear model without random effects.
      • The motivation for this package is to have a fast, reliable (in terms of convergence behavior) and feature complete implementation of MMRM in R.
      • -
      -

      New Features

      -
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • +
      +
      +

      New Features +

      +
        +
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • Fast C++ implementation of Maximum Likelihood (ML) and Restricted Maximum Likelihood (REML) estimation.
      • Currently Satterthwaite adjusted degrees of freedom calculation is supported.
      • Interface to the emmeans package for computing estimated marginal means (also called least-square means) for the coefficients.
      • Multiple optimizers are run to reach convergence in as many cases as possible.
      • Flexible formula based model specification and support for standard S3 methods such as summary, logLik, etc.
      • -
      +
    +
    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/COV_TYPES.html b/v0.3.0/reference/COV_TYPES.html index a27221c4b..2e174ab3d 100644 --- a/v0.3.0/reference/COV_TYPES.html +++ b/v0.3.0/reference/COV_TYPES.html @@ -1,5 +1,25 @@ - -Covariance Type Database — COV_TYPES • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,14 +140,17 @@
    -

    Usage

    +

    Usage +

    COV_TYPES
    -

    Format

    +

    Format +

    A data frame with 5 variables and one record per covariance type:

    -
    name
    +
    +
    name

    The long-form name of the covariance structure type

    abbr
    @@ -138,25 +169,30 @@

    Format<

    A logical value indicating whether the covariance structure is spatial.

    -

    + + + +
    -
    + + - - + + diff --git a/v0.3.0/reference/as.cov_struct.html b/v0.3.0/reference/as.cov_struct.html index 9639adac4..dc861ee1b 100644 --- a/v0.3.0/reference/as.cov_struct.html +++ b/v0.3.0/reference/as.cov_struct.html @@ -1,5 +1,25 @@ - -Coerce into a Covariance Structure Definition — as.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    as.cov_struct(x, ...)
     
     # S3 method for formula
    @@ -120,8 +149,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    an object from which to derive a covariance structure. See object specific sections for details.

    @@ -134,44 +165,66 @@

    Arguments -

    Value

    +

    Value +

    A cov_struct() object.

    -

    Details

    +

    Details +

    A covariance structure can be parsed from a model definition formula or call. Generally, covariance structures defined using non-standard evaluation take the following form:

    -

    type( (visit, )* visit | (group /)? subject )

    +

    +
    +
    type( (visit, )* visit | (group /)? subject )
    +

    +

    For example, formulas may include terms such as

    -

    us(time | subject)
    +

    +
    +
    us(time | subject)
     cp(time | group / subject)
    -sp_exp(coord1, coord2 | group / subject)

    +sp_exp(coord1, coord2 | group / subject)
    +

    +

    Note that only sp_exp (spatial) covariance structures may provide multiple coordinates, which identify the Euclidean distance between the time points.

    -

    Methods (by class)

    +

    Methods (by class) +

    -
    • as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be +

        +
      • +

        as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be covariance structure definitions and must follow the form:

        -

        y ~ xs + type( (visit, )* visit | (group /)? subject )

        +

        +
        +
        y ~ xs + type( (visit, )* visit | (group /)? subject )
        +

        +

        Any component on the right hand side of a formula is considered when -searching for a covariance definition.

      • -
    +searching for a covariance definition.

    + + +
    -

    See also

    +

    See also +

    Other covariance types: cov_struct(), covariance_types

    -

    Examples

    +

    Examples +

    # provide a covariance structure as a right-sided formula
     as.cov_struct(~ csh(visit | group / subject))
     #> <covariance structure>
    @@ -191,22 +244,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.0/reference/bcva_data.html b/v0.3.0/reference/bcva_data.html index 42dd9fa00..9e02d7744 100644 --- a/v0.3.0/reference/bcva_data.html +++ b/v0.3.0/reference/bcva_data.html @@ -1,5 +1,25 @@ - -Example Data on BCVA — bcva_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,48 +140,59 @@
    -

    Usage

    +

    Usage +

    bcva_data
    -

    Format

    -

    A tibble with 10,000 rows and 7 variables:

    • USUBJID: subject ID.

    • +

      Format +

      +

      A tibble with 10,000 rows and 7 variables:

      +
        +
      • USUBJID: subject ID.

      • VISITN: visit number (numeric).

      • AVISIT: visit number (factor).

      • ARMCD: treatment, TRT or CTL.

      • RACE: 3-category race.

      • BCVA_BL: BCVA at baseline.

      • BCVA_CHG: Change in BCVA at study visits.

      • -
    + +
    -

    Source

    +

    Source +

    This is an artificial dataset.

    -

    Note

    +

    Note +

    Measurements of BCVA (best corrected visual acuity) is a measure of how how many letters a person can read off of an eye chart using corrective lenses or contacts. This a common endpoint in ophthalmology trials.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/cached_mmrm_results.html b/v0.3.0/reference/cached_mmrm_results.html index 263d620a9..664d7de77 100644 --- a/v0.3.0/reference/cached_mmrm_results.html +++ b/v0.3.0/reference/cached_mmrm_results.html @@ -1,5 +1,25 @@ - -Cache Data for mmrm Model Comparison — cached_mmrm_results • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,25 +140,32 @@
    -

    Usage

    +

    Usage +

    cached_mmrm_results
    -

    Format

    -

    A list with following elements:

    • conv_time_fev: Convergence time on FEV data.

    • +

      Format +

      +

      A list with following elements:

      +
        +
      • conv_time_fev: Convergence time on FEV data.

      • conv_time_bcva: Convergence time on BCVA data.

      • rel_diff_ests_tbl_fev: Relative difference in estimates on FEV data.

      • rel_diff_ests_tbl_bcva: Relative difference in estimates on BCVA data.

      • conv_rate: Convergence rate on data with different missing levels.

      • df_missingness: Summary of missingness on simulated data.

      • -
    + +
    -

    Source

    +

    Source +

    This is created based on simulations on FEV data and BCVA data.

    -

    Note

    +

    Note +

    The cached data for comparison is used for the vignettes generation. Please make sure that this data is refreshed before each package release by running the script data-raw/mmrm_review.R. @@ -139,22 +174,26 @@

    Note

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/check_package_version.html b/v0.3.0/reference/check_package_version.html index 0d9d53378..cacb9f20b 100644 --- a/v0.3.0/reference/check_package_version.html +++ b/v0.3.0/reference/check_package_version.html @@ -1,5 +1,25 @@ - -Check Suggested Dependency Against Version Requirements — check_package_version • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    check_package_version(pkg, ver = c(NA, NA))
    -

    Arguments

    -
    pkg
    +

    Arguments +

    +
    +
    pkg

    (string)
    A package name.

    @@ -128,9 +159,11 @@

    Arguments -

    Value

    +

    Value +

    A logical (invisibly) indicating whether the loaded package meets @@ -138,22 +171,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/component.html b/v0.3.0/reference/component.html index 5d26028bb..30414f0c4 100644 --- a/v0.3.0/reference/component.html +++ b/v0.3.0/reference/component.html @@ -1,5 +1,25 @@ - -Component Access for mmrm_tmb Objects — component • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    component(
       object,
       name = c("cov_type", "subject_var", "n_theta", "n_subjects", "n_timepoints", "n_obs",
    @@ -124,24 +153,31 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    name

    (character)
    the component(s) to be retrieved.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding component of the object, see details.

    -

    Details

    -

    Available component() names are as follows:

    • call: low-level function call which generated the model.

    • +

      Details +

      +

      Available component() names are as follows:

      +
    + +
    -

    See also

    +

    See also +

    In the lme4 package there is a similar function getME().

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -3079,22 +3118,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.0/reference/cov_struct.html b/v0.3.0/reference/cov_struct.html index d5a0b4e1c..9a1401c7a 100644 --- a/v0.3.0/reference/cov_struct.html +++ b/v0.3.0/reference/cov_struct.html @@ -1,5 +1,25 @@ - -Define a Covariance Structure — cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    cov_struct(
       type = cov_types(),
       visits,
    @@ -123,8 +152,10 @@ 

    Usage

    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    the name of the covariance structure type to use. For available options, see cov_types(). If a type abbreviation is used that implies heterogeneity (e.g. cph) and no value is provided to @@ -150,22 +181,26 @@

    Arguments -

    Value

    +

    Value +

    A cov_struct object.

    -

    See also

    +

    See also +

    Other covariance types: as.cov_struct(), covariance_types

    -

    Examples

    +

    Examples +

    cov_struct("csh", "AVISITN", "USUBJID")
     #> <covariance structure>
     #> heterogeneous compound symmetry:
    @@ -182,22 +217,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.0/reference/cov_type_abbr.html b/v0.3.0/reference/cov_type_abbr.html index be22ee310..1d0891f9c 100644 --- a/v0.3.0/reference/cov_type_abbr.html +++ b/v0.3.0/reference/cov_type_abbr.html @@ -1,5 +1,25 @@ - -Retrieve Associated Abbreviated Covariance Structure Type Name — cov_type_abbr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    cov_type_abbr(type)
    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    either a full name or abbreviate covariance structure type name to collapse into an abbreviated type.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding abbreviated covariance type name.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/cov_type_name.html b/v0.3.0/reference/cov_type_name.html index 96aa576bb..49c97eb59 100644 --- a/v0.3.0/reference/cov_type_name.html +++ b/v0.3.0/reference/cov_type_name.html @@ -1,5 +1,25 @@ - -Retrieve Associated Full Covariance Structure Type Name — cov_type_name • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    cov_type_name(type)
    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    either a full name or abbreviate covariance structure type name to convert to a long-form type.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding abbreviated covariance type name.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/covariance_types.html b/v0.3.0/reference/covariance_types.html index d15095db8..6e9e2a3fc 100644 --- a/v0.3.0/reference/covariance_types.html +++ b/v0.3.0/reference/covariance_types.html @@ -1,5 +1,25 @@ - -Covariance Types — covariance_types • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    cov_types(
       form = c("name", "abbr", "habbr"),
       filter = c("heterogeneous", "spatial")
    @@ -120,8 +149,10 @@ 

    Usage

    -

    Arguments

    -
    form
    +

    Arguments +

    +
    +
    form

    (character)
    covariance structure type name form. One or more of "name", "abbr" (abbreviation), or "habbr" (heterogeneous abbreviation).

    @@ -131,67 +162,155 @@

    Arguments or "spatial".

    -

    + +
    -

    Value

    +

    Value +

    A character vector of accepted covariance structure type names and abbreviations.

    -

    Note

    +

    Note +

    The ante-dependence covariance structure in this package refers to homogeneous ante-dependence, while the ante-dependence covariance structure from SAS PROC MIXED refers to heterogeneous ante-dependence and the homogeneous version is not available in SAS.

    For all non-spatial covariance structures, the time variable must -be coded as a factor.

    -

    Spatial Covariance structures:

    +be coded as a factor.

    +
    +

    Spatial Covariance structures: +

    -
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)

    where \(d_{ij}\) denotes the Euclidean distance between time points + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)
    +

    where \(d_{ij}\) denotes the Euclidean distance between time points \(i\) and \(j\).

    -

    Abbreviations for Covariance Structures

    +

    Abbreviations for Covariance Structures +

    -

    Common Covariance Structures:

    +

    Common Covariance Structures: +

    -
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)
    +

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, respectively, out of total \(m\) time points, \(1 \leq i, j \leq m\).

    -

    See also

    +

    See also +

    Other covariance types: as.cov_struct(), cov_struct()

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/df_1d.html b/v0.3.0/reference/df_1d.html index 874eab394..bddc10284 100644 --- a/v0.3.0/reference/df_1d.html +++ b/v0.3.0/reference/df_1d.html @@ -1,9 +1,29 @@ - - + + + + + +Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm +Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    df_1d(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -133,16 +164,19 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -168,22 +202,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.0/reference/df_md.html b/v0.3.0/reference/df_md.html index bb4ca632a..ae651bda6 100644 --- a/v0.3.0/reference/df_md.html +++ b/v0.3.0/reference/df_md.html @@ -1,11 +1,31 @@ - - + + + + + +Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm +Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -121,13 +149,16 @@
    -

    Usage

    +

    Usage +

    df_md(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -137,16 +168,19 @@

    Arguments -

    Value

    +

    Value +

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

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -169,22 +203,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.0/reference/drop_elements.html b/v0.3.0/reference/drop_elements.html index cb8b7b432..902553f09 100644 --- a/v0.3.0/reference/drop_elements.html +++ b/v0.3.0/reference/drop_elements.html @@ -1,5 +1,25 @@ - -Drop Items from an Indexible — drop_elements • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    drop_elements(x, n)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    Any object that can be consumed by seq_along() and indexed by a logical vector of the same length.

    @@ -126,31 +157,37 @@

    Arguments -

    Value

    +

    Value +

    A subset of x.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/emit_tidymodels_register_msg.html b/v0.3.0/reference/emit_tidymodels_register_msg.html index e1905c1d4..124c901e0 100644 --- a/v0.3.0/reference/emit_tidymodels_register_msg.html +++ b/v0.3.0/reference/emit_tidymodels_register_msg.html @@ -1,5 +1,25 @@ - -Format a Message to Emit When Tidymodels is Loaded — emit_tidymodels_register_msg • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,12 +140,14 @@
    -

    Usage

    +

    Usage +

    emit_tidymodels_register_msg()
    -

    Value

    +

    Value +

    A character message to emit. Either a ansi-formatted cli output if @@ -125,22 +155,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/emmeans_support.html b/v0.3.0/reference/emmeans_support.html index d9de9c1ac..4d2abdcc6 100644 --- a/v0.3.0/reference/emmeans_support.html +++ b/v0.3.0/reference/emmeans_support.html @@ -1,11 +1,31 @@ - - + + + + + +Support for emmeans — emmeans_support • mmrm +Support for emmeans — emmeans_support • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - +
    @@ -123,7 +152,8 @@
    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -156,22 +186,26 @@ 

    Examples#> Confidence level used: 0.95

    -
    + +
    + + - - + + diff --git a/v0.3.0/reference/fev_data.html b/v0.3.0/reference/fev_data.html index 72037f4aa..49626e284 100644 --- a/v0.3.0/reference/fev_data.html +++ b/v0.3.0/reference/fev_data.html @@ -1,5 +1,25 @@ - -Example Data on FEV1 — fev_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,17 @@
    -

    Usage

    +

    Usage +

    fev_data
    -

    Format

    -

    A tibble with 800 rows and 7 variables:

    • USUBJID: subject ID.

    • +

      Format +

      +

      A tibble with 800 rows and 7 variables:

      +
        +
      • USUBJID: subject ID.

      • AVISIT: visit number.

      • ARMCD: treatment, TRT or PBO.

      • RACE: 3-category race.

      • @@ -126,35 +158,42 @@

        Format<
      • FEV1_BL: FEV1 at baseline (%).

      • FEV1: FEV1 at study visits.

      • WEIGHT: weighting variable.

      • -

    + +
    -

    Source

    +

    Source +

    This is an artificial dataset.

    -

    Note

    +

    Note +

    Measurements of FEV1 (forced expired volume in one second) is a measure of how quickly the lungs can be emptied. Low levels of FEV1 may indicate chronic obstructive pulmonary disease (COPD).

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/fill_names.html b/v0.3.0/reference/fill_names.html index ecf4469da..338e330d0 100644 --- a/v0.3.0/reference/fill_names.html +++ b/v0.3.0/reference/fill_names.html @@ -1,5 +1,25 @@ - -Complete character Vector Names From Values — fill_names • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    fill_names(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character or list)
    value whose names should be completed from element values.

    -
    + +
    -

    Value

    +

    Value +

    A named vector or list.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/fit_mmrm.html b/v0.3.0/reference/fit_mmrm.html index ff57850cd..da3696ff6 100644 --- a/v0.3.0/reference/fit_mmrm.html +++ b/v0.3.0/reference/fit_mmrm.html @@ -1,11 +1,31 @@ - - + + + + + +Low-Level Fitting Function for MMRM — fit_mmrm • mmrm +Low-Level Fitting Function for MMRM — fit_mmrm • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -121,7 +149,8 @@
    -

    Usage

    +

    Usage +

    fit_mmrm(
       formula,
       data,
    @@ -135,8 +164,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    model formula with exactly one special term specifying the visits within subjects, see details.

    @@ -175,15 +206,18 @@

    Argumentsmmrm_control().

    -

    + +
    -

    Value

    +

    Value +

    List of class mmrm_tmb, see h_mmrm_tmb_fit() for details.

    + + - - + + diff --git a/v0.3.0/reference/fit_single_optimizer.html b/v0.3.0/reference/fit_single_optimizer.html index 0a28b1545..d873fa60d 100644 --- a/v0.3.0/reference/fit_single_optimizer.html +++ b/v0.3.0/reference/fit_single_optimizer.html @@ -1,9 +1,29 @@ - - + + + + + +Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm +Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,7 +146,8 @@
    -

    Usage

    +

    Usage +

    fit_single_optimizer(
       formula,
       data,
    @@ -133,8 +162,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -174,9 +205,11 @@

    Arguments -

    Value

    +

    Value +

    The mmrm_fit object, with additional attributes containing warnings, @@ -184,7 +217,8 @@

    Value

    mmrm_tmb
    contents.

    + +
    - - + + diff --git a/v0.3.0/reference/flat_expr.html b/v0.3.0/reference/flat_expr.html index 2ce80271c..20c657d6d 100644 --- a/v0.3.0/reference/flat_expr.html +++ b/v0.3.0/reference/flat_expr.html @@ -1,11 +1,31 @@ - - + + + + + +Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm +Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -121,61 +149,86 @@
    -

    Usage

    +

    Usage +

    flatten_call(call)
     
     flatten_expr(expr)
    -

    Arguments

    -
    call, expr
    +

    Arguments +

    +
    +
    call, expr

    (language)
    a language object to flatten.

    -
    + +
    -

    Value

    +

    Value +

    A list of atomic values, symbols, infix operator names and subexpressions.

    -

    Details

    +

    Details +

    Where 1 + 2 | 3 in R's syntax tree is (|, (+, 1, 2), 3), flattening it into its visual order produces (1, +, 2, |, 3), which makes for more fluent interpretation of non-standard grammar rules used in formulas.

    -

    Functions

    +

    Functions +

    -
    • flatten_call(): Flatten a call into a list of names and argument expressions.

      +
        +
      • +

        flatten_call(): Flatten a call into a list of names and argument expressions.

        The call name and all arguments are flattened into the same list, meaning a call of the form sp_exp(a, b, c | d / e) produces a list of the form (sp_exp, a, b, c, |, d, /, e).

        -

        flatten_call(quote(sp_exp(a, b, c | d / e)))

      • -
      • flatten_expr(): Flatten nested expressions

        -

        flatten_expr(quote(1 + 2 + 3 | 4))

      • -
    +

    +
    +
    flatten_call(quote(sp_exp(a, b, c | d / e)))
    +

    +
    + +
  • +

    flatten_expr(): Flatten nested expressions

    +

    +
    +
    flatten_expr(quote(1 + 2 + 3 | 4))
    +

    +
    +
  • + + + +
    -
    + + - - + + diff --git a/v0.3.0/reference/format.cov_struct.html b/v0.3.0/reference/format.cov_struct.html index 9bed135c3..96edf94b8 100644 --- a/v0.3.0/reference/format.cov_struct.html +++ b/v0.3.0/reference/format.cov_struct.html @@ -1,5 +1,25 @@ - -Format Covariance Structure Object — format.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,45 +140,54 @@
    -

    Usage

    +

    Usage +

    # S3 method for cov_struct
     format(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    ...

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string for x.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/format_symbols.html b/v0.3.0/reference/format_symbols.html index a46e19244..0c51989a5 100644 --- a/v0.3.0/reference/format_symbols.html +++ b/v0.3.0/reference/format_symbols.html @@ -1,7 +1,27 @@ - -Format Symbol Objects — format_symbols • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,40 +143,49 @@
    -

    Usage

    +

    Usage +

    format_symbols(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character) A vector of variable names.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string of comma-separated variables.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/formula_rhs.html b/v0.3.0/reference/formula_rhs.html index aace46823..edb2e9be8 100644 --- a/v0.3.0/reference/formula_rhs.html +++ b/v0.3.0/reference/formula_rhs.html @@ -1,5 +1,25 @@ - -Extract Right-Hand-Side (rhs) from Formula — formula_rhs • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,47 +140,60 @@
    -

    Usage

    +

    Usage +

    formula_rhs(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula.

    -
    + +
    -

    Value

    +

    Value +

    A formula without a response, derived from the right-hand-side of the formula, f.

    -

    formula_rhs(a ~ b + c)
    -formula_rhs(~ b + c)

    +

    +
    +
    formula_rhs(a ~ b + c)
    +formula_rhs(~ b + c)
    +

    +
    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_add_covariance_terms.html b/v0.3.0/reference/h_add_covariance_terms.html index d9d49d292..ea5c04f21 100644 --- a/v0.3.0/reference/h_add_covariance_terms.html +++ b/v0.3.0/reference/h_add_covariance_terms.html @@ -1,5 +1,25 @@ - -Add Individual Covariance Variables As Terms to Formula — h_add_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_add_covariance_terms(f, covariance)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula to which covariance structure terms should be added.

    @@ -127,37 +158,44 @@

    Arguments -

    Value

    +

    Value +

    A new formula with included covariance terms.

    -

    Details

    +

    Details +

    stats::update() is used to append the covariance structure and the environment attribute will not be changed. This ensures the returned formula and the input formula have the same environment.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_add_terms.html b/v0.3.0/reference/h_add_terms.html index ed2f1e286..6b6f1c8fc 100644 --- a/v0.3.0/reference/h_add_terms.html +++ b/v0.3.0/reference/h_add_terms.html @@ -1,5 +1,25 @@ - -Add Formula Terms with Character — h_add_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_add_terms(f, adds, drop_response = FALSE)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula to be updated.

    @@ -129,37 +160,44 @@

    Arguments -

    Value

    +

    Value +

    A new formula with elements in drops removed.

    -

    Details

    +

    Details +

    Elements in adds will be added from the formula, while the environment of the formula is unchanged. If adds is NULL or character(0), the formula is unchanged.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_coef_table.html b/v0.3.0/reference/h_coef_table.html index e43f4bf39..058447b3c 100644 --- a/v0.3.0/reference/h_coef_table.html +++ b/v0.3.0/reference/h_coef_table.html @@ -1,5 +1,25 @@ - -Coefficients Table for MMRM Fit — h_coef_table • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,18 +140,23 @@
    -

    Usage

    +

    Usage +

    h_coef_table(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    model fit.

    -
    + +
    -

    Value

    +

    Value +

    Matrix with one row per coefficient and columns @@ -131,22 +164,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_confirm_large_levels.html b/v0.3.0/reference/h_confirm_large_levels.html index bdf089427..13651d062 100644 --- a/v0.3.0/reference/h_confirm_large_levels.html +++ b/v0.3.0/reference/h_confirm_large_levels.html @@ -1,7 +1,27 @@ - -Ask for Confirmation on Large Visit Levels — h_confirm_large_levels • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,34 +143,42 @@
    -

    Usage

    +

    Usage +

    h_confirm_large_levels(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (numeric)
    number of visit levels.

    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_construct_model_frame_inputs.html b/v0.3.0/reference/h_construct_model_frame_inputs.html index 00d9a9231..fc3000f18 100644 --- a/v0.3.0/reference/h_construct_model_frame_inputs.html +++ b/v0.3.0/reference/h_construct_model_frame_inputs.html @@ -1,13 +1,33 @@ - - + + + + + +Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm +Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -32,7 +54,8 @@ + - + + - + @@ -124,7 +152,8 @@
    -

    Usage

    +

    Usage +

    h_construct_model_frame_inputs(
       formula,
       data,
    @@ -135,8 +164,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (mmrm)
    mmrm fit object.

    @@ -152,36 +183,45 @@

    Arguments -

    Value

    +

    Value +

    -

    named list with four elements:

    • "formula": the formula including the columns requested in the include= argument.

    • +

      named list with four elements:

      +
        +
      • "formula": the formula including the columns requested in the include= argument.

      • "formula_full": the formula including all columns

      • "data": a data frame including all columns where factor and character columns have been processed with h_factor_ref().

      • "is_full": a logical scalar indicating if the formula and full formula are identical

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_default_value.html b/v0.3.0/reference/h_default_value.html index 16b4bd1de..c894943a3 100644 --- a/v0.3.0/reference/h_default_value.html +++ b/v0.3.0/reference/h_default_value.html @@ -1,9 +1,29 @@ - -Default Value on NULL -Return default value when first argument is NULL. — h_default_value • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,42 +146,51 @@
    -

    Usage

    +

    Usage +

    h_default_value(x, y)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    Object.

    y

    Object.

    -
    + +
    -

    Details

    +

    Details +

    If x is NULL, returns y. Otherwise return x.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_df_1d_bw.html b/v0.3.0/reference/h_df_1d_bw.html index 87fd391e9..7afb3fa23 100644 --- a/v0.3.0/reference/h_df_1d_bw.html +++ b/v0.3.0/reference/h_df_1d_bw.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom for One-Dimensional Contrast — h_df_1d_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_bw(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -127,31 +158,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_df_1d_kr.html b/v0.3.0/reference/h_df_1d_kr.html index be39690f0..d978c7eec 100644 --- a/v0.3.0/reference/h_df_1d_kr.html +++ b/v0.3.0/reference/h_df_1d_kr.html @@ -1,7 +1,27 @@ - -Calculation of Kenward-Roger Degrees of Freedom for One-Dimensional Contrast — h_df_1d_kr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_kr(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -130,31 +161,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_df_1d_res.html b/v0.3.0/reference/h_df_1d_res.html index b47ba95eb..df4ac0e1f 100644 --- a/v0.3.0/reference/h_df_1d_res.html +++ b/v0.3.0/reference/h_df_1d_res.html @@ -1,7 +1,27 @@ - -Calculation of Residual Degrees of Freedom for One-Dimensional Contrast — h_df_1d_res • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_res(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -130,31 +161,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_df_1d_sat.html b/v0.3.0/reference/h_df_1d_sat.html index f4ebb7ac4..1615e83bd 100644 --- a/v0.3.0/reference/h_df_1d_sat.html +++ b/v0.3.0/reference/h_df_1d_sat.html @@ -1,7 +1,27 @@ - -Calculation of Satterthwaite Degrees of Freedom for One-Dimensional Contrast — h_df_1d_sat • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_sat(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -130,31 +161,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_df_bw_calc.html b/v0.3.0/reference/h_df_bw_calc.html index 27a30b849..4027cff2d 100644 --- a/v0.3.0/reference/h_df_bw_calc.html +++ b/v0.3.0/reference/h_df_bw_calc.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom — h_df_bw_calc • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,42 +140,54 @@
    -

    Usage

    +

    Usage +

    h_df_bw_calc(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    -

    List with:

    + + + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_df_md_bw.html b/v0.3.0/reference/h_df_md_bw.html index 4400ac26d..69211f007 100644 --- a/v0.3.0/reference/h_df_md_bw.html +++ b/v0.3.0/reference/h_df_md_bw.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_bw(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_df_md_from_1d.html b/v0.3.0/reference/h_df_md_from_1d.html index 4f8657b37..16532e121 100644 --- a/v0.3.0/reference/h_df_md_from_1d.html +++ b/v0.3.0/reference/h_df_md_from_1d.html @@ -1,5 +1,25 @@ - -Creating F-Statistic Results from One-Dimensional Contrast — h_df_md_from_1d • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,22 +140,27 @@
    -

    Usage

    +

    Usage +

    h_df_md_from_1d(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    model fit.

    contrast

    (numeric)
    one-dimensional contrast.

    -
    + +
    -

    Value

    +

    Value +

    The one-dimensional degrees of freedom are calculated and then @@ -135,22 +168,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_df_md_kr.html b/v0.3.0/reference/h_df_md_kr.html index fa3951621..f442275d2 100644 --- a/v0.3.0/reference/h_df_md_kr.html +++ b/v0.3.0/reference/h_df_md_kr.html @@ -1,5 +1,25 @@ - -Calculation of Kenward-Roger Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_kr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_kr(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_df_md_res.html b/v0.3.0/reference/h_df_md_res.html index 1838e5fbe..34e6b3ff6 100644 --- a/v0.3.0/reference/h_df_md_res.html +++ b/v0.3.0/reference/h_df_md_res.html @@ -1,5 +1,25 @@ - -Calculation of Residual Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_res • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_res(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_df_md_sat.html b/v0.3.0/reference/h_df_md_sat.html index b3d34e72c..cda95c020 100644 --- a/v0.3.0/reference/h_df_md_sat.html +++ b/v0.3.0/reference/h_df_md_sat.html @@ -1,5 +1,25 @@ - -Calculation of Satterthwaite Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_sat • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_sat(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_df_min_bw.html b/v0.3.0/reference/h_df_min_bw.html index 0cd0231cf..10565ee60 100644 --- a/v0.3.0/reference/h_df_min_bw.html +++ b/v0.3.0/reference/h_df_min_bw.html @@ -1,5 +1,25 @@ - -Assign Minimum Degrees of Freedom Given Involved Coefficients — h_df_min_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_min_bw(bw_calc, is_coef_involved)
    -

    Arguments

    -
    bw_calc
    +

    Arguments +

    +
    +
    bw_calc

    (list)
    from h_df_bw_calc().

    @@ -126,9 +157,11 @@

    Arguments -

    Value

    +

    Value +

    The minimum of the degrees of freedom assigned to each involved @@ -136,22 +169,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_df_to_tibble.html b/v0.3.0/reference/h_df_to_tibble.html index f0916f0d1..5b757d031 100644 --- a/v0.3.0/reference/h_df_to_tibble.html +++ b/v0.3.0/reference/h_df_to_tibble.html @@ -1,5 +1,25 @@ - -Coerce a Data Frame to a tibble — h_df_to_tibble • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -112,24 +141,30 @@
    -

    Usage

    +

    Usage +

    h_df_to_tibble(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (data.frame)
    what to coerce.

    -
    + +
    -

    Value

    +

    Value +

    The data as a tibble, potentially with a .rownames column.

    -

    Details

    +

    Details +

    This is only a thin wrapper around tibble::as_tibble(), except giving a useful error message and it checks for rownames and adds them as a new column .rownames if they are not just a numeric sequence as @@ -137,22 +172,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.0/reference/h_drop_covariance_terms.html b/v0.3.0/reference/h_drop_covariance_terms.html index e5221009c..a319b9244 100644 --- a/v0.3.0/reference/h_drop_covariance_terms.html +++ b/v0.3.0/reference/h_drop_covariance_terms.html @@ -1,5 +1,25 @@ - -Drop Formula Terms used for Covariance Structure Definition — h_drop_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,46 +140,56 @@
    -

    Usage

    +

    Usage +

    h_drop_covariance_terms(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula from which covariance terms should be dropped.

    -
    + +
    -

    Value

    +

    Value +

    The formula without accepted covariance terms.

    -

    Details

    +

    Details +

    terms is used and it will preserve the environment attribute. This ensures the returned formula and the input formula have the same environment.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_extract_covariance_terms.html b/v0.3.0/reference/h_extract_covariance_terms.html index 8861a0c01..9071050d2 100644 --- a/v0.3.0/reference/h_extract_covariance_terms.html +++ b/v0.3.0/reference/h_extract_covariance_terms.html @@ -1,5 +1,25 @@ - -Extract Formula Terms used for Covariance Structure Definition — h_extract_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    h_extract_covariance_terms(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula from which covariance terms should be extracted.

    -
    + +
    -

    Value

    +

    Value +

    A list of covariance structure expressions found in f.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_factor_ref.html b/v0.3.0/reference/h_factor_ref.html index 4c599485d..04fb780d9 100644 --- a/v0.3.0/reference/h_factor_ref.html +++ b/v0.3.0/reference/h_factor_ref.html @@ -1,5 +1,25 @@ - -Convert Character to Factor Following Reference — h_factor_ref • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_factor_ref(x, ref, var_name = vname(x))
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character or factor)
    input.

    @@ -129,31 +160,37 @@

    Arguments -

    Details

    +

    Details +

    Use ref to convert x into factor with the same levels. This is needed even if x and ref are both character because in model.matrix if x only has one level there could be errors.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_get_cov_default.html b/v0.3.0/reference/h_get_cov_default.html index 30c3bc1b1..2cca5a50a 100644 --- a/v0.3.0/reference/h_get_cov_default.html +++ b/v0.3.0/reference/h_get_cov_default.html @@ -1,7 +1,27 @@ - -Obtain Default Covariance Method — h_get_cov_default • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,20 +143,25 @@
    -

    Usage

    +

    Usage +

    h_get_cov_default(
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within")
     )
    -

    Arguments

    -
    method
    +

    Arguments +

    +
    +
    method

    (string)
    degrees of freedom method.

    -
    + +
    -

    Details

    +

    Details +

    The default covariance method is different for different degrees of freedom method. For "Satterthwaite" or "Between-Within", "Asymptotic" is returned. For "Kenward-Roger" only, "Kenward-Roger" is returned. @@ -136,22 +169,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.0/reference/h_get_empirical.html b/v0.3.0/reference/h_get_empirical.html index e1ec8ac1f..b36c4c6e1 100644 --- a/v0.3.0/reference/h_get_empirical.html +++ b/v0.3.0/reference/h_get_empirical.html @@ -1,9 +1,29 @@ - -Obtain Empirical/Jackknife/Bias-Reduced Covariance — h_get_empirical • mmrm +Obtain Empirical/Jackknife/Bias-Reduced Covariance — h_get_empirical • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    h_get_empirical(tmb_data, theta, beta, beta_vcov, type)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    @@ -144,32 +175,41 @@

    Arguments -

    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • cov: matrix empirical covariance.

    • +

      Named list with elements:

      +
        +
      • cov: matrix empirical covariance.

      • df_mat: matrix to calculate Satterthwaite degree of freedom.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_get_kr_comp.html b/v0.3.0/reference/h_get_kr_comp.html index a47d441ed..07d68d127 100644 --- a/v0.3.0/reference/h_get_kr_comp.html +++ b/v0.3.0/reference/h_get_kr_comp.html @@ -1,7 +1,27 @@ - -Obtain Kenward-Roger Adjustment Components — h_get_kr_comp • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,30 +143,39 @@
    -

    Usage

    +

    Usage +

    h_get_kr_comp(tmb_data, theta)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    theta

    (numeric)
    theta estimate.

    -
    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • P: matrix of \(P\) component.

    • +

      Named list with elements:

      +
        +
      • P: matrix of \(P\) component.

      • Q: matrix of \(Q\) component.

      • R: matrix of \(R\) component.

      • -
    + +
    -

    Details

    +

    Details +

    the function returns a named list, \(P\), \(Q\) and \(R\), which corresponds to the paper in 1997. The matrices are stacked in columns so that \(P\), \(Q\) and \(R\) has the same column number(number of beta parameters). The number of rows, is dependent on @@ -150,22 +187,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.0/reference/h_get_optimizers.html b/v0.3.0/reference/h_get_optimizers.html index 5745bb8d8..a33d446ac 100644 --- a/v0.3.0/reference/h_get_optimizers.html +++ b/v0.3.0/reference/h_get_optimizers.html @@ -1,5 +1,25 @@ - -Obtain Optimizer according to Optimizer String Value — h_get_optimizers • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    h_get_optimizers(
       optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"),
       optimizer_fun = h_optimizer_fun(optimizer),
    @@ -122,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    optimizer
    +

    Arguments +

    +
    +
    optimizer

    (character)
    names of built-in optimizers to try, subset of "L-BFGS-B", "BFGS", "CG" and "nlminb".

    @@ -140,46 +171,59 @@

    Arguments -

    Value

    +

    Value +

    Named list of optimizers created by h_partial_fun_args().

    -

    Details

    -

    If you want to use only the built-in optimizers:

    • optimizer is a shortcut to create a list of built-in optimizer functions +

      Details +

      +

      If you want to use only the built-in optimizers:

      +
        +
      • optimizer is a shortcut to create a list of built-in optimizer functions passed to optimizer_fun.

      • Allowed are "L-BFGS-B", "BFGS", "CG" (using stats::optim() with corresponding method) and "nlminb" (using stats::nlminb()).

      • Other arguments should go into optimizer_args.

      • -

      If you want to use your own optimizer function:

      • Make sure that there are three arguments: parameter (start value), objective function +

      +

      If you want to use your own optimizer function:

      +
        +
      • Make sure that there are three arguments: parameter (start value), objective function and gradient function are sequentially in the function arguments.

      • If there are other named arguments in front of these, make sure they are correctly specified through optimizer_args.

      • If the hessian can be used, please make sure its argument name is hessian and please add attribute use_hessian = TRUE to the function, using attr(fun, "use_hessian) <- TRUE.

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_get_prediction.html b/v0.3.0/reference/h_get_prediction.html index eb21ba421..6002413a8 100644 --- a/v0.3.0/reference/h_get_prediction.html +++ b/v0.3.0/reference/h_get_prediction.html @@ -1,5 +1,25 @@ - -Get Prediction — h_get_prediction • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_get_prediction(tmb_data, theta, beta, beta_vcov)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    object.

    @@ -133,37 +164,47 @@

    Arguments -

    Value

    +

    Value +

    -

    List with:

    • prediction: Matrix with columns fit, conf_var, and var.

    • +

      List with:

      +
        +
      • prediction: Matrix with columns fit, conf_var, and var.

      • covariance: List with subject specific covariance matrices.

      • index: List of zero-based subject indices.

      • -
    + +
    -

    Details

    +

    Details +

    See predict function in predict.cpp which is called internally.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_get_prediction_variance.html b/v0.3.0/reference/h_get_prediction_variance.html index 4d91ed5f5..9f9c25e5f 100644 --- a/v0.3.0/reference/h_get_prediction_variance.html +++ b/v0.3.0/reference/h_get_prediction_variance.html @@ -1,5 +1,25 @@ - -Get Prediction Variance — h_get_prediction_variance • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_get_prediction_variance(object, nsim, tmb_data)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    @@ -129,25 +160,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.0/reference/h_get_sim_per_subj.html b/v0.3.0/reference/h_get_sim_per_subj.html index 8b049d287..e3a54fc94 100644 --- a/v0.3.0/reference/h_get_sim_per_subj.html +++ b/v0.3.0/reference/h_get_sim_per_subj.html @@ -1,5 +1,25 @@ - -Get simulated values by patient. — h_get_sim_per_subj • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_get_sim_per_subj(predict_res, nsub, nsim)
    -

    Arguments

    -
    predict_res
    +

    Arguments +

    +
    +
    predict_res

    (list)
    from h_get_prediction().

    @@ -129,25 +160,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.0/reference/h_gradient.html b/v0.3.0/reference/h_gradient.html index 9a3d2aa44..75800685b 100644 --- a/v0.3.0/reference/h_gradient.html +++ b/v0.3.0/reference/h_gradient.html @@ -1,7 +1,27 @@ - -Computation of a Gradient Given Jacobian and Contrast Vector — h_gradient • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_gradient(jac_list, contrast)
    -

    Arguments

    -
    jac_list
    +

    Arguments +

    +
    +
    jac_list

    (list)
    Jacobian list produced e.g. by h_jac_list().

    @@ -130,9 +161,11 @@

    Arguments -

    Value

    +

    Value +

    Numeric vector which contains the quadratic forms of each element of @@ -140,22 +173,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_jac_list.html b/v0.3.0/reference/h_jac_list.html index 14658dece..e0742f611 100644 --- a/v0.3.0/reference/h_jac_list.html +++ b/v0.3.0/reference/h_jac_list.html @@ -1,5 +1,25 @@ - -Obtain List of Jacobian Matrix Entries for Covariance Matrix — h_jac_list • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_jac_list(tmb_data, theta_est, beta_vcov)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    @@ -129,9 +160,11 @@

    Arguments -

    Value

    +

    Value +

    List with one element per variance parameter containing a matrix @@ -140,22 +173,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_kr_df.html b/v0.3.0/reference/h_kr_df.html index 61f9245b9..f4ebe28d9 100644 --- a/v0.3.0/reference/h_kr_df.html +++ b/v0.3.0/reference/h_kr_df.html @@ -1,7 +1,27 @@ - -Obtain the Adjusted Kenward-Roger degrees of freedom — h_kr_df • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_kr_df(v0, l, w, p)
    -

    Arguments

    -
    v0
    +

    Arguments +

    +
    +
    v0

    (matrix)
    unadjusted covariance matrix.

    @@ -136,32 +167,41 @@

    Argumentsh_get_kr_comp().

    -

    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • m: numeric degrees of freedom.

    • +

      Named list with elements:

      +
        +
      • m: numeric degrees of freedom.

      • lambda: numeric F statistic scale parameter.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_md_denom_df.html b/v0.3.0/reference/h_md_denom_df.html index 618c03688..c7318ddb8 100644 --- a/v0.3.0/reference/h_md_denom_df.html +++ b/v0.3.0/reference/h_md_denom_df.html @@ -1,5 +1,25 @@ - -Calculating Denominator Degrees of Freedom for the Multi-Dimensional Case — h_md_denom_df • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,47 +140,57 @@
    -

    Usage

    +

    Usage +

    h_md_denom_df(t_stat_df)
    -

    Arguments

    -
    t_stat_df
    +

    Arguments +

    +
    +
    t_stat_df

    (numeric)
    n t-statistic derived degrees of freedom.

    -
    + +
    -

    Value

    +

    Value +

    Usually the calculation is returning 2 * E / (E - n) where E is the sum of t / (t - 2) over all t_stat_df values t.

    -

    Note

    +

    Note +

    If the input values are two similar to each other then just the average of them is returned. If any of the inputs is not larger than 2 then 2 is returned.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_mmrm_tmb_assert_start.html b/v0.3.0/reference/h_mmrm_tmb_assert_start.html index 6ba85c502..b46f5aca5 100644 --- a/v0.3.0/reference/h_mmrm_tmb_assert_start.html +++ b/v0.3.0/reference/h_mmrm_tmb_assert_start.html @@ -1,5 +1,25 @@ - -Asserting Sane Start Values for TMB Fit — h_mmrm_tmb_assert_start • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_assert_start(tmb_object)
    -

    Arguments

    -
    tmb_object
    +

    Arguments +

    +
    +
    tmb_object

    (list)
    created with TMB::MakeADFun().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used for assertions.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_mmrm_tmb_check_conv.html b/v0.3.0/reference/h_mmrm_tmb_check_conv.html index 0f0c93e0b..339ffb441 100644 --- a/v0.3.0/reference/h_mmrm_tmb_check_conv.html +++ b/v0.3.0/reference/h_mmrm_tmb_check_conv.html @@ -1,5 +1,25 @@ - -Checking the TMB Optimization Result — h_mmrm_tmb_check_conv • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,22 +140,27 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_check_conv(tmb_opt, mmrm_tmb)
    -

    Arguments

    -
    tmb_opt
    +

    Arguments +

    +
    +
    tmb_opt

    (list)
    optimization result.

    mmrm_tmb

    (mmrm_tmb)
    result from h_mmrm_tmb_fit().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used to generate warnings in case that the model @@ -135,22 +168,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_mmrm_tmb_data.html b/v0.3.0/reference/h_mmrm_tmb_data.html index b228b32a1..90b62f658 100644 --- a/v0.3.0/reference/h_mmrm_tmb_data.html +++ b/v0.3.0/reference/h_mmrm_tmb_data.html @@ -1,5 +1,25 @@ - -Data for TMB Fit — h_mmrm_tmb_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_data(
       formula_parts,
       data,
    @@ -126,8 +155,10 @@ 

    Usage

    -

    Arguments

    -
    formula_parts
    +

    Arguments +

    +
    +
    formula_parts

    (mmrm_tmb_formula_parts)
    list with formula parts from h_mmrm_tmb_formula_parts().

    @@ -161,12 +192,16 @@

    Arguments -

    Value

    +

    Value +

    -

    List of class mmrm_tmb_data with elements:

    • full_frame: data.frame with n rows containing all variables needed in the model.

    • +

      List of class mmrm_tmb_data with elements:

      +
        +
      • full_frame: data.frame with n rows containing all variables needed in the model.

      • data: data.frame of input dataset.

      • x_matrix: matrix with n rows and p columns specifying the overall design matrix.

      • x_cols_aliased: logical with potentially more than p elements indicating which @@ -187,9 +222,11 @@

        Value

        reml: int specifying whether REML estimation is used (1), otherwise ML (0).

      • subject_groups: factor specifying the grouping for each subject.

      • n_groups: int with the number of total groups

      • -
    + +
    -

    Details

    +

    Details +

    Note that the subject_var must not be factor but can also be character. If it is character, then it will be converted to factor internally. Here the levels will be the unique values, sorted alphabetically and numerically if there @@ -198,22 +235,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.0/reference/h_mmrm_tmb_extract_cov.html b/v0.3.0/reference/h_mmrm_tmb_extract_cov.html index 62c79666c..61062e8ed 100644 --- a/v0.3.0/reference/h_mmrm_tmb_extract_cov.html +++ b/v0.3.0/reference/h_mmrm_tmb_extract_cov.html @@ -1,7 +1,27 @@ - -Extract covariance matrix from TMB report and input data — h_mmrm_tmb_extract_cov • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_extract_cov(tmb_report, tmb_data, visit_var, is_spatial)
    -

    Arguments

    -
    tmb_report
    +

    Arguments +

    +
    +
    tmb_report

    (list)
    report created with TMB::MakeADFun() report function.

    @@ -136,9 +167,11 @@

    Arguments -

    Value

    +

    Value +

    Return a simple covariance matrix if there is no grouping, or a named @@ -147,22 +180,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_mmrm_tmb_fit.html b/v0.3.0/reference/h_mmrm_tmb_fit.html index c687bb203..6ab35b84f 100644 --- a/v0.3.0/reference/h_mmrm_tmb_fit.html +++ b/v0.3.0/reference/h_mmrm_tmb_fit.html @@ -1,7 +1,27 @@ - -Build TMB Fit Result List — h_mmrm_tmb_fit • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_fit(tmb_object, tmb_opt, formula_parts, tmb_data)
    -

    Arguments

    -
    tmb_object
    +

    Arguments +

    +
    +
    tmb_object

    (list)
    created with TMB::MakeADFun().

    @@ -146,12 +177,16 @@

    Arguments -

    Value

    +

    Value +

    -

    List of class mmrm_tmb with:

    • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

    • +

      List of class mmrm_tmb with:

      +
        +
      • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

      • beta_est: vector of coefficient estimates.

      • beta_vcov: Variance-covariance matrix for coefficient estimates.

      • beta_vcov_inv_L: Lower triangular matrix L of the inverse variance-covariance matrix decomposition.

      • @@ -166,31 +201,37 @@

        Value

        opt_details: list with optimization details including convergence code.

      • tmb_object: original TMB object created with TMB::MakeADFun().

      • tmb_data: input.

      • -
    + +
    -

    Details

    +

    Details +

    Instead of inverting or decomposing beta_vcov, it can be more efficient to use its robust Cholesky decomposition LDL^T, therefore we return the corresponding two components L and D as well since they have been available on the C++ side already.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_mmrm_tmb_formula_parts.html b/v0.3.0/reference/h_mmrm_tmb_formula_parts.html index 0d99d4509..e8eca76f4 100644 --- a/v0.3.0/reference/h_mmrm_tmb_formula_parts.html +++ b/v0.3.0/reference/h_mmrm_tmb_formula_parts.html @@ -1,5 +1,25 @@ - -Processing the Formula for TMB Fit — h_mmrm_tmb_formula_parts • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_formula_parts(
       formula,
       covariance = as.cov_struct(formula, warn_partial = FALSE)
    @@ -120,8 +149,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    Original formula.

    @@ -129,12 +160,16 @@

    Arguments -

    Value

    +

    Value +

    -

    List of class mmrm_tmb_formula_parts with elements:

    • formula: the original input.

    • +

      List of class mmrm_tmb_formula_parts with elements:

      +
        +
      • formula: the original input.

      • model_formula: formula with the covariance term is removed.

      • model_formula: formula with the covariance term removed.

      • full_formula: same as model_formula but includes the covariance @@ -146,25 +181,30 @@

        Value

        subject_var: string with the subject variable name.

      • group_var: string with the group variable name. If no group specified, this element is NULL.

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_mmrm_tmb_parameters.html b/v0.3.0/reference/h_mmrm_tmb_parameters.html index 56f283ab7..b028228bc 100644 --- a/v0.3.0/reference/h_mmrm_tmb_parameters.html +++ b/v0.3.0/reference/h_mmrm_tmb_parameters.html @@ -1,5 +1,25 @@ - -Start Parameters for TMB Fit — h_mmrm_tmb_parameters • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_parameters(formula_parts, tmb_data, start, n_groups = 1L)
    -

    Arguments

    -
    formula_parts
    +

    Arguments +

    +
    +
    formula_parts

    (mmrm_tmb_formula_parts)
    produced by h_mmrm_tmb_formula_parts().

    @@ -135,9 +166,11 @@

    Arguments -

    Value

    +

    Value +

    List with element theta containing the start values for the variance @@ -145,22 +178,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_newdata_add_pred.html b/v0.3.0/reference/h_newdata_add_pred.html index b8059df82..6de69b718 100644 --- a/v0.3.0/reference/h_newdata_add_pred.html +++ b/v0.3.0/reference/h_newdata_add_pred.html @@ -1,5 +1,25 @@ - -Add Prediction Results to New Data — h_newdata_add_pred • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_newdata_add_pred(x, newdata, se_fit, interval, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fit.

    @@ -138,9 +169,11 @@

    Argumentspredict.mmrm_tmb().

    -

    + +
    -

    Value

    +

    Value +

    The newdata as a tibble with additional columns .fitted, @@ -151,22 +184,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_optimizer_fun.html b/v0.3.0/reference/h_optimizer_fun.html index bae0cd10e..de2e8911e 100644 --- a/v0.3.0/reference/h_optimizer_fun.html +++ b/v0.3.0/reference/h_optimizer_fun.html @@ -1,5 +1,25 @@ - -Obtain Optimizer Function with Character — h_optimizer_fun • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_optimizer_fun(optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"))
    -

    Arguments

    -
    optimizer
    +

    Arguments +

    +
    +
    optimizer

    (character)
    vector of optimizers.

    -
    + +
    -

    Value

    +

    Value +

    A (list)
    of optimizer functions generated from h_partial_fun_args().

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_partial_fun_args.html b/v0.3.0/reference/h_partial_fun_args.html index f8e1ce23f..db245f776 100644 --- a/v0.3.0/reference/h_partial_fun_args.html +++ b/v0.3.0/reference/h_partial_fun_args.html @@ -1,5 +1,25 @@ - -Create Partial Functions — h_partial_fun_args • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_partial_fun_args(fun, ..., additional_attr = list())
    -

    Arguments

    -
    fun
    +

    Arguments +

    +
    +
    fun

    (function)
    to be wrapped.

    @@ -129,16 +160,19 @@

    Arguments -

    Value

    +

    Value +

    Object with S3 class "partial", a function with args attribute (and possibly more attributes from additional_attr).

    -

    Details

    +

    Details +

    This function add args attribute to the original function, and add an extra class partial to the function. args is the argument for the function, and elements in ... will override the existing @@ -146,22 +180,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.0/reference/h_print_aic_list.html b/v0.3.0/reference/h_print_aic_list.html index 0339da5a2..a9151788a 100644 --- a/v0.3.0/reference/h_print_aic_list.html +++ b/v0.3.0/reference/h_print_aic_list.html @@ -1,5 +1,25 @@ - -Printing AIC and other Model Fit Criteria — h_print_aic_list • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,38 +140,46 @@
    -

    Usage

    +

    Usage +

    h_print_aic_list(aic_list, digits = 1)
    -

    Arguments

    -
    aic_list
    +

    Arguments +

    +
    +
    aic_list

    (list)
    list as part of from summary.mmrm().

    digits

    (number)
    number of decimal places used with round().

    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_print_call.html b/v0.3.0/reference/h_print_call.html index ba19e80b6..0e8c244fc 100644 --- a/v0.3.0/reference/h_print_call.html +++ b/v0.3.0/reference/h_print_call.html @@ -1,5 +1,25 @@ - -Printing MMRM Function Call — h_print_call • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_print_call(call, n_obs, n_subjects, n_timepoints)
    -

    Arguments

    -
    call
    +

    Arguments +

    +
    +
    call

    (call)
    original mmrm() function call.

    @@ -133,25 +164,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.0/reference/h_print_cov.html b/v0.3.0/reference/h_print_cov.html index f378c3764..dd1259687 100644 --- a/v0.3.0/reference/h_print_cov.html +++ b/v0.3.0/reference/h_print_cov.html @@ -1,5 +1,25 @@ - -Printing MMRM Covariance Type — h_print_cov • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_print_cov(cov_type, n_theta, n_groups)
    -

    Arguments

    -
    cov_type
    +

    Arguments +

    +
    +
    cov_type

    (string)
    covariance structure abbreviation.

    @@ -129,25 +160,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.0/reference/h_quad_form.html b/v0.3.0/reference/h_quad_form.html index 0f0099bf6..0a9feddd2 100644 --- a/v0.3.0/reference/h_quad_form.html +++ b/v0.3.0/reference/h_quad_form.html @@ -1,7 +1,27 @@ - -Quadratic Form Calculations — h_quad_form • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,15 +143,18 @@
    -

    Usage

    +

    Usage +

    h_quad_form_vec(vec, center)
     
     h_quad_form_mat(mat, center)
    -

    Arguments

    -
    vec
    +

    Arguments +

    +
    +
    vec

    (numeric)
    interpreted as a row vector.

    @@ -137,34 +168,42 @@

    Arguments -

    Functions

    +

    Functions +

    -
    • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) +

        +
      • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) as a numeric (not a matrix).

      • h_quad_form_mat(): calculates the quadratic form mat %*% center %*% t(mat) as a matrix, the result is square and has dimensions identical to the number of rows in mat.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_reconcile_cov_struct.html b/v0.3.0/reference/h_reconcile_cov_struct.html index 75aa5f4cd..cfc3192db 100644 --- a/v0.3.0/reference/h_reconcile_cov_struct.html +++ b/v0.3.0/reference/h_reconcile_cov_struct.html @@ -1,5 +1,25 @@ - -Reconcile Possible Covariance Structure Inputs — h_reconcile_cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_reconcile_cov_struct(formula = NULL, covariance = NULL)
    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -128,9 +159,11 @@

    Argumentsas.cov_struct(). If no value is provided, a structure is derived from the provided formula.

    -

    + +
    -

    Value

    +

    Value +

    The value covariance if it's provided or a covariance structure @@ -139,22 +172,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_record_all_output.html b/v0.3.0/reference/h_record_all_output.html index a52e6e05f..61ac053c5 100644 --- a/v0.3.0/reference/h_record_all_output.html +++ b/v0.3.0/reference/h_record_all_output.html @@ -1,9 +1,29 @@ - - + + + + + +Capture all Output — h_record_all_output • mmrm +Capture all Output — h_record_all_output • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    h_record_all_output(expr, remove = list(), divergence = list())
    -

    Arguments

    -
    expr
    +

    Arguments +

    +
    +
    expr

    (expression)
    to be executed.

    @@ -139,35 +170,44 @@

    Arguments -

    Value

    +

    Value +

    -

    A list containing

    • result: The object returned by expr or list() if an error was thrown.

    • +

      A list containing

      +
        +
      • result: The object returned by expr or list() if an error was thrown.

      • warnings: NULL or a character vector if warnings were thrown.

      • errors: NULL or a string if an error was thrown.

      • messages: NULL or a character vector if messages were produced.

      • divergence: NULL or a character vector if divergence messages were caught.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_residuals_normalized.html b/v0.3.0/reference/h_residuals_normalized.html index c6d0032f9..fdde06435 100644 --- a/v0.3.0/reference/h_residuals_normalized.html +++ b/v0.3.0/reference/h_residuals_normalized.html @@ -1,5 +1,25 @@ - -Calculate normalized residuals — h_residuals_normalized • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_normalized(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_residuals_pearson.html b/v0.3.0/reference/h_residuals_pearson.html index 435b66bc2..492fbc374 100644 --- a/v0.3.0/reference/h_residuals_pearson.html +++ b/v0.3.0/reference/h_residuals_pearson.html @@ -1,5 +1,25 @@ - -Calculate Pearson Residuals — h_residuals_pearson • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_pearson(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_residuals_response.html b/v0.3.0/reference/h_residuals_response.html index bcfbd2094..9796b5635 100644 --- a/v0.3.0/reference/h_residuals_response.html +++ b/v0.3.0/reference/h_residuals_response.html @@ -1,5 +1,25 @@ - -Calculate response residuals. — h_residuals_response • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_response(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_split_control.html b/v0.3.0/reference/h_split_control.html index 74c761a75..231e5d8d9 100644 --- a/v0.3.0/reference/h_split_control.html +++ b/v0.3.0/reference/h_split_control.html @@ -1,7 +1,27 @@ - -Split Control List — h_split_control • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,44 +143,53 @@
    -

    Usage

    +

    Usage +

    h_split_control(control, ...)
    -

    Arguments

    -
    control
    +

    Arguments +

    +
    +
    control

    (mmrm_control)
    object.

    ...

    additional parameters to update the control object.

    -
    + +
    -

    Value

    +

    Value +

    A list of mmrm_control entries.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_summarize_all_fits.html b/v0.3.0/reference/h_summarize_all_fits.html index c1c220800..0d442b6f0 100644 --- a/v0.3.0/reference/h_summarize_all_fits.html +++ b/v0.3.0/reference/h_summarize_all_fits.html @@ -1,5 +1,25 @@ - -Summarizing List of Fits — h_summarize_all_fits • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_summarize_all_fits(all_fits)
    -

    Arguments

    -
    all_fits
    +

    Arguments +

    +
    +
    all_fits

    (list of mmrm_fit or try-error)
    list of fits.

    -
    + +
    -

    Value

    +

    Value +

    List with warnings, messages, log_liks and converged results.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_tbl_confint_terms.html b/v0.3.0/reference/h_tbl_confint_terms.html index 5c9a5a77b..1a91f434f 100644 --- a/v0.3.0/reference/h_tbl_confint_terms.html +++ b/v0.3.0/reference/h_tbl_confint_terms.html @@ -1,5 +1,25 @@ - -Extract tibble with Confidence Intervals and Term Names — h_tbl_confint_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,44 +140,53 @@
    -

    Usage

    +

    Usage +

    h_tbl_confint_terms(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fit object.

    ...

    passed to stats::confint(), hence not used at the moment.

    -
    + +
    -

    Value

    +

    Value +

    A tibble with term, conf.low, conf.high columns.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_test_1d.html b/v0.3.0/reference/h_test_1d.html index 8a65f47f6..14e3f5c90 100644 --- a/v0.3.0/reference/h_test_1d.html +++ b/v0.3.0/reference/h_test_1d.html @@ -1,7 +1,27 @@ - -Creating T-Statistic Test Results For One-Dimensional Contrast — h_test_1d • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_test_1d(object, contrast, df)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -134,31 +165,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val (2-sided p-value).

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_test_md.html b/v0.3.0/reference/h_test_md.html index c0c889983..7dbf560a6 100644 --- a/v0.3.0/reference/h_test_md.html +++ b/v0.3.0/reference/h_test_md.html @@ -1,7 +1,27 @@ - -Creating F-Statistic Test Results For Multi-Dimensional Contrast — h_test_md • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_test_md(object, contrast, df, f_stat_factor = 1)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -136,31 +167,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_tr.html b/v0.3.0/reference/h_tr.html index 200ac5299..aebbcf2b7 100644 --- a/v0.3.0/reference/h_tr.html +++ b/v0.3.0/reference/h_tr.html @@ -1,5 +1,25 @@ - -Trace of a Matrix — h_tr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_tr(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (matrix)
    square matrix input.

    -
    + +
    -

    Value

    +

    Value +

    The trace of the square matrix.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_valid_formula.html b/v0.3.0/reference/h_valid_formula.html index 7cc2d503d..13457f7ea 100644 --- a/v0.3.0/reference/h_valid_formula.html +++ b/v0.3.0/reference/h_valid_formula.html @@ -1,5 +1,25 @@ - -Validate mmrm Formula — h_valid_formula • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,39 +140,48 @@
    -

    Usage

    +

    Usage +

    h_valid_formula(formula)
    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    to check.

    -
    + +
    -

    Details

    +

    Details +

    In mmrm models, . is not allowed as it introduces ambiguity of covariates to be used, so it is not allowed to be in formula.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_var_adj.html b/v0.3.0/reference/h_var_adj.html index e2a2f7286..e0b9e8fcf 100644 --- a/v0.3.0/reference/h_var_adj.html +++ b/v0.3.0/reference/h_var_adj.html @@ -1,9 +1,29 @@ - -Obtain the Adjusted Covariance Matrix — h_var_adj • mmrm +Obtain the Adjusted Covariance Matrix — h_var_adj • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    h_var_adj(v, w, p, q, r, linear = FALSE)
    -

    Arguments

    -
    v
    +

    Arguments +

    +
    +
    v

    (matrix)
    unadjusted covariance matrix.

    @@ -147,31 +178,37 @@

    Arguments -

    Value

    +

    Value +

    The matrix of adjusted covariance matrix.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_warn_na_action.html b/v0.3.0/reference/h_warn_na_action.html index 36db321e6..809d13083 100644 --- a/v0.3.0/reference/h_warn_na_action.html +++ b/v0.3.0/reference/h_warn_na_action.html @@ -1,5 +1,25 @@ - -Warn on na.action — h_warn_na_action • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,27 +140,32 @@
    -

    Usage

    +

    Usage +

    h_warn_na_action()
    - + +
    -
    + + - - + + diff --git a/v0.3.0/reference/h_within_or_between.html b/v0.3.0/reference/h_within_or_between.html index 94a94a9ff..122debb42 100644 --- a/v0.3.0/reference/h_within_or_between.html +++ b/v0.3.0/reference/h_within_or_between.html @@ -1,7 +1,27 @@ - -Determine Within or Between for each Design Matrix Column — h_within_or_between • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,22 +143,27 @@
    -

    Usage

    +

    Usage +

    h_within_or_between(x_matrix, subject_ids)
    -

    Arguments

    -
    x_matrix
    +

    Arguments +

    +
    +
    x_matrix

    (matrix)
    the design matrix with column names.

    subject_ids

    (factor)
    the subject IDs.

    -
    + +
    -

    Value

    +

    Value +

    Character vector with "intercept", "within" or "between" for each @@ -138,22 +171,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/index.html b/v0.3.0/reference/index.html index 8e890a9b4..5b44925e2 100644 --- a/v0.3.0/reference/index.html +++ b/v0.3.0/reference/index.html @@ -1,5 +1,23 @@ - -Function reference • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +44,8 @@ + - + + - + @@ -106,189 +132,252 @@
    -

    Package

    +

    Package +

    -
    +
    +
    -
    +
    +
    mmrm-package _PACKAGE
    -
    mmrm Package
    -
    -

    Functions

    +
    +mmrm Package
    + +
    +
    +

    Functions +

    -
    +
    +
    -
    +
    +
    mmrm()
    Fit an MMRM
    -
    +
    +
    +
    fit_mmrm()
    Low-Level Fitting Function for MMRM
    -
    +
    +
    +
    mmrm_control()
    Control Parameters for Fitting an MMRM
    -
    +
    +
    +
    fit_single_optimizer()
    Fitting an MMRM with Single Optimizer
    -
    +
    +
    +
    refit_multiple_optimizers()
    Refitting MMRM with Multiple Optimizers
    -
    +
    +
    +
    df_1d()
    Calculation of Degrees of Freedom for One-Dimensional Contrast
    -
    +
    +
    +
    df_md()
    Calculation of Degrees of Freedom for Multi-Dimensional Contrast
    -
    +
    +
    +
    component()
    Component Access for mmrm_tmb Objects
    -
    -

    Methods

    + +
    +
    +

    Methods +

    -
    +
    +
    -

    Covariance Structures

    + +
    +
    +

    Covariance Structures +

    -
    +
    +
    -
    +
    +
    cov_struct()
    Define a Covariance Structure
    -
    +
    +
    +
    as.cov_struct()
    Coerce into a Covariance Structure Definition
    -
    +
    +
    +
    format(<cov_struct>)
    Format Covariance Structure Object
    -
    +
    +
    +
    print(<cov_struct>)
    Print a Covariance Structure Object
    -
    +
    +
    +
    cov_types()
    Covariance Types
    -
    -

    Estimate Marginal Means

    + +
    +
    +

    Estimate Marginal Means +

    -
    +
    +
    -
    +
    +
    emmeans_support
    -
    Support for emmeans
    -
    -

    Datasets

    +
    Support for emmeans +
    + +
    +
    +

    Datasets +

    -
    +
    +
    -
    +
    +
    fev_data
    Example Data on FEV1
    -
    +
    +
    +
    bcva_data
    Example Data on BCVA
    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.0/reference/is_infix.html b/v0.3.0/reference/is_infix.html index 2a05938b3..66650e3d1 100644 --- a/v0.3.0/reference/is_infix.html +++ b/v0.3.0/reference/is_infix.html @@ -1,5 +1,25 @@ - -Test Whether a Symbol is an Infix Operator — is_infix • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,49 +140,62 @@
    -

    Usage

    +

    Usage +

    is_infix(name)
    -

    Arguments

    -
    name
    +

    Arguments +

    +
    +
    name

    (symbol or name or string)
    a possible reference to an infix operator to check.

    -
    + +
    -

    Value

    +

    Value +

    A logical indicating whether the name is the name of an infix operator.

    -

    is_infix(as.name("|"))
    +

    +
    +
    is_infix(as.name("|"))
     is_infix("|")
    -is_infix("c")

    +is_infix("c")
    +

    +
    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/mmrm-package.html b/v0.3.0/reference/mmrm-package.html index 97593a414..4abe07d1f 100644 --- a/v0.3.0/reference/mmrm-package.html +++ b/v0.3.0/reference/mmrm-package.html @@ -1,5 +1,25 @@ - -mmrm Package — mmrm-package • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -113,15 +142,23 @@
    -

    See also

    -
    -

    Author

    +

    Author +

    Maintainer: Daniel Sabanes Bove daniel.sabanes_bove@roche.com

    -

    Authors:

    + +
    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/mmrm.html b/v0.3.0/reference/mmrm.html index 0a1207dbe..3a391d691 100644 --- a/v0.3.0/reference/mmrm.html +++ b/v0.3.0/reference/mmrm.html @@ -1,7 +1,27 @@ - -Fit an MMRM — mmrm • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,7 +143,8 @@
    -

    Usage

    +

    Usage +

    mmrm(
       formula,
       data,
    @@ -128,8 +157,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -162,15 +193,18 @@

    Argumentsmmrm_control().

    -

    + +
    -

    Value

    +

    Value +

    An mmrm object.

    -

    Details

    +

    Details +

    The formula typically looks like: FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID) so specifies response and covariates as usual, and exactly one special term @@ -196,15 +230,19 @@

    Detailsmmrm.

    -

    Note

    +

    Note +

    The mmrm object is also an mmrm_fit and an mmrm_tmb object, therefore corresponding methods also work (see mmrm_tmb_methods).

    -

    Additional contents depend on the choice of the adjustment method:

    • If Satterthwaite adjustment is used, the Jacobian information jac_list +

      Additional contents depend on the choice of the adjustment method:

      +
        +
      • If Satterthwaite adjustment is used, the Jacobian information jac_list is included.

      • If Kenward-Roger adjustment is used, kr_comp contains necessary components and beta_vcov_adj includes the adjusted coefficients covariance matrix.

      • -

      Use of the package emmeans is supported, see emmeans_support.

      +
    +

    Use of the package emmeans is supported, see emmeans_support.

    NA values are always omitted regardless of na.action setting.

    When the number of visit levels is large, it usually requires large memory to create the covariance matrix. By default, the maximum allowed visit levels is 100, and if there are more @@ -215,7 +253,8 @@

    Note

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -239,22 +278,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.0/reference/mmrm_control.html b/v0.3.0/reference/mmrm_control.html index 4e7e0bee7..61abb3cb8 100644 --- a/v0.3.0/reference/mmrm_control.html +++ b/v0.3.0/reference/mmrm_control.html @@ -1,9 +1,29 @@ - - + + + + + +Control Parameters for Fitting an MMRM — mmrm_control • mmrm +Control Parameters for Fitting an MMRM — mmrm_control • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,7 +146,8 @@
    -

    Usage

    +

    Usage +

    mmrm_control(
       n_cores = 1L,
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within"),
    @@ -132,8 +161,10 @@ 

    Usage

    -

    Arguments

    -
    n_cores
    +

    Arguments +

    +
    +
    n_cores

    (count)
    number of cores to be used.

    @@ -167,15 +198,18 @@

    Argumentsh_get_optimizers().

    -

    + +
    -

    Value

    +

    Value +

    List of class mmrm_control with the control parameters.

    + +
    -

    Examples

    +

    Examples +

    mmrm_control(
       optimizer_fun = stats::optim,
       optimizer_args = list(method = "L-BFGS-B")
    @@ -308,22 +346,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.0/reference/mmrm_methods.html b/v0.3.0/reference/mmrm_methods.html index 93f119150..ea38b7c97 100644 --- a/v0.3.0/reference/mmrm_methods.html +++ b/v0.3.0/reference/mmrm_methods.html @@ -1,5 +1,25 @@ - -Methods for mmrm Objects — mmrm_methods • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm
     summary(object, ...)
     
    @@ -126,48 +155,65 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the fitted MMRM including Jacobian and call etc.

    ...

    not used.

    -
    + +
    -

    Value

    +

    Value +

    Depends on the method, see Details and Functions.

    -

    Details

    -

    While printing the summary of (mmrm)
    object, the following will be displayed:

    1. Formula. The formula used in the model.

    2. +

      Details +

      +

      While printing the summary of (mmrm)
      object, the following will be displayed:

      +
        +
      1. Formula. The formula used in the model.

      2. Data. The data used for analysis, including number of subjects, number of valid observations.

      3. Covariance. The covariance structure and number of variance parameters.

      4. Method. Restricted maximum likelihood(REML) or maximum likelihood(ML).

      5. Model selection criteria. AIC, BIC, log likelihood and deviance.

      6. Coefficients. Coefficients of the covariates.

      7. -
      8. Covariance estimate. The covariance estimate(for each group).

        1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available +

        2. +

          Covariance estimate. The covariance estimate(for each group).

          +
            +
          1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available in data will be displayed.

          2. If the covariance structure is spatial, the covariance matrix of two time points with unit distance will be displayed.

          3. -
        3. -
    + + + +
    -

    Functions

    +

    Functions +

    -
    • summary(mmrm): summarizes the MMRM fit results.

    • +
        +
      • summary(mmrm): summarizes the MMRM fit results.

      • print(summary.mmrm): prints the MMRM fit summary.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_tmb_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- mmrm(formula, fev_data)
     # Summary:
    @@ -224,22 +270,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.0/reference/mmrm_tidiers.html b/v0.3.0/reference/mmrm_tidiers.html index cb497fb62..48a5be814 100644 --- a/v0.3.0/reference/mmrm_tidiers.html +++ b/v0.3.0/reference/mmrm_tidiers.html @@ -1,9 +1,29 @@ - - + + + + + +Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm +Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,7 +146,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm
     tidy(x, conf.int = FALSE, conf.level = 0.95, ...)
     
    @@ -137,8 +166,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fitted model.

    @@ -170,21 +201,27 @@

    Argumentsresiduals.mmrm_tmb().

    -

    + +
    -

    Functions

    +

    Functions +

    -
    • tidy(mmrm): derives tidy tibble from an mmrm object.

    • +
        +
      • tidy(mmrm): derives tidy tibble from an mmrm object.

      • glance(mmrm): derives glance tibble from an mmrm object.

      • augment(mmrm): derives augment tibble from an mmrm object.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tmb_methods for additional methods.

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -276,22 +313,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.0/reference/mmrm_tmb_methods.html b/v0.3.0/reference/mmrm_tmb_methods.html index 386a503d9..0b3e31f5a 100644 --- a/v0.3.0/reference/mmrm_tmb_methods.html +++ b/v0.3.0/reference/mmrm_tmb_methods.html @@ -1,5 +1,25 @@ - -Methods for mmrm_tmb Objects — mmrm_tmb_methods • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm_tmb
     coef(object, complete = TRUE, ...)
     
    @@ -185,8 +214,10 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM object.

    @@ -272,15 +303,18 @@

    Arguments -

    + +
    -

    Value

    +

    Value +

    Depends on the method, see Functions.

    -

    Details

    +

    Details +

    include argument controls the variables the returned model frame will include. Possible options are "response_var", "subject_var", "visit_var" and "group_var", representing the response variable, subject variable, visit variable or group variable. @@ -288,9 +322,11 @@

    Detailsmodel.matrix.

    -

    Functions

    +

    Functions +

    -
    • coef(mmrm_tmb): obtains the estimated coefficients.

    • +
        +
      • coef(mmrm_tmb): obtains the estimated coefficients.

      • fitted(mmrm_tmb): obtains the fitted values.

      • predict(mmrm_tmb): predict conditional means for new data; optionally with standard errors and confidence or prediction intervals. @@ -324,11 +360,14 @@

        Functions -

        References

        +

        References +

        -
        • Hurvich CM, Tsai C (1989). +

          • Gałecki A, Burzykowski T (2013). +

          +
            +
          • Gałecki A, Burzykowski T (2013). “Linear mixed-effects model.” In Linear mixed-effects models using R, 245--273. Springer.

          • -
    + +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- fit_mmrm(formula, fev_data, weights = rep(1, nrow(fev_data)))
     # Estimated coefficients:
    @@ -3863,22 +3907,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.0/reference/parsnip_add_mmrm.html b/v0.3.0/reference/parsnip_add_mmrm.html index e850d10d5..9b2d15576 100644 --- a/v0.3.0/reference/parsnip_add_mmrm.html +++ b/v0.3.0/reference/parsnip_add_mmrm.html @@ -1,5 +1,25 @@ - -Register mmrm For Use With tidymodels — parsnip_add_mmrm • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -112,45 +141,55 @@
    -

    Usage

    +

    Usage +

    parsnip_add_mmrm(quietly = FALSE)
    -

    Arguments

    -
    quietly
    +

    Arguments +

    +
    +
    quietly

    logical: should progress and error messages be suppressed?

    -
    + +
    -

    Value

    +

    Value +

    A logical value indicating whether registration was successful.

    -

    Details

    +

    Details +

    We can use parsnip::show_model_info("linear_reg") to check the registration with parsnip and thus the wider tidymodels ecosystem.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/position_symbol.html b/v0.3.0/reference/position_symbol.html index ff05b82e4..3cd813242 100644 --- a/v0.3.0/reference/position_symbol.html +++ b/v0.3.0/reference/position_symbol.html @@ -1,9 +1,29 @@ - - + + + + + +Search For the Position of a Symbol — position_symbol • mmrm +Search For the Position of a Symbol — position_symbol • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    position_symbol(x, sym, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (list of language)
    a list of language objects in which to search for a specific symbol.

    @@ -137,9 +168,11 @@

    ArgumentsPosition().

    -

    + +
    -

    Value

    +

    Value +

    The position of the symbol if found, or the nomatch value @@ -147,22 +180,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/print.cov_struct.html b/v0.3.0/reference/print.cov_struct.html index f4cea831f..649f8294c 100644 --- a/v0.3.0/reference/print.cov_struct.html +++ b/v0.3.0/reference/print.cov_struct.html @@ -1,5 +1,25 @@ - -Print a Covariance Structure Object — print.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,45 +140,54 @@
    -

    Usage

    +

    Usage +

    # S3 method for cov_struct
     print(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    ...

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    x invisibly.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/reexports.html b/v0.3.0/reference/reexports.html index 8391ec297..ebc42afe9 100644 --- a/v0.3.0/reference/reexports.html +++ b/v0.3.0/reference/reexports.html @@ -1,19 +1,39 @@ - - + + + + + +Objects exported from other packages — reexports • mmrm +Objects exported from other packages — reexports • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -38,7 +60,8 @@ + - + + - + @@ -124,30 +152,36 @@

    These objects are imported from other packages. Follow the links below to see their documentation.

    -
    generics
    +
    +
    generics

    augment, glance, tidy

    -
    + + - + +
    -
    + + - - + + diff --git a/v0.3.0/reference/refit_multiple_optimizers.html b/v0.3.0/reference/refit_multiple_optimizers.html index 1e5e59637..f117f0154 100644 --- a/v0.3.0/reference/refit_multiple_optimizers.html +++ b/v0.3.0/reference/refit_multiple_optimizers.html @@ -1,5 +1,25 @@ - -Refitting MMRM with Multiple Optimizers — refit_multiple_optimizers • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    refit_multiple_optimizers(fit, ..., control = mmrm_control(...))
    -

    Arguments

    -
    fit
    +

    Arguments +

    +
    +
    fit

    (mmrm_fit)
    original model fit from fit_single_optimizer().

    @@ -129,20 +160,24 @@

    Arguments -

    Value

    +

    Value +

    The best (in terms of log likelihood) fit which converged.

    -

    Note

    +

    Note +

    For Windows, no parallel computations are currently implemented.

    -

    Examples

    +

    Examples +

    fit <- fit_single_optimizer(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data,
    @@ -153,22 +188,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.0/reference/register_on_load.html b/v0.3.0/reference/register_on_load.html index bab9c3198..5af8e73db 100644 --- a/v0.3.0/reference/register_on_load.html +++ b/v0.3.0/reference/register_on_load.html @@ -1,5 +1,25 @@ - -Helper Function for Registering Functionality With Suggests Packages — register_on_load • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    register_on_load(pkg, ver = c(NA, NA), callback, message = NULL)
    -

    Arguments

    -
    pkg
    +

    Arguments +

    +
    +
    pkg

    (string)
    A package name.

    @@ -139,9 +170,11 @@

    Arguments -

    Value

    +

    Value +

    A logical (invisibly) indicating whether registration was successful. @@ -149,22 +182,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/tmb_cov_type.html b/v0.3.0/reference/tmb_cov_type.html index b7d774e3a..e347d4763 100644 --- a/v0.3.0/reference/tmb_cov_type.html +++ b/v0.3.0/reference/tmb_cov_type.html @@ -1,5 +1,25 @@ - -Produce A Covariance Identifier Passing to TMB — tmb_cov_type • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    tmb_cov_type(cov)
    -

    Arguments

    -
    cov
    +

    Arguments +

    +
    +
    cov

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    A string used for method dispatch when passed to TMB.

    + +
    -
    + + - - + + diff --git a/v0.3.0/reference/validate_cov_struct.html b/v0.3.0/reference/validate_cov_struct.html index 53d2e2b8f..2fb092b17 100644 --- a/v0.3.0/reference/validate_cov_struct.html +++ b/v0.3.0/reference/validate_cov_struct.html @@ -1,5 +1,25 @@ - -Validate Covariance Structure Data — validate_cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    validate_cov_struct(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    x if successful, or an error is thrown otherwise.

    + +
    -
    + + - - + + diff --git a/v0.3.1/404.html b/v0.3.1/404.html index 94bad8154..9817daa77 100644 --- a/v0.3.1/404.html +++ b/v0.3.1/404.html @@ -1,5 +1,4 @@ - - + @@ -81,11 +80,10 @@ Changelog +v0.2.2 + + - + + - + @@ -110,46 +136,66 @@

    Thank you for your interest in contributing to this repo! Your contribution is highly valued. Please go through this document for guidance on how to contribute.

    -

    Programming conventions

    +

    Programming conventions +

    Please follow the programming conventions to ensure a consistent programming style across the package.

    Generally we follow the tidyverse style guide. Some specific conventions that deviate from this are explained below.

    -

    Functions

    -
    1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
    2. +

      Functions +

      +
        +
      1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
      2. Functions starting with h_ are helper functions and they should not be exported.
      3. Functions should be well documented using roxygen2 (even when they are not exported).
      4. Functions must be unit tested (even when they are not exported).
      5. -
    + +
    -

    Imports

    +

    Imports +

    In package mmrm, we follow the following convention in package imports.

    -
    1. When only a few functions from another package are needed: -
      1. In DESCRIPTION, add that package into Imports.
      2. +
          +
        1. When only a few functions from another package are needed: +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we add a importFrom with a single function from the package. -
            1. The function imported can be any random function within the package.
            2. -
          3. +
              +
            1. The function imported can be any random function within the package.
            2. +
            +
          4. Always use package::function style wherever you need to use the function.
          5. Example: stats.
          6. -
        2. +
        +
      3. When many functions from another package are needed: -
        1. In DESCRIPTION, add that package into Imports.
        2. +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we use a import to import every function.
          3. Use the functions directly without prefix.
          4. Example: checkmate.
          5. -
          -
    + + + +
    -

    Comments

    -
    • Comments should always follow sentence style.
    • +

      Comments +

      +
        +
      • Comments should always follow sentence style.
      • Comments should be as minimal as possible: Generally the code and variable names should be clear enough to not need any comments. Only use them when needed and explain the “Why” and not the “What”.
      • -
    + +
    -

    Documentation

    -
    • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

    • +

      Documentation +

      +
        +
      • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

      • Exported objects must have a lifecycle badge to clarify the maturity.

        -
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • -
      • +
          +
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • +
        +
      • Use Title Style for the title of the documentation.

      • Always include a @description part with at least one sentence describing the object.

      • @@ -161,38 +207,55 @@

        Documentationwebsite.

      • In vignettes, you cannot directly reference help pages but only pkgdown web pages. Note that this includes only exported objects. To make it look similar to the help page references, please here also use function() style.

      • mmrm_review_methods.Rmd is a large vignette and we precompute this vignette to make the GitHub actions faster. Run the script vignettes/precompile.R to regenerate the precomputed vignette and subsequently update it in GitHub. Before every release we need to run this again. Please note you need to install the package and then compile the vignette because efficiency is better after installation to provide a fair comparison.

      • -
    + +
    -

    Github conventions

    +

    Github conventions +

    When using GitHub to collaborate, the following conventions are needed:

    -
    1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. -
      • If you are going to work on this issue, please assign yourself.
      • -
    2. +
        +
      1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. +
          +
        • If you are going to work on this issue, please assign yourself.
        • +
        +
      2. Please create a branch in the mmrm repository, instead of creating forks, unless you are not yet a team member. -
        • Branches should be associated with a GitHub issue and linked to an issue id.
        • +
            +
          • Branches should be associated with a GitHub issue and linked to an issue id.
          • The name of a branch should be of the form: <issue_id>_<short_discription>.
          • -
          +
        +
      3. Add changes to the branch and push it to GitHub. -
        • Please use clear commit messages.
        • +
            +
          • Please use clear commit messages.
          • Please keep your changes focused on the issue. If there are independent changes, please separate it into another PR linking to another issue.
          • -
          +
        +
      4. Please create a Pull Request when you think your code changes are ready: -
        • Functions are well documented.
        • +
            +
          • Functions are well documented.
          • Functions have corresponding unit tests.
          • Changes pass all the GitHub action checks.
          • The checklist in the corresponding issue is completed.
          • -
          +
        +
      5. Address all the comments you receive. -
        • at least one approval is needed to merge.
        • -
      6. -
    +
      +
    • at least one approval is needed to merge.
    • +
    + + +
    -

    Contribution tips

    +

    Contribution tips +

    -

    Development environment Set-up

    +

    Development environment Set-up +

    The development this mmrm package is based on the latest R version and C++ compilers. The package dependencies are the most recent versions from CRAN. We recommend that your working environment is set up in the same way. Additionally, there are some tools we recommend you to install:

    -
    1. +
        +
      1. RTools if you work on a Windows operating system. Alternatively you can use docker to separate the operating system and the development system.
      2. GitKraken is a very useful user interface for git including visualization of git commit graphs, file history, etc.
      3. @@ -200,43 +263,82 @@

        Development environment Set-uplintr will allow you to perform static code analysis.
      4. pre-commit is a Python module that allows you to identify issues before you commit locally.
      5. -

    + +
    -

    Issue labels

    +

    Issue labels +

    The issues are categorized with several labels:

    - +
    Label name
    ++++ + + - + + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + -
    Label name Description
    SPx
    SPx SP (story points) indicate complexity, and the larger the subsequent number, the more time consuming the issue is expected to be
    priority
    priority Issues with this label should be completed with higher priority
    good first issue
    good first issue Good choices for new team members
    blocked
    blocked Blocked by other issues
    bug
    bug Something isn’t working
    devops
    devops Development and Operation
    discussion
    discussion Discussion needed
    documentation
    documentation Improvement of documentation is needed
    duplicate
    duplicate The issue already exists
    enhancement
    enhancement New feature or request
    help wanted
    help wanted Extra attention is needed
    invalid
    invalid This doesn’t seem right
    question
    question Further information needed

    Please choose an issue based on your interest, issue complexity, and priority.

    + + + +

    Please choose an issue based on your interest, issue complexity, and priority.

    -

    Add new unit tests

    +

    Add new unit tests +

    To add a new unit test, you need to first identify the test scope. Does the test fit in the scope of existing tests? If so, please modify the existing test files under tests/testthat/ folder or src/ folder, depending on whether the code to be tested is R or C++. Otherwise please create a new test file, with a name prefix of “test-”.

    In each test case, use the following structure:

    @@ -249,19 +351,25 @@ 

    Add new unit tests -

    Add integration tests

    +

    Add integration tests +

    Integration tests compare the results of SAS and R and assures the quality of our code. To add an integration test, you need to do the following:

    -
    1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
    2. +
        +
      1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
      2. Save the results in .txt format in the design/SAS/ folder.
      3. Decide the key outputs that are needed for comparison.
      4. Add a unit test verifying that the R implementation of the same model has the same results (conversion may be needed).
      5. -
    + +
    -

    Get started with C++

    +

    Get started with C++ +

    If you have no experience with C++, it is totally fine: TMB has provided us with many high-level functionalities that is very similar to R. Here we only list the most important things that you need to go through before you begin C++ programming.

    -
    1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
    2. +
        +
      1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
      2. Types. C++ is a strong type programming language and all objects need to be declared with type. Sometimes you can combine the declaration and definition. -
        1. +
            +
          1. int i = 1; This works, as we declare i as int and define it to be 1.
          2. i = 1; This fails, because i is not declared yet.
          3. @@ -269,53 +377,70 @@

            Get started with C++
          4. in R, if (TRUE) { a = '123' }; print(a) is legal.
          5. +
              +
            1. in R, if (TRUE) { a = '123' }; print(a) is legal.
            2. in C++, if (1) {string a = '123'}; std::stdout << a << std::endl; is illegal, because object a is terminated already.
            3. in C++, string a; if (1) {a = '123'}; std::stdout << a << std::endl; is legal, a is declared prior to if statement.
            4. -
            +

          +
        2. Polymorphism. Unlike in R, where function arguments have no explicitly defined types, in C++ the type of each argument of a function must be pre-specified. -
          1. +
              +
            1. Template is a special function that works with generic argument type. We could imagine a single function that could work on arguments of arbitrary type, and template functions make this possible through separation of function logic from the argument declaration. In this way we can use template functions and avoid the need to replicate the whole code for each type.
            2. -
          2. -

          With these points in mind, you are about ready to go.

          +
        +
      3. +
      +

      With these points in mind, you are about ready to go.

    -

    Get started with TMB

    +

    Get started with TMB +

    In mmrm we are not including any latent variables and so the Laplace approximation aspect of TMB is not used. We only use the automatic differentiation part of TMB. For detailed documentation of TMB, visit the TMB reference.

    One important feature of TMB are the R style matrix/array calculations. This is important because we mainly use this part to conduct our calculations. See matrix_arrays.cpp for examples.

    -

    Add a new covariance structure

    +

    Add a new covariance structure +

    To add a new covariance structure, you need to do the following:

    -
    1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
    2. +
        +
      1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
      2. Implement the covariance structure on the C++ side and the corresponding R interface.
      3. Add unit tests to make sure the new covariance structure is working as expected.
      4. Add integration tests under design/SAS/ folder to make sure SAS and R produce similar results (within tolerance).
      5. -
    + +
    -

    Add additional data

    +

    Add additional data +

    To add additional data to mmrm, please follow the next steps:

    -
    1. Make sure the data is needed.
    2. +
        +
      1. Make sure the data is needed.
      2. Document the data in R/data.R.
      3. Use save to create an rda data only containing this dataset. Here the function usethis::use_data can also be helpful.
      4. -
    + +
    -

    Communications within team

    +

    Communications within team +

    There are several communication channels, please use appropriate ones.

    -

    GitHub

    +

    GitHub +

    GitHub issues and pull requests are where implementations are discussed and reviewed. Feature requests, bugs, enhancements, technical implementations can be discussed here. When you have ideas that needs to be documented, it is better to have them in GitHub.

    -

    Slack

    +

    Slack +

    Slack is a messaging tool and we have the mmrm channel under the rinpharma space. You can put anything in the slack channel, e.g., you have completed a issue and are waiting for review, or you have some questions and don’t want to wait until the next stand-up meeting.

    To join the slack channel, please make sure you have a slack account, and send the email address to any team member.

    -

    Stand-up meetings

    +

    Stand-up meetings +

    We have stand-up meetings currently three times a week. The purpose of stand-up meetings is for team members to discuss the current work progress and raise any issue/questions for team discussion if needed.

    You don’t need to join all three meetings.

    @@ -323,22 +448,26 @@

    Stand-up meetings

    + + + + - - + + diff --git a/v0.3.1/PULL_REQUEST_TEMPLATE.html b/v0.3.1/PULL_REQUEST_TEMPLATE.html index c9a664352..314da7cf7 100644 --- a/v0.3.1/PULL_REQUEST_TEMPLATE.html +++ b/v0.3.1/PULL_REQUEST_TEMPLATE.html @@ -1,5 +1,23 @@ - -Description • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +44,8 @@ + - + + - + @@ -111,22 +137,26 @@ - + +
    -
    + + - - + + diff --git a/v0.3.1/articles/algorithm.html b/v0.3.1/articles/algorithm.html index cc8bc195a..f4f1d22c9 100644 --- a/v0.3.1/articles/algorithm.html +++ b/v0.3.1/articles/algorithm.html @@ -1,5 +1,4 @@ - - + @@ -83,11 +82,10 @@ Changelog +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + - + + - + @@ -109,73 +135,101 @@

    Introduction

    -
    Package Introduction
    +
    +
    Package Introduction
    -
    Mixed Models for Repeated Measures
    + +
    Mixed Models for Repeated Measures
    -
    Comparison with other software
    + +
    Comparison with other software
    -
    + +
    +

    Covariance Structures

    -
    Covariance Structures
    +
    +
    Covariance Structures
    -
    + + + + + + + + + + + + + + + + +
    -
    + + - - + + diff --git a/v0.3.1/articles/introduction.html b/v0.3.1/articles/introduction.html index e1b6586a0..6812c1331 100644 --- a/v0.3.1/articles/introduction.html +++ b/v0.3.1/articles/introduction.html @@ -1,5 +1,4 @@ - - + @@ -83,11 +82,10 @@ Changelog +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + - + + - + @@ -108,7 +134,8 @@

    Authors

    -
    • +
        +
      • Daniel Sabanes Bove. Author, maintainer.

      • @@ -180,7 +207,8 @@

        Authors

        AstraZeneca plc. Copyright holder, funder.

        -
    + +

    Citation

    @@ -199,22 +227,26 @@

    Citation

    }
    + +
    -
    + + - - + + diff --git a/v0.3.1/index.html b/v0.3.1/index.html index 38ec47096..0bc627099 100644 --- a/v0.3.1/index.html +++ b/v0.3.1/index.html @@ -1,5 +1,4 @@ - - + @@ -107,11 +106,10 @@ Changelog +v0.2.2 + + - + + - + @@ -107,10 +133,13 @@
    -

    mmrm 0.3.1

    +

    mmrm 0.3.1 +

    -

    New Features

    -
    • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
    • +

      New Features +

      +
        +
      • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
      • Add empirical, empirical Jackknife and empirical bias-reduced adjusted coefficients covariance estimates, which can be specified via the new vcov argument of mmrm().
      • Add residual and between-within degrees of freedom methods.
      • Add Kenward-Roger support for spatial covariance structures.
      • @@ -121,74 +150,103 @@

        New FeaturesAdd tidy(), glance() and augment() methods to tidy the fit results into summary tables.
      • Add tidymodels framework support via a parsnip interface.
      • Add argument covariance to mmrm() to allow for easier programmatic access to specifying the model’s covariance structure and to expose covariance customization through the tidymodels interface.
      • -

    + +
    -

    Bug Fixes

    -
    • Previously mmrm() follows the global option na.action and if it is set other than "na.omit" an assertion would fail. This is now fixed and hence NA values are always removed prior to model fitting, independent of the global na.action option.
    • +

      Bug Fixes +

      +
        +
      • Previously mmrm() follows the global option na.action and if it is set other than "na.omit" an assertion would fail. This is now fixed and hence NA values are always removed prior to model fitting, independent of the global na.action option.
      • Previously a model.frame() call on an mmrm object with transformed terms, or new data, e.g. model.frame(mmrm(Y ~ log(X) + ar1(VISIT|ID), data = new_data), would fail. This is now fixed.
      • Previously mmrm() always required a data argument. Now fitting mmrm can also use environment variables instead of requiring data argument. (Note that fit_mmrm is not affected.)
      • Previously emmeans() failed when using transformed terms or not including the visit variable in the model formula. This is now fixed.
      • Previously mmrm() might provide non-finite values in the Jacobian calculations, leading to errors in the Satterthwaite degrees of freedom calculations. This will raise an error now and thus alert the user that the model fit was not successful.
      • -
    + +
    -

    Miscellaneous

    -
    • Use automatic differentiation to calculate Satterthwaite adjusted degrees of freedom, resulting in 10-fold speed-up of the Satterthwaite calculations after the initial model fit.
    • +

      Miscellaneous +

      +
        +
      • Use automatic differentiation to calculate Satterthwaite adjusted degrees of freedom, resulting in 10-fold speed-up of the Satterthwaite calculations after the initial model fit.
      • Add an interactive confirmation step if the number of visit levels is too large for non-spatial covariance structures. Use options(mmrm.max_visits = ) to specify the maximum number of visits allowed in non-interactive mode.
      • Removed free_cores() in favor of parallelly::availableCores(omit = 1).
      • The model.frame() method has been updated: The full argument is deprecated and the include argument can be used instead; by default all relevant variables are returned. Furthermore, it returns a data.frame the size of the number of observations utilized in the model for all combinations of the include argument when na.action= "na.omit".
      • -
    + +
    -

    mmrm 0.2.2

    CRAN release: 2022-12-20

    +

    mmrm 0.2.2 +

    +

    CRAN release: 2022-12-20

    -

    New Features

    -
    • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
    • +

      New Features +

      +
        +
      • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
      • Update the mmrm arguments to allow users more fine-grained control, e.g. mmrm(..., start = start, optimizer = c("BFGS", "nlminb")) to set the starting values for the variance estimates and to choose the available optimizers. These arguments will be passed to the new function mmrm_control.
      • Add new argument drop_visit_levels to allow users to keep all levels in visits, even when they are not observed in the data. Dropping unobserved levels was done silently previously, and now a message will be given. See ?mmrm_control for more details.
      • -
    + +
    -

    Bug Fixes

    -
    • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
    • +

      Bug Fixes +

      +
        +
      • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
      • Previously in mmrm calls, the weights object in the environment where the formula is defined was replaced by the weights used internally. Now this behavior is removed and your variable weights e.g. in the global environment will no longer be replaced.
      • -
    + +
    -

    Miscellaneous

    -
    • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
    • +

      Miscellaneous +

      +
        +
      • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
      • Deprecated optimizer = "automatic" in favor of not specifying the optimizer. By default, all remaining optimizers will be tried if the first optimizer fails to reach convergence.
      • -
    + +
    -

    mmrm 0.1.5

    CRAN release: 2022-10-18

    -
    • First CRAN version of the package.
    • +

      mmrm 0.1.5 +

      +

      CRAN release: 2022-10-18

      +
        +
      • First CRAN version of the package.
      • The package fits mixed models for repeated measures (MMRM) based on the marginal linear model without random effects.
      • The motivation for this package is to have a fast, reliable (in terms of convergence behavior) and feature complete implementation of MMRM in R.
      • -
      -

      New Features

      -
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • +
      +
      +

      New Features +

      +
        +
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • Fast C++ implementation of Maximum Likelihood (ML) and Restricted Maximum Likelihood (REML) estimation.
      • Currently Satterthwaite adjusted degrees of freedom calculation is supported.
      • Interface to the emmeans package for computing estimated marginal means (also called least-square means) for the coefficients.
      • Multiple optimizers are run to reach convergence in as many cases as possible.
      • Flexible formula based model specification and support for standard S3 methods such as summary, logLik, etc.
      • -
      +
    +
    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/COV_TYPES.html b/v0.3.1/reference/COV_TYPES.html index 57d6994f4..bf74bcdf4 100644 --- a/v0.3.1/reference/COV_TYPES.html +++ b/v0.3.1/reference/COV_TYPES.html @@ -1,5 +1,25 @@ - -Covariance Type Database — COV_TYPES • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,14 +140,17 @@
    -

    Usage

    +

    Usage +

    COV_TYPES
    -

    Format

    +

    Format +

    A data frame with 5 variables and one record per covariance type:

    -
    name
    +
    +
    name

    The long-form name of the covariance structure type

    abbr
    @@ -138,25 +169,30 @@

    Format<

    A logical value indicating whether the covariance structure is spatial.

    -

    + + + +
    -
    + + - - + + diff --git a/v0.3.1/reference/as.cov_struct.html b/v0.3.1/reference/as.cov_struct.html index 2e40cfce2..7c8273214 100644 --- a/v0.3.1/reference/as.cov_struct.html +++ b/v0.3.1/reference/as.cov_struct.html @@ -1,5 +1,25 @@ - -Coerce into a Covariance Structure Definition — as.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    as.cov_struct(x, ...)
     
     # S3 method for formula
    @@ -120,8 +149,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    an object from which to derive a covariance structure. See object specific sections for details.

    @@ -134,44 +165,66 @@

    Arguments -

    Value

    +

    Value +

    A cov_struct() object.

    -

    Details

    +

    Details +

    A covariance structure can be parsed from a model definition formula or call. Generally, covariance structures defined using non-standard evaluation take the following form:

    -

    type( (visit, )* visit | (group /)? subject )

    +

    +
    +
    type( (visit, )* visit | (group /)? subject )
    +

    +

    For example, formulas may include terms such as

    -

    us(time | subject)
    +

    +
    +
    us(time | subject)
     cp(time | group / subject)
    -sp_exp(coord1, coord2 | group / subject)

    +sp_exp(coord1, coord2 | group / subject)
    +

    +

    Note that only sp_exp (spatial) covariance structures may provide multiple coordinates, which identify the Euclidean distance between the time points.

    -

    Methods (by class)

    +

    Methods (by class) +

    -
    • as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be +

        +
      • +

        as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be covariance structure definitions and must follow the form:

        -

        y ~ xs + type( (visit, )* visit | (group /)? subject )

        +

        +
        +
        y ~ xs + type( (visit, )* visit | (group /)? subject )
        +

        +

        Any component on the right hand side of a formula is considered when -searching for a covariance definition.

      • -
    +searching for a covariance definition.

    + + +
    -

    See also

    +

    See also +

    Other covariance types: cov_struct(), covariance_types

    -

    Examples

    +

    Examples +

    # provide a covariance structure as a right-sided formula
     as.cov_struct(~ csh(visit | group / subject))
     #> <covariance structure>
    @@ -191,22 +244,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.1/reference/bcva_data.html b/v0.3.1/reference/bcva_data.html index 6614600b8..31d301b7d 100644 --- a/v0.3.1/reference/bcva_data.html +++ b/v0.3.1/reference/bcva_data.html @@ -1,5 +1,25 @@ - -Example Data on BCVA — bcva_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,48 +140,59 @@
    -

    Usage

    +

    Usage +

    bcva_data
    -

    Format

    -

    A tibble with 10,000 rows and 7 variables:

    • USUBJID: subject ID.

    • +

      Format +

      +

      A tibble with 10,000 rows and 7 variables:

      +
        +
      • USUBJID: subject ID.

      • VISITN: visit number (numeric).

      • AVISIT: visit number (factor).

      • ARMCD: treatment, TRT or CTL.

      • RACE: 3-category race.

      • BCVA_BL: BCVA at baseline.

      • BCVA_CHG: Change in BCVA at study visits.

      • -
    + +
    -

    Source

    +

    Source +

    This is an artificial dataset.

    -

    Note

    +

    Note +

    Measurements of BCVA (best corrected visual acuity) is a measure of how how many letters a person can read off of an eye chart using corrective lenses or contacts. This a common endpoint in ophthalmology trials.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/cached_mmrm_results.html b/v0.3.1/reference/cached_mmrm_results.html index 716c80bf4..3979705e4 100644 --- a/v0.3.1/reference/cached_mmrm_results.html +++ b/v0.3.1/reference/cached_mmrm_results.html @@ -1,5 +1,25 @@ - -Cache Data for mmrm Model Comparison — cached_mmrm_results • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,25 +140,32 @@
    -

    Usage

    +

    Usage +

    cached_mmrm_results
    -

    Format

    -

    A list with following elements:

    • conv_time_fev: Convergence time on FEV data.

    • +

      Format +

      +

      A list with following elements:

      +
        +
      • conv_time_fev: Convergence time on FEV data.

      • conv_time_bcva: Convergence time on BCVA data.

      • rel_diff_ests_tbl_fev: Relative difference in estimates on FEV data.

      • rel_diff_ests_tbl_bcva: Relative difference in estimates on BCVA data.

      • conv_rate: Convergence rate on data with different missing levels.

      • df_missingness: Summary of missingness on simulated data.

      • -
    + +
    -

    Source

    +

    Source +

    This is created based on simulations on FEV data and BCVA data.

    -

    Note

    +

    Note +

    The cached data for comparison is used for the vignettes generation. Please make sure that this data is refreshed before each package release by running the script data-raw/mmrm_review.R. @@ -139,22 +174,26 @@

    Note

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/check_package_version.html b/v0.3.1/reference/check_package_version.html index 32f50cc58..c6ff98023 100644 --- a/v0.3.1/reference/check_package_version.html +++ b/v0.3.1/reference/check_package_version.html @@ -1,5 +1,25 @@ - -Check Suggested Dependency Against Version Requirements — check_package_version • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    check_package_version(pkg, ver = c(NA_character_, NA_character_))
    -

    Arguments

    -
    pkg
    +

    Arguments +

    +
    +
    pkg

    (string)
    package name.

    @@ -128,9 +159,11 @@

    Arguments -

    Value

    +

    Value +

    A logical (invisibly) indicating whether the loaded package meets @@ -138,22 +171,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/component.html b/v0.3.1/reference/component.html index e5d840f42..8f34420dc 100644 --- a/v0.3.1/reference/component.html +++ b/v0.3.1/reference/component.html @@ -1,5 +1,25 @@ - -Component Access for mmrm_tmb Objects — component • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    component(
       object,
       name = c("cov_type", "subject_var", "n_theta", "n_subjects", "n_timepoints", "n_obs",
    @@ -124,24 +153,31 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    name

    (character)
    the component(s) to be retrieved.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding component of the object, see details.

    -

    Details

    -

    Available component() names are as follows:

    • call: low-level function call which generated the model.

    • +

      Details +

      +

      Available component() names are as follows:

      +
    + +
    -

    See also

    +

    See also +

    In the lme4 package there is a similar function getME().

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -3079,22 +3118,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.1/reference/cov_struct.html b/v0.3.1/reference/cov_struct.html index b122b6ac1..a8fe2c367 100644 --- a/v0.3.1/reference/cov_struct.html +++ b/v0.3.1/reference/cov_struct.html @@ -1,5 +1,25 @@ - -Define a Covariance Structure — cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    cov_struct(
       type = cov_types(),
       visits,
    @@ -123,8 +152,10 @@ 

    Usage

    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    the name of the covariance structure type to use. For available options, see cov_types(). If a type abbreviation is used that implies heterogeneity (e.g. cph) and no value is provided to @@ -150,22 +181,26 @@

    Arguments -

    Value

    +

    Value +

    A cov_struct object.

    -

    See also

    +

    See also +

    Other covariance types: as.cov_struct(), covariance_types

    -

    Examples

    +

    Examples +

    cov_struct("csh", "AVISITN", "USUBJID")
     #> <covariance structure>
     #> heterogeneous compound symmetry:
    @@ -182,22 +217,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.1/reference/cov_type_abbr.html b/v0.3.1/reference/cov_type_abbr.html index fb91632cc..13e2444d1 100644 --- a/v0.3.1/reference/cov_type_abbr.html +++ b/v0.3.1/reference/cov_type_abbr.html @@ -1,5 +1,25 @@ - -Retrieve Associated Abbreviated Covariance Structure Type Name — cov_type_abbr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    cov_type_abbr(type)
    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    either a full name or abbreviate covariance structure type name to collapse into an abbreviated type.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding abbreviated covariance type name.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/cov_type_name.html b/v0.3.1/reference/cov_type_name.html index 3b269c0b8..62e9e3c34 100644 --- a/v0.3.1/reference/cov_type_name.html +++ b/v0.3.1/reference/cov_type_name.html @@ -1,5 +1,25 @@ - -Retrieve Associated Full Covariance Structure Type Name — cov_type_name • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    cov_type_name(type)
    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    either a full name or abbreviate covariance structure type name to convert to a long-form type.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding abbreviated covariance type name.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/covariance_types.html b/v0.3.1/reference/covariance_types.html index b7bcfec0d..1dad213a6 100644 --- a/v0.3.1/reference/covariance_types.html +++ b/v0.3.1/reference/covariance_types.html @@ -1,5 +1,25 @@ - -Covariance Types — covariance_types • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    cov_types(
       form = c("name", "abbr", "habbr"),
       filter = c("heterogeneous", "spatial")
    @@ -120,8 +149,10 @@ 

    Usage

    -

    Arguments

    -
    form
    +

    Arguments +

    +
    +
    form

    (character)
    covariance structure type name form. One or more of "name", "abbr" (abbreviation), or "habbr" (heterogeneous abbreviation).

    @@ -131,67 +162,155 @@

    Arguments or "spatial".

    -

    + +
    -

    Value

    +

    Value +

    A character vector of accepted covariance structure type names and abbreviations.

    -

    Note

    +

    Note +

    The ante-dependence covariance structure in this package refers to homogeneous ante-dependence, while the ante-dependence covariance structure from SAS PROC MIXED refers to heterogeneous ante-dependence and the homogeneous version is not available in SAS.

    For all non-spatial covariance structures, the time variable must -be coded as a factor.

    -

    Spatial Covariance structures:

    +be coded as a factor.

    +
    +

    Spatial Covariance structures: +

    -
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)

    where \(d_{ij}\) denotes the Euclidean distance between time points + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)
    +

    where \(d_{ij}\) denotes the Euclidean distance between time points \(i\) and \(j\).

    -

    Abbreviations for Covariance Structures

    +

    Abbreviations for Covariance Structures +

    -

    Common Covariance Structures:

    +

    Common Covariance Structures: +

    -
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)
    +

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, respectively, out of total \(m\) time points, \(1 \leq i, j \leq m\).

    -

    See also

    +

    See also +

    Other covariance types: as.cov_struct(), cov_struct()

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/df_1d.html b/v0.3.1/reference/df_1d.html index 72ff9ece0..a32386a92 100644 --- a/v0.3.1/reference/df_1d.html +++ b/v0.3.1/reference/df_1d.html @@ -1,9 +1,29 @@ - - + + + + + +Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm +Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    df_1d(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -133,16 +164,19 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -168,22 +202,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.1/reference/df_md.html b/v0.3.1/reference/df_md.html index e894dc260..a1947c60f 100644 --- a/v0.3.1/reference/df_md.html +++ b/v0.3.1/reference/df_md.html @@ -1,11 +1,31 @@ - - + + + + + +Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm +Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -121,13 +149,16 @@
    -

    Usage

    +

    Usage +

    df_md(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -137,16 +168,19 @@

    Arguments -

    Value

    +

    Value +

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

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -169,22 +203,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.1/reference/drop_elements.html b/v0.3.1/reference/drop_elements.html index cc217a147..ae76b0ae2 100644 --- a/v0.3.1/reference/drop_elements.html +++ b/v0.3.1/reference/drop_elements.html @@ -1,5 +1,25 @@ - -Drop Items from an Indexible — drop_elements • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    drop_elements(x, n)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    Any object that can be consumed by seq_along() and indexed by a logical vector of the same length.

    @@ -126,31 +157,37 @@

    Arguments -

    Value

    +

    Value +

    A subset of x.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/emit_tidymodels_register_msg.html b/v0.3.1/reference/emit_tidymodels_register_msg.html index 058a676db..432041c3d 100644 --- a/v0.3.1/reference/emit_tidymodels_register_msg.html +++ b/v0.3.1/reference/emit_tidymodels_register_msg.html @@ -1,5 +1,25 @@ - -Format a Message to Emit When Tidymodels is Loaded — emit_tidymodels_register_msg • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,12 +140,14 @@
    -

    Usage

    +

    Usage +

    emit_tidymodels_register_msg()
    -

    Value

    +

    Value +

    A character message to emit. Either a ansi-formatted cli output if @@ -125,22 +155,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/emmeans_support.html b/v0.3.1/reference/emmeans_support.html index eb11243c7..a1866cdf2 100644 --- a/v0.3.1/reference/emmeans_support.html +++ b/v0.3.1/reference/emmeans_support.html @@ -1,11 +1,31 @@ - - + + + + + +Support for emmeans — emmeans_support • mmrm +Support for emmeans — emmeans_support • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - +
    @@ -123,7 +152,8 @@
    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -156,22 +186,26 @@ 

    Examples#> Confidence level used: 0.95

    -
    + +
    + + - - + + diff --git a/v0.3.1/reference/fev_data.html b/v0.3.1/reference/fev_data.html index 7b8a10776..bc4e90444 100644 --- a/v0.3.1/reference/fev_data.html +++ b/v0.3.1/reference/fev_data.html @@ -1,5 +1,25 @@ - -Example Data on FEV1 — fev_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,17 @@
    -

    Usage

    +

    Usage +

    fev_data
    -

    Format

    -

    A tibble with 800 rows and 7 variables:

    • USUBJID: subject ID.

    • +

      Format +

      +

      A tibble with 800 rows and 7 variables:

      +
        +
      • USUBJID: subject ID.

      • AVISIT: visit number.

      • ARMCD: treatment, TRT or PBO.

      • RACE: 3-category race.

      • @@ -126,35 +158,42 @@

        Format<
      • FEV1_BL: FEV1 at baseline (%).

      • FEV1: FEV1 at study visits.

      • WEIGHT: weighting variable.

      • -

    + +
    -

    Source

    +

    Source +

    This is an artificial dataset.

    -

    Note

    +

    Note +

    Measurements of FEV1 (forced expired volume in one second) is a measure of how quickly the lungs can be emptied. Low levels of FEV1 may indicate chronic obstructive pulmonary disease (COPD).

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/fill_names.html b/v0.3.1/reference/fill_names.html index 25160be93..e72133e6d 100644 --- a/v0.3.1/reference/fill_names.html +++ b/v0.3.1/reference/fill_names.html @@ -1,5 +1,25 @@ - -Complete character Vector Names From Values — fill_names • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    fill_names(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character or list)
    value whose names should be completed from element values.

    -
    + +
    -

    Value

    +

    Value +

    A named vector or list.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/fit_mmrm.html b/v0.3.1/reference/fit_mmrm.html index 59f50ece2..10155ac54 100644 --- a/v0.3.1/reference/fit_mmrm.html +++ b/v0.3.1/reference/fit_mmrm.html @@ -1,11 +1,31 @@ - - + + + + + +Low-Level Fitting Function for MMRM — fit_mmrm • mmrm +Low-Level Fitting Function for MMRM — fit_mmrm • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -121,7 +149,8 @@
    -

    Usage

    +

    Usage +

    fit_mmrm(
       formula,
       data,
    @@ -135,8 +164,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    model formula with exactly one special term specifying the visits within subjects, see details.

    @@ -175,15 +206,18 @@

    Argumentsmmrm_control().

    -

    + +
    -

    Value

    +

    Value +

    List of class mmrm_tmb, see h_mmrm_tmb_fit() for details.

    + + - - + + diff --git a/v0.3.1/reference/fit_single_optimizer.html b/v0.3.1/reference/fit_single_optimizer.html index 4e32563b9..b500c3f4e 100644 --- a/v0.3.1/reference/fit_single_optimizer.html +++ b/v0.3.1/reference/fit_single_optimizer.html @@ -1,9 +1,29 @@ - - + + + + + +Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm +Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,7 +146,8 @@
    -

    Usage

    +

    Usage +

    fit_single_optimizer(
       formula,
       data,
    @@ -133,8 +162,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -174,9 +205,11 @@

    Arguments -

    Value

    +

    Value +

    The mmrm_fit object, with additional attributes containing warnings, @@ -184,7 +217,8 @@

    Value

    mmrm_tmb
    contents.

    + +
    - - + + diff --git a/v0.3.1/reference/flat_expr.html b/v0.3.1/reference/flat_expr.html index 8625557de..02b1e3429 100644 --- a/v0.3.1/reference/flat_expr.html +++ b/v0.3.1/reference/flat_expr.html @@ -1,11 +1,31 @@ - - + + + + + +Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm +Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -121,61 +149,86 @@
    -

    Usage

    +

    Usage +

    flatten_call(call)
     
     flatten_expr(expr)
    -

    Arguments

    -
    call, expr
    +

    Arguments +

    +
    +
    call, expr

    (language)
    a language object to flatten.

    -
    + +
    -

    Value

    +

    Value +

    A list of atomic values, symbols, infix operator names and subexpressions.

    -

    Details

    +

    Details +

    Where 1 + 2 | 3 in R's syntax tree is (|, (+, 1, 2), 3), flattening it into its visual order produces (1, +, 2, |, 3), which makes for more fluent interpretation of non-standard grammar rules used in formulas.

    -

    Functions

    +

    Functions +

    -
    • flatten_call(): Flatten a call into a list of names and argument expressions.

      +
        +
      • +

        flatten_call(): Flatten a call into a list of names and argument expressions.

        The call name and all arguments are flattened into the same list, meaning a call of the form sp_exp(a, b, c | d / e) produces a list of the form (sp_exp, a, b, c, |, d, /, e).

        -

        flatten_call(quote(sp_exp(a, b, c | d / e)))

      • -
      • flatten_expr(): Flatten nested expressions

        -

        flatten_expr(quote(1 + 2 + 3 | 4))

      • -
    +

    +
    +
    flatten_call(quote(sp_exp(a, b, c | d / e)))
    +

    +
    + +
  • +

    flatten_expr(): Flatten nested expressions

    +

    +
    +
    flatten_expr(quote(1 + 2 + 3 | 4))
    +

    +
    +
  • + + + +
    -
    + + - - + + diff --git a/v0.3.1/reference/format.cov_struct.html b/v0.3.1/reference/format.cov_struct.html index 8b460c6f6..89840fe1e 100644 --- a/v0.3.1/reference/format.cov_struct.html +++ b/v0.3.1/reference/format.cov_struct.html @@ -1,5 +1,25 @@ - -Format Covariance Structure Object — format.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,45 +140,54 @@
    -

    Usage

    +

    Usage +

    # S3 method for cov_struct
     format(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    ...

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string for x.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/format_symbols.html b/v0.3.1/reference/format_symbols.html index 8a558b931..6b6583e9d 100644 --- a/v0.3.1/reference/format_symbols.html +++ b/v0.3.1/reference/format_symbols.html @@ -1,7 +1,27 @@ - -Format Symbol Objects — format_symbols • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,40 +143,49 @@
    -

    Usage

    +

    Usage +

    format_symbols(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character) A vector of variable names.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string of comma-separated variables.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/formula_rhs.html b/v0.3.1/reference/formula_rhs.html index 89df4bbde..15e12b378 100644 --- a/v0.3.1/reference/formula_rhs.html +++ b/v0.3.1/reference/formula_rhs.html @@ -1,5 +1,25 @@ - -Extract Right-Hand-Side (rhs) from Formula — formula_rhs • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,47 +140,60 @@
    -

    Usage

    +

    Usage +

    formula_rhs(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula.

    -
    + +
    -

    Value

    +

    Value +

    A formula without a response, derived from the right-hand-side of the formula, f.

    -

    formula_rhs(a ~ b + c)
    -formula_rhs(~ b + c)

    +

    +
    +
    formula_rhs(a ~ b + c)
    +formula_rhs(~ b + c)
    +

    +
    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_add_covariance_terms.html b/v0.3.1/reference/h_add_covariance_terms.html index 5aff152be..402f82131 100644 --- a/v0.3.1/reference/h_add_covariance_terms.html +++ b/v0.3.1/reference/h_add_covariance_terms.html @@ -1,5 +1,25 @@ - -Add Individual Covariance Variables As Terms to Formula — h_add_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_add_covariance_terms(f, covariance)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula to which covariance structure terms should be added.

    @@ -127,37 +158,44 @@

    Arguments -

    Value

    +

    Value +

    A new formula with included covariance terms.

    -

    Details

    +

    Details +

    stats::update() is used to append the covariance structure and the environment attribute will not be changed. This ensures the returned formula and the input formula have the same environment.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_add_terms.html b/v0.3.1/reference/h_add_terms.html index 1118b8e79..13c20685a 100644 --- a/v0.3.1/reference/h_add_terms.html +++ b/v0.3.1/reference/h_add_terms.html @@ -1,5 +1,25 @@ - -Add Formula Terms with Character — h_add_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_add_terms(f, adds, drop_response = FALSE)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula to be updated.

    @@ -129,37 +160,44 @@

    Arguments -

    Value

    +

    Value +

    A new formula with elements in drops removed.

    -

    Details

    +

    Details +

    Elements in adds will be added from the formula, while the environment of the formula is unchanged. If adds is NULL or character(0), the formula is unchanged.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_coef_table.html b/v0.3.1/reference/h_coef_table.html index 9919ec9fa..3cdcf0888 100644 --- a/v0.3.1/reference/h_coef_table.html +++ b/v0.3.1/reference/h_coef_table.html @@ -1,5 +1,25 @@ - -Coefficients Table for MMRM Fit — h_coef_table • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,18 +140,23 @@
    -

    Usage

    +

    Usage +

    h_coef_table(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    model fit.

    -
    + +
    -

    Value

    +

    Value +

    Matrix with one row per coefficient and columns @@ -131,22 +164,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_confirm_large_levels.html b/v0.3.1/reference/h_confirm_large_levels.html index db54df2a0..eeea188e1 100644 --- a/v0.3.1/reference/h_confirm_large_levels.html +++ b/v0.3.1/reference/h_confirm_large_levels.html @@ -1,7 +1,27 @@ - -Ask for Confirmation on Large Visit Levels — h_confirm_large_levels • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,34 +143,42 @@
    -

    Usage

    +

    Usage +

    h_confirm_large_levels(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (numeric)
    number of visit levels.

    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_construct_model_frame_inputs.html b/v0.3.1/reference/h_construct_model_frame_inputs.html index 9632721d5..de67f2ebd 100644 --- a/v0.3.1/reference/h_construct_model_frame_inputs.html +++ b/v0.3.1/reference/h_construct_model_frame_inputs.html @@ -1,13 +1,33 @@ - - + + + + + +Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm +Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -32,7 +54,8 @@ + - + + - + @@ -124,7 +152,8 @@
    -

    Usage

    +

    Usage +

    h_construct_model_frame_inputs(
       formula,
       data,
    @@ -135,8 +164,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (mmrm)
    mmrm fit object.

    @@ -152,36 +183,45 @@

    Arguments -

    Value

    +

    Value +

    -

    named list with four elements:

    • "formula": the formula including the columns requested in the include= argument.

    • +

      named list with four elements:

      +
        +
      • "formula": the formula including the columns requested in the include= argument.

      • "formula_full": the formula including all columns

      • "data": a data frame including all columns where factor and character columns have been processed with h_factor_ref().

      • "is_full": a logical scalar indicating if the formula and full formula are identical

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_default_value.html b/v0.3.1/reference/h_default_value.html index e1a7263d0..6e8e07b68 100644 --- a/v0.3.1/reference/h_default_value.html +++ b/v0.3.1/reference/h_default_value.html @@ -1,9 +1,29 @@ - -Default Value on NULL -Return default value when first argument is NULL. — h_default_value • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,42 +146,51 @@
    -

    Usage

    +

    Usage +

    h_default_value(x, y)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    Object.

    y

    Object.

    -
    + +
    -

    Details

    +

    Details +

    If x is NULL, returns y. Otherwise return x.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_df_1d_bw.html b/v0.3.1/reference/h_df_1d_bw.html index db17a2106..871beb845 100644 --- a/v0.3.1/reference/h_df_1d_bw.html +++ b/v0.3.1/reference/h_df_1d_bw.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom for One-Dimensional Contrast — h_df_1d_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_bw(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -127,31 +158,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_df_1d_kr.html b/v0.3.1/reference/h_df_1d_kr.html index 062c4b07b..4722603a7 100644 --- a/v0.3.1/reference/h_df_1d_kr.html +++ b/v0.3.1/reference/h_df_1d_kr.html @@ -1,7 +1,27 @@ - -Calculation of Kenward-Roger Degrees of Freedom for One-Dimensional Contrast — h_df_1d_kr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_kr(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -130,31 +161,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_df_1d_res.html b/v0.3.1/reference/h_df_1d_res.html index 2164404f3..fe6b54527 100644 --- a/v0.3.1/reference/h_df_1d_res.html +++ b/v0.3.1/reference/h_df_1d_res.html @@ -1,7 +1,27 @@ - -Calculation of Residual Degrees of Freedom for One-Dimensional Contrast — h_df_1d_res • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_res(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -130,31 +161,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_df_1d_sat.html b/v0.3.1/reference/h_df_1d_sat.html index 0aef16fe8..cb9575ab0 100644 --- a/v0.3.1/reference/h_df_1d_sat.html +++ b/v0.3.1/reference/h_df_1d_sat.html @@ -1,7 +1,27 @@ - -Calculation of Satterthwaite Degrees of Freedom for One-Dimensional Contrast — h_df_1d_sat • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_sat(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -130,31 +161,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_df_bw_calc.html b/v0.3.1/reference/h_df_bw_calc.html index 10dbfc91e..ecf835bb5 100644 --- a/v0.3.1/reference/h_df_bw_calc.html +++ b/v0.3.1/reference/h_df_bw_calc.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom — h_df_bw_calc • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,42 +140,54 @@
    -

    Usage

    +

    Usage +

    h_df_bw_calc(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    -

    List with:

    + + + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_df_md_bw.html b/v0.3.1/reference/h_df_md_bw.html index f35c85505..12290767e 100644 --- a/v0.3.1/reference/h_df_md_bw.html +++ b/v0.3.1/reference/h_df_md_bw.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_bw(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_df_md_from_1d.html b/v0.3.1/reference/h_df_md_from_1d.html index 318994c2d..4b9784396 100644 --- a/v0.3.1/reference/h_df_md_from_1d.html +++ b/v0.3.1/reference/h_df_md_from_1d.html @@ -1,5 +1,25 @@ - -Creating F-Statistic Results from One-Dimensional Contrast — h_df_md_from_1d • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,22 +140,27 @@
    -

    Usage

    +

    Usage +

    h_df_md_from_1d(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    model fit.

    contrast

    (numeric)
    one-dimensional contrast.

    -
    + +
    -

    Value

    +

    Value +

    The one-dimensional degrees of freedom are calculated and then @@ -135,22 +168,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_df_md_kr.html b/v0.3.1/reference/h_df_md_kr.html index 3f662e167..16df49464 100644 --- a/v0.3.1/reference/h_df_md_kr.html +++ b/v0.3.1/reference/h_df_md_kr.html @@ -1,5 +1,25 @@ - -Calculation of Kenward-Roger Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_kr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_kr(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_df_md_res.html b/v0.3.1/reference/h_df_md_res.html index ffbadc8d6..31f89cece 100644 --- a/v0.3.1/reference/h_df_md_res.html +++ b/v0.3.1/reference/h_df_md_res.html @@ -1,5 +1,25 @@ - -Calculation of Residual Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_res • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_res(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_df_md_sat.html b/v0.3.1/reference/h_df_md_sat.html index 9c05a1e42..ee7452b0e 100644 --- a/v0.3.1/reference/h_df_md_sat.html +++ b/v0.3.1/reference/h_df_md_sat.html @@ -1,5 +1,25 @@ - -Calculation of Satterthwaite Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_sat • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_sat(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_df_min_bw.html b/v0.3.1/reference/h_df_min_bw.html index 10fe34cc7..1d87c8825 100644 --- a/v0.3.1/reference/h_df_min_bw.html +++ b/v0.3.1/reference/h_df_min_bw.html @@ -1,5 +1,25 @@ - -Assign Minimum Degrees of Freedom Given Involved Coefficients — h_df_min_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_min_bw(bw_calc, is_coef_involved)
    -

    Arguments

    -
    bw_calc
    +

    Arguments +

    +
    +
    bw_calc

    (list)
    from h_df_bw_calc().

    @@ -126,9 +157,11 @@

    Arguments -

    Value

    +

    Value +

    The minimum of the degrees of freedom assigned to each involved @@ -136,22 +169,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_df_to_tibble.html b/v0.3.1/reference/h_df_to_tibble.html index 49a0720a6..17a27b47d 100644 --- a/v0.3.1/reference/h_df_to_tibble.html +++ b/v0.3.1/reference/h_df_to_tibble.html @@ -1,5 +1,25 @@ - -Coerce a Data Frame to a tibble — h_df_to_tibble • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -112,24 +141,30 @@
    -

    Usage

    +

    Usage +

    h_df_to_tibble(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (data.frame)
    what to coerce.

    -
    + +
    -

    Value

    +

    Value +

    The data as a tibble, potentially with a .rownames column.

    -

    Details

    +

    Details +

    This is only a thin wrapper around tibble::as_tibble(), except giving a useful error message and it checks for rownames and adds them as a new column .rownames if they are not just a numeric sequence as @@ -137,22 +172,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.1/reference/h_drop_covariance_terms.html b/v0.3.1/reference/h_drop_covariance_terms.html index 66b1ffc9a..739ca6a89 100644 --- a/v0.3.1/reference/h_drop_covariance_terms.html +++ b/v0.3.1/reference/h_drop_covariance_terms.html @@ -1,5 +1,25 @@ - -Drop Formula Terms used for Covariance Structure Definition — h_drop_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,46 +140,56 @@
    -

    Usage

    +

    Usage +

    h_drop_covariance_terms(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula from which covariance terms should be dropped.

    -
    + +
    -

    Value

    +

    Value +

    The formula without accepted covariance terms.

    -

    Details

    +

    Details +

    terms is used and it will preserve the environment attribute. This ensures the returned formula and the input formula have the same environment.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_extract_covariance_terms.html b/v0.3.1/reference/h_extract_covariance_terms.html index 3cf4a2054..1152ca259 100644 --- a/v0.3.1/reference/h_extract_covariance_terms.html +++ b/v0.3.1/reference/h_extract_covariance_terms.html @@ -1,5 +1,25 @@ - -Extract Formula Terms used for Covariance Structure Definition — h_extract_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    h_extract_covariance_terms(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula from which covariance terms should be extracted.

    -
    + +
    -

    Value

    +

    Value +

    A list of covariance structure expressions found in f.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_factor_ref.html b/v0.3.1/reference/h_factor_ref.html index 7ac55f3ae..1e421062a 100644 --- a/v0.3.1/reference/h_factor_ref.html +++ b/v0.3.1/reference/h_factor_ref.html @@ -1,5 +1,25 @@ - -Convert Character to Factor Following Reference — h_factor_ref • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_factor_ref(x, ref, var_name = vname(x))
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character or factor)
    input.

    @@ -129,31 +160,37 @@

    Arguments -

    Details

    +

    Details +

    Use ref to convert x into factor with the same levels. This is needed even if x and ref are both character because in model.matrix if x only has one level there could be errors.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_get_cov_default.html b/v0.3.1/reference/h_get_cov_default.html index aa55109d5..bbf6daabd 100644 --- a/v0.3.1/reference/h_get_cov_default.html +++ b/v0.3.1/reference/h_get_cov_default.html @@ -1,7 +1,27 @@ - -Obtain Default Covariance Method — h_get_cov_default • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,20 +143,25 @@
    -

    Usage

    +

    Usage +

    h_get_cov_default(
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within")
     )
    -

    Arguments

    -
    method
    +

    Arguments +

    +
    +
    method

    (string)
    degrees of freedom method.

    -
    + +
    -

    Details

    +

    Details +

    The default covariance method is different for different degrees of freedom method. For "Satterthwaite" or "Between-Within", "Asymptotic" is returned. For "Kenward-Roger" only, "Kenward-Roger" is returned. @@ -136,22 +169,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.1/reference/h_get_empirical.html b/v0.3.1/reference/h_get_empirical.html index ac927a292..8dd304588 100644 --- a/v0.3.1/reference/h_get_empirical.html +++ b/v0.3.1/reference/h_get_empirical.html @@ -1,9 +1,29 @@ - -Obtain Empirical/Jackknife/Bias-Reduced Covariance — h_get_empirical • mmrm +Obtain Empirical/Jackknife/Bias-Reduced Covariance — h_get_empirical • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    h_get_empirical(tmb_data, theta, beta, beta_vcov, type)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    @@ -144,32 +175,41 @@

    Arguments -

    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • cov: matrix empirical covariance.

    • +

      Named list with elements:

      +
        +
      • cov: matrix empirical covariance.

      • df_mat: matrix to calculate Satterthwaite degree of freedom.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_get_kr_comp.html b/v0.3.1/reference/h_get_kr_comp.html index ba0ac3df7..2c5f8cc6b 100644 --- a/v0.3.1/reference/h_get_kr_comp.html +++ b/v0.3.1/reference/h_get_kr_comp.html @@ -1,7 +1,27 @@ - -Obtain Kenward-Roger Adjustment Components — h_get_kr_comp • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,30 +143,39 @@
    -

    Usage

    +

    Usage +

    h_get_kr_comp(tmb_data, theta)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    theta

    (numeric)
    theta estimate.

    -
    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • P: matrix of \(P\) component.

    • +

      Named list with elements:

      +
        +
      • P: matrix of \(P\) component.

      • Q: matrix of \(Q\) component.

      • R: matrix of \(R\) component.

      • -
    + +
    -

    Details

    +

    Details +

    the function returns a named list, \(P\), \(Q\) and \(R\), which corresponds to the paper in 1997. The matrices are stacked in columns so that \(P\), \(Q\) and \(R\) has the same column number(number of beta parameters). The number of rows, is dependent on @@ -150,22 +187,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.1/reference/h_get_optimizers.html b/v0.3.1/reference/h_get_optimizers.html index 7f756f980..15e456498 100644 --- a/v0.3.1/reference/h_get_optimizers.html +++ b/v0.3.1/reference/h_get_optimizers.html @@ -1,5 +1,25 @@ - -Obtain Optimizer according to Optimizer String Value — h_get_optimizers • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    h_get_optimizers(
       optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"),
       optimizer_fun = h_optimizer_fun(optimizer),
    @@ -122,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    optimizer
    +

    Arguments +

    +
    +
    optimizer

    (character)
    names of built-in optimizers to try, subset of "L-BFGS-B", "BFGS", "CG" and "nlminb".

    @@ -140,46 +171,59 @@

    Arguments -

    Value

    +

    Value +

    Named list of optimizers created by h_partial_fun_args().

    -

    Details

    -

    If you want to use only the built-in optimizers:

    • optimizer is a shortcut to create a list of built-in optimizer functions +

      Details +

      +

      If you want to use only the built-in optimizers:

      +
        +
      • optimizer is a shortcut to create a list of built-in optimizer functions passed to optimizer_fun.

      • Allowed are "L-BFGS-B", "BFGS", "CG" (using stats::optim() with corresponding method) and "nlminb" (using stats::nlminb()).

      • Other arguments should go into optimizer_args.

      • -

      If you want to use your own optimizer function:

      • Make sure that there are three arguments: parameter (start value), objective function +

      +

      If you want to use your own optimizer function:

      +
        +
      • Make sure that there are three arguments: parameter (start value), objective function and gradient function are sequentially in the function arguments.

      • If there are other named arguments in front of these, make sure they are correctly specified through optimizer_args.

      • If the hessian can be used, please make sure its argument name is hessian and please add attribute use_hessian = TRUE to the function, using attr(fun, "use_hessian) <- TRUE.

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_get_prediction.html b/v0.3.1/reference/h_get_prediction.html index f40ab43e2..8e74872a5 100644 --- a/v0.3.1/reference/h_get_prediction.html +++ b/v0.3.1/reference/h_get_prediction.html @@ -1,5 +1,25 @@ - -Get Prediction — h_get_prediction • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_get_prediction(tmb_data, theta, beta, beta_vcov)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    object.

    @@ -133,37 +164,47 @@

    Arguments -

    Value

    +

    Value +

    -

    List with:

    • prediction: Matrix with columns fit, conf_var, and var.

    • +

      List with:

      +
        +
      • prediction: Matrix with columns fit, conf_var, and var.

      • covariance: List with subject specific covariance matrices.

      • index: List of zero-based subject indices.

      • -
    + +
    -

    Details

    +

    Details +

    See predict function in predict.cpp which is called internally.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_get_prediction_variance.html b/v0.3.1/reference/h_get_prediction_variance.html index 3a8296967..8d74e7f02 100644 --- a/v0.3.1/reference/h_get_prediction_variance.html +++ b/v0.3.1/reference/h_get_prediction_variance.html @@ -1,5 +1,25 @@ - -Get Prediction Variance — h_get_prediction_variance • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_get_prediction_variance(object, nsim, tmb_data)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    @@ -129,25 +160,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.1/reference/h_get_sim_per_subj.html b/v0.3.1/reference/h_get_sim_per_subj.html index d8005c6aa..bba7d6b81 100644 --- a/v0.3.1/reference/h_get_sim_per_subj.html +++ b/v0.3.1/reference/h_get_sim_per_subj.html @@ -1,5 +1,25 @@ - -Get simulated values by patient. — h_get_sim_per_subj • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_get_sim_per_subj(predict_res, nsub, nsim)
    -

    Arguments

    -
    predict_res
    +

    Arguments +

    +
    +
    predict_res

    (list)
    from h_get_prediction().

    @@ -129,25 +160,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.1/reference/h_gradient.html b/v0.3.1/reference/h_gradient.html index 05e4334d6..8a7b2cc6c 100644 --- a/v0.3.1/reference/h_gradient.html +++ b/v0.3.1/reference/h_gradient.html @@ -1,7 +1,27 @@ - -Computation of a Gradient Given Jacobian and Contrast Vector — h_gradient • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_gradient(jac_list, contrast)
    -

    Arguments

    -
    jac_list
    +

    Arguments +

    +
    +
    jac_list

    (list)
    Jacobian list produced e.g. by h_jac_list().

    @@ -130,9 +161,11 @@

    Arguments -

    Value

    +

    Value +

    Numeric vector which contains the quadratic forms of each element of @@ -140,22 +173,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_jac_list.html b/v0.3.1/reference/h_jac_list.html index d72b2e97c..2b3c056a6 100644 --- a/v0.3.1/reference/h_jac_list.html +++ b/v0.3.1/reference/h_jac_list.html @@ -1,5 +1,25 @@ - -Obtain List of Jacobian Matrix Entries for Covariance Matrix — h_jac_list • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_jac_list(tmb_data, theta_est, beta_vcov)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    @@ -129,9 +160,11 @@

    Arguments -

    Value

    +

    Value +

    List with one element per variance parameter containing a matrix @@ -140,22 +173,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_kr_df.html b/v0.3.1/reference/h_kr_df.html index ddf56ab96..e3d59b0f0 100644 --- a/v0.3.1/reference/h_kr_df.html +++ b/v0.3.1/reference/h_kr_df.html @@ -1,7 +1,27 @@ - -Obtain the Adjusted Kenward-Roger degrees of freedom — h_kr_df • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_kr_df(v0, l, w, p)
    -

    Arguments

    -
    v0
    +

    Arguments +

    +
    +
    v0

    (matrix)
    unadjusted covariance matrix.

    @@ -136,32 +167,41 @@

    Argumentsh_get_kr_comp().

    -

    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • m: numeric degrees of freedom.

    • +

      Named list with elements:

      +
        +
      • m: numeric degrees of freedom.

      • lambda: numeric F statistic scale parameter.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_md_denom_df.html b/v0.3.1/reference/h_md_denom_df.html index 39eb0eea6..a226fb90e 100644 --- a/v0.3.1/reference/h_md_denom_df.html +++ b/v0.3.1/reference/h_md_denom_df.html @@ -1,5 +1,25 @@ - -Calculating Denominator Degrees of Freedom for the Multi-Dimensional Case — h_md_denom_df • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,47 +140,57 @@
    -

    Usage

    +

    Usage +

    h_md_denom_df(t_stat_df)
    -

    Arguments

    -
    t_stat_df
    +

    Arguments +

    +
    +
    t_stat_df

    (numeric)
    n t-statistic derived degrees of freedom.

    -
    + +
    -

    Value

    +

    Value +

    Usually the calculation is returning 2 * E / (E - n) where E is the sum of t / (t - 2) over all t_stat_df values t.

    -

    Note

    +

    Note +

    If the input values are two similar to each other then just the average of them is returned. If any of the inputs is not larger than 2 then 2 is returned.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_mmrm_tmb_assert_start.html b/v0.3.1/reference/h_mmrm_tmb_assert_start.html index 50e95b517..586b083e9 100644 --- a/v0.3.1/reference/h_mmrm_tmb_assert_start.html +++ b/v0.3.1/reference/h_mmrm_tmb_assert_start.html @@ -1,5 +1,25 @@ - -Asserting Sane Start Values for TMB Fit — h_mmrm_tmb_assert_start • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_assert_start(tmb_object)
    -

    Arguments

    -
    tmb_object
    +

    Arguments +

    +
    +
    tmb_object

    (list)
    created with TMB::MakeADFun().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used for assertions.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_mmrm_tmb_check_conv.html b/v0.3.1/reference/h_mmrm_tmb_check_conv.html index 0a070d4b9..b77678c72 100644 --- a/v0.3.1/reference/h_mmrm_tmb_check_conv.html +++ b/v0.3.1/reference/h_mmrm_tmb_check_conv.html @@ -1,5 +1,25 @@ - -Checking the TMB Optimization Result — h_mmrm_tmb_check_conv • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,22 +140,27 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_check_conv(tmb_opt, mmrm_tmb)
    -

    Arguments

    -
    tmb_opt
    +

    Arguments +

    +
    +
    tmb_opt

    (list)
    optimization result.

    mmrm_tmb

    (mmrm_tmb)
    result from h_mmrm_tmb_fit().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used to generate warnings in case that the model @@ -135,22 +168,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_mmrm_tmb_data.html b/v0.3.1/reference/h_mmrm_tmb_data.html index 51f1d2ce7..02d27277f 100644 --- a/v0.3.1/reference/h_mmrm_tmb_data.html +++ b/v0.3.1/reference/h_mmrm_tmb_data.html @@ -1,5 +1,25 @@ - -Data for TMB Fit — h_mmrm_tmb_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_data(
       formula_parts,
       data,
    @@ -126,8 +155,10 @@ 

    Usage

    -

    Arguments

    -
    formula_parts
    +

    Arguments +

    +
    +
    formula_parts

    (mmrm_tmb_formula_parts)
    list with formula parts from h_mmrm_tmb_formula_parts().

    @@ -161,12 +192,16 @@

    Arguments -

    Value

    +

    Value +

    -

    List of class mmrm_tmb_data with elements:

    • full_frame: data.frame with n rows containing all variables needed in the model.

    • +

      List of class mmrm_tmb_data with elements:

      +
        +
      • full_frame: data.frame with n rows containing all variables needed in the model.

      • data: data.frame of input dataset.

      • x_matrix: matrix with n rows and p columns specifying the overall design matrix.

      • x_cols_aliased: logical with potentially more than p elements indicating which @@ -187,9 +222,11 @@

        Value

        reml: int specifying whether REML estimation is used (1), otherwise ML (0).

      • subject_groups: factor specifying the grouping for each subject.

      • n_groups: int with the number of total groups

      • -
    + +
    -

    Details

    +

    Details +

    Note that the subject_var must not be factor but can also be character. If it is character, then it will be converted to factor internally. Here the levels will be the unique values, sorted alphabetically and numerically if there @@ -198,22 +235,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.1/reference/h_mmrm_tmb_extract_cov.html b/v0.3.1/reference/h_mmrm_tmb_extract_cov.html index 7873da28e..bb0c85eac 100644 --- a/v0.3.1/reference/h_mmrm_tmb_extract_cov.html +++ b/v0.3.1/reference/h_mmrm_tmb_extract_cov.html @@ -1,7 +1,27 @@ - -Extract covariance matrix from TMB report and input data — h_mmrm_tmb_extract_cov • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_extract_cov(tmb_report, tmb_data, visit_var, is_spatial)
    -

    Arguments

    -
    tmb_report
    +

    Arguments +

    +
    +
    tmb_report

    (list)
    report created with TMB::MakeADFun() report function.

    @@ -136,9 +167,11 @@

    Arguments -

    Value

    +

    Value +

    Return a simple covariance matrix if there is no grouping, or a named @@ -147,22 +180,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_mmrm_tmb_fit.html b/v0.3.1/reference/h_mmrm_tmb_fit.html index 855737b9b..1c283632e 100644 --- a/v0.3.1/reference/h_mmrm_tmb_fit.html +++ b/v0.3.1/reference/h_mmrm_tmb_fit.html @@ -1,7 +1,27 @@ - -Build TMB Fit Result List — h_mmrm_tmb_fit • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_fit(tmb_object, tmb_opt, formula_parts, tmb_data)
    -

    Arguments

    -
    tmb_object
    +

    Arguments +

    +
    +
    tmb_object

    (list)
    created with TMB::MakeADFun().

    @@ -137,12 +168,16 @@

    Argumentsh_mmrm_tmb_data().

    -

    + +
    -

    Value

    +

    Value +

    -

    List of class mmrm_tmb with:

    • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

    • +

      List of class mmrm_tmb with:

      +
        +
      • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

      • beta_est: vector of coefficient estimates.

      • beta_vcov: Variance-covariance matrix for coefficient estimates.

      • beta_vcov_inv_L: Lower triangular matrix L of the inverse variance-covariance matrix decomposition.

      • @@ -157,31 +192,37 @@

        Value

        opt_details: list with optimization details including convergence code.

      • tmb_object: original TMB object created with TMB::MakeADFun().

      • tmb_data: input.

      • -
    + +
    -

    Details

    +

    Details +

    Instead of inverting or decomposing beta_vcov, it can be more efficient to use its robust Cholesky decomposition LDL^T, therefore we return the corresponding two components L and D as well since they have been available on the C++ side already.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_mmrm_tmb_formula_parts.html b/v0.3.1/reference/h_mmrm_tmb_formula_parts.html index 951570a91..d86facd78 100644 --- a/v0.3.1/reference/h_mmrm_tmb_formula_parts.html +++ b/v0.3.1/reference/h_mmrm_tmb_formula_parts.html @@ -1,5 +1,25 @@ - -Processing the Formula for TMB Fit — h_mmrm_tmb_formula_parts • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_formula_parts(
       formula,
       covariance = as.cov_struct(formula, warn_partial = FALSE)
    @@ -120,8 +149,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    Original formula.

    @@ -129,12 +160,16 @@

    Arguments -

    Value

    +

    Value +

    -

    List of class mmrm_tmb_formula_parts with elements:

    • formula: the original input.

    • +

      List of class mmrm_tmb_formula_parts with elements:

      +
        +
      • formula: the original input.

      • model_formula: formula with the covariance term is removed.

      • model_formula: formula with the covariance term removed.

      • full_formula: same as model_formula but includes the covariance @@ -146,25 +181,30 @@

        Value

        subject_var: string with the subject variable name.

      • group_var: string with the group variable name. If no group specified, this element is NULL.

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_mmrm_tmb_parameters.html b/v0.3.1/reference/h_mmrm_tmb_parameters.html index bcf01466b..ce994ac76 100644 --- a/v0.3.1/reference/h_mmrm_tmb_parameters.html +++ b/v0.3.1/reference/h_mmrm_tmb_parameters.html @@ -1,5 +1,25 @@ - -Start Parameters for TMB Fit — h_mmrm_tmb_parameters • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_parameters(formula_parts, tmb_data, start, n_groups = 1L)
    -

    Arguments

    -
    formula_parts
    +

    Arguments +

    +
    +
    formula_parts

    (mmrm_tmb_formula_parts)
    produced by h_mmrm_tmb_formula_parts().

    @@ -135,9 +166,11 @@

    Arguments -

    Value

    +

    Value +

    List with element theta containing the start values for the variance @@ -145,22 +178,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_newdata_add_pred.html b/v0.3.1/reference/h_newdata_add_pred.html index 64279dd90..72139d1d7 100644 --- a/v0.3.1/reference/h_newdata_add_pred.html +++ b/v0.3.1/reference/h_newdata_add_pred.html @@ -1,5 +1,25 @@ - -Add Prediction Results to New Data — h_newdata_add_pred • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_newdata_add_pred(x, newdata, se_fit, interval, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fit.

    @@ -138,9 +169,11 @@

    Argumentspredict.mmrm_tmb().

    -

    + +
    -

    Value

    +

    Value +

    The newdata as a tibble with additional columns .fitted, @@ -151,22 +184,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_optimizer_fun.html b/v0.3.1/reference/h_optimizer_fun.html index 99c1b64d8..a28c864cb 100644 --- a/v0.3.1/reference/h_optimizer_fun.html +++ b/v0.3.1/reference/h_optimizer_fun.html @@ -1,5 +1,25 @@ - -Obtain Optimizer Function with Character — h_optimizer_fun • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_optimizer_fun(optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"))
    -

    Arguments

    -
    optimizer
    +

    Arguments +

    +
    +
    optimizer

    (character)
    vector of optimizers.

    -
    + +
    -

    Value

    +

    Value +

    A (list)
    of optimizer functions generated from h_partial_fun_args().

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_partial_fun_args.html b/v0.3.1/reference/h_partial_fun_args.html index 27c65e664..2e01895e6 100644 --- a/v0.3.1/reference/h_partial_fun_args.html +++ b/v0.3.1/reference/h_partial_fun_args.html @@ -1,5 +1,25 @@ - -Create Partial Functions — h_partial_fun_args • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_partial_fun_args(fun, ..., additional_attr = list())
    -

    Arguments

    -
    fun
    +

    Arguments +

    +
    +
    fun

    (function)
    to be wrapped.

    @@ -129,16 +160,19 @@

    Arguments -

    Value

    +

    Value +

    Object with S3 class "partial", a function with args attribute (and possibly more attributes from additional_attr).

    -

    Details

    +

    Details +

    This function add args attribute to the original function, and add an extra class partial to the function. args is the argument for the function, and elements in ... will override the existing @@ -146,22 +180,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.1/reference/h_print_aic_list.html b/v0.3.1/reference/h_print_aic_list.html index 3b07ee047..d2fb54ef8 100644 --- a/v0.3.1/reference/h_print_aic_list.html +++ b/v0.3.1/reference/h_print_aic_list.html @@ -1,5 +1,25 @@ - -Printing AIC and other Model Fit Criteria — h_print_aic_list • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,38 +140,46 @@
    -

    Usage

    +

    Usage +

    h_print_aic_list(aic_list, digits = 1)
    -

    Arguments

    -
    aic_list
    +

    Arguments +

    +
    +
    aic_list

    (list)
    list as part of from summary.mmrm().

    digits

    (number)
    number of decimal places used with round().

    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_print_call.html b/v0.3.1/reference/h_print_call.html index 2ea4d8932..601be22e4 100644 --- a/v0.3.1/reference/h_print_call.html +++ b/v0.3.1/reference/h_print_call.html @@ -1,5 +1,25 @@ - -Printing MMRM Function Call — h_print_call • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_print_call(call, n_obs, n_subjects, n_timepoints)
    -

    Arguments

    -
    call
    +

    Arguments +

    +
    +
    call

    (call)
    original mmrm() function call.

    @@ -133,25 +164,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.1/reference/h_print_cov.html b/v0.3.1/reference/h_print_cov.html index 4fd78069d..e1c112541 100644 --- a/v0.3.1/reference/h_print_cov.html +++ b/v0.3.1/reference/h_print_cov.html @@ -1,5 +1,25 @@ - -Printing MMRM Covariance Type — h_print_cov • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_print_cov(cov_type, n_theta, n_groups)
    -

    Arguments

    -
    cov_type
    +

    Arguments +

    +
    +
    cov_type

    (string)
    covariance structure abbreviation.

    @@ -129,25 +160,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.1/reference/h_quad_form.html b/v0.3.1/reference/h_quad_form.html index 09229b686..f571b5417 100644 --- a/v0.3.1/reference/h_quad_form.html +++ b/v0.3.1/reference/h_quad_form.html @@ -1,7 +1,27 @@ - -Quadratic Form Calculations — h_quad_form • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,15 +143,18 @@
    -

    Usage

    +

    Usage +

    h_quad_form_vec(vec, center)
     
     h_quad_form_mat(mat, center)
    -

    Arguments

    -
    vec
    +

    Arguments +

    +
    +
    vec

    (numeric)
    interpreted as a row vector.

    @@ -137,34 +168,42 @@

    Arguments -

    Functions

    +

    Functions +

    -
    • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) +

        +
      • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) as a numeric (not a matrix).

      • h_quad_form_mat(): calculates the quadratic form mat %*% center %*% t(mat) as a matrix, the result is square and has dimensions identical to the number of rows in mat.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_reconcile_cov_struct.html b/v0.3.1/reference/h_reconcile_cov_struct.html index 660a710ff..da4461786 100644 --- a/v0.3.1/reference/h_reconcile_cov_struct.html +++ b/v0.3.1/reference/h_reconcile_cov_struct.html @@ -1,5 +1,25 @@ - -Reconcile Possible Covariance Structure Inputs — h_reconcile_cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_reconcile_cov_struct(formula = NULL, covariance = NULL)
    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -128,9 +159,11 @@

    Argumentsas.cov_struct(). If no value is provided, a structure is derived from the provided formula.

    -

    + +
    -

    Value

    +

    Value +

    The value covariance if it's provided or a covariance structure @@ -139,22 +172,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_record_all_output.html b/v0.3.1/reference/h_record_all_output.html index 7096d61d6..503885d49 100644 --- a/v0.3.1/reference/h_record_all_output.html +++ b/v0.3.1/reference/h_record_all_output.html @@ -1,9 +1,29 @@ - - + + + + + +Capture all Output — h_record_all_output • mmrm +Capture all Output — h_record_all_output • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    h_record_all_output(expr, remove = list(), divergence = list())
    -

    Arguments

    -
    expr
    +

    Arguments +

    +
    +
    expr

    (expression)
    to be executed.

    @@ -139,35 +170,44 @@

    Arguments -

    Value

    +

    Value +

    -

    A list containing

    • result: The object returned by expr or list() if an error was thrown.

    • +

      A list containing

      +
        +
      • result: The object returned by expr or list() if an error was thrown.

      • warnings: NULL or a character vector if warnings were thrown.

      • errors: NULL or a string if an error was thrown.

      • messages: NULL or a character vector if messages were produced.

      • divergence: NULL or a character vector if divergence messages were caught.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_residuals_normalized.html b/v0.3.1/reference/h_residuals_normalized.html index 78dd8fcfe..0ecffc1a7 100644 --- a/v0.3.1/reference/h_residuals_normalized.html +++ b/v0.3.1/reference/h_residuals_normalized.html @@ -1,5 +1,25 @@ - -Calculate normalized residuals — h_residuals_normalized • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_normalized(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_residuals_pearson.html b/v0.3.1/reference/h_residuals_pearson.html index 8bec03910..f486ce516 100644 --- a/v0.3.1/reference/h_residuals_pearson.html +++ b/v0.3.1/reference/h_residuals_pearson.html @@ -1,5 +1,25 @@ - -Calculate Pearson Residuals — h_residuals_pearson • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_pearson(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_residuals_response.html b/v0.3.1/reference/h_residuals_response.html index 329cc22ef..7022bfa25 100644 --- a/v0.3.1/reference/h_residuals_response.html +++ b/v0.3.1/reference/h_residuals_response.html @@ -1,5 +1,25 @@ - -Calculate response residuals. — h_residuals_response • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_response(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_split_control.html b/v0.3.1/reference/h_split_control.html index e935a0315..bb0be21d6 100644 --- a/v0.3.1/reference/h_split_control.html +++ b/v0.3.1/reference/h_split_control.html @@ -1,7 +1,27 @@ - -Split Control List — h_split_control • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,44 +143,53 @@
    -

    Usage

    +

    Usage +

    h_split_control(control, ...)
    -

    Arguments

    -
    control
    +

    Arguments +

    +
    +
    control

    (mmrm_control)
    object.

    ...

    additional parameters to update the control object.

    -
    + +
    -

    Value

    +

    Value +

    A list of mmrm_control entries.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_summarize_all_fits.html b/v0.3.1/reference/h_summarize_all_fits.html index a5f8e93f1..2af8c07e0 100644 --- a/v0.3.1/reference/h_summarize_all_fits.html +++ b/v0.3.1/reference/h_summarize_all_fits.html @@ -1,5 +1,25 @@ - -Summarizing List of Fits — h_summarize_all_fits • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_summarize_all_fits(all_fits)
    -

    Arguments

    -
    all_fits
    +

    Arguments +

    +
    +
    all_fits

    (list of mmrm_fit or try-error)
    list of fits.

    -
    + +
    -

    Value

    +

    Value +

    List with warnings, messages, log_liks and converged results.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_tbl_confint_terms.html b/v0.3.1/reference/h_tbl_confint_terms.html index 4d4328444..66eaf62eb 100644 --- a/v0.3.1/reference/h_tbl_confint_terms.html +++ b/v0.3.1/reference/h_tbl_confint_terms.html @@ -1,5 +1,25 @@ - -Extract tibble with Confidence Intervals and Term Names — h_tbl_confint_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,44 +140,53 @@
    -

    Usage

    +

    Usage +

    h_tbl_confint_terms(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fit object.

    ...

    passed to stats::confint(), hence not used at the moment.

    -
    + +
    -

    Value

    +

    Value +

    A tibble with term, conf.low, conf.high columns.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_test_1d.html b/v0.3.1/reference/h_test_1d.html index 2cd1cb7e8..6ea21f8cb 100644 --- a/v0.3.1/reference/h_test_1d.html +++ b/v0.3.1/reference/h_test_1d.html @@ -1,7 +1,27 @@ - -Creating T-Statistic Test Results For One-Dimensional Contrast — h_test_1d • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_test_1d(object, contrast, df)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -134,31 +165,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val (2-sided p-value).

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_test_md.html b/v0.3.1/reference/h_test_md.html index 96c14b117..65c82c834 100644 --- a/v0.3.1/reference/h_test_md.html +++ b/v0.3.1/reference/h_test_md.html @@ -1,7 +1,27 @@ - -Creating F-Statistic Test Results For Multi-Dimensional Contrast — h_test_md • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_test_md(object, contrast, df, f_stat_factor = 1)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -136,31 +167,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_tr.html b/v0.3.1/reference/h_tr.html index b9826c118..dd1047060 100644 --- a/v0.3.1/reference/h_tr.html +++ b/v0.3.1/reference/h_tr.html @@ -1,5 +1,25 @@ - -Trace of a Matrix — h_tr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_tr(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (matrix)
    square matrix input.

    -
    + +
    -

    Value

    +

    Value +

    The trace of the square matrix.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_valid_formula.html b/v0.3.1/reference/h_valid_formula.html index 9906c10e6..e249a41e2 100644 --- a/v0.3.1/reference/h_valid_formula.html +++ b/v0.3.1/reference/h_valid_formula.html @@ -1,5 +1,25 @@ - -Validate mmrm Formula — h_valid_formula • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,39 +140,48 @@
    -

    Usage

    +

    Usage +

    h_valid_formula(formula)
    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    to check.

    -
    + +
    -

    Details

    +

    Details +

    In mmrm models, . is not allowed as it introduces ambiguity of covariates to be used, so it is not allowed to be in formula.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_var_adj.html b/v0.3.1/reference/h_var_adj.html index d08a529df..e110bbced 100644 --- a/v0.3.1/reference/h_var_adj.html +++ b/v0.3.1/reference/h_var_adj.html @@ -1,9 +1,29 @@ - -Obtain the Adjusted Covariance Matrix — h_var_adj • mmrm +Obtain the Adjusted Covariance Matrix — h_var_adj • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    h_var_adj(v, w, p, q, r, linear = FALSE)
    -

    Arguments

    -
    v
    +

    Arguments +

    +
    +
    v

    (matrix)
    unadjusted covariance matrix.

    @@ -147,31 +178,37 @@

    Arguments -

    Value

    +

    Value +

    The matrix of adjusted covariance matrix.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_warn_na_action.html b/v0.3.1/reference/h_warn_na_action.html index 973339bb0..a27efa920 100644 --- a/v0.3.1/reference/h_warn_na_action.html +++ b/v0.3.1/reference/h_warn_na_action.html @@ -1,5 +1,25 @@ - -Warn on na.action — h_warn_na_action • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,27 +140,32 @@
    -

    Usage

    +

    Usage +

    h_warn_na_action()
    - + +
    -
    + + - - + + diff --git a/v0.3.1/reference/h_within_or_between.html b/v0.3.1/reference/h_within_or_between.html index 4a1ca3993..acc5fd166 100644 --- a/v0.3.1/reference/h_within_or_between.html +++ b/v0.3.1/reference/h_within_or_between.html @@ -1,7 +1,27 @@ - -Determine Within or Between for each Design Matrix Column — h_within_or_between • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,22 +143,27 @@
    -

    Usage

    +

    Usage +

    h_within_or_between(x_matrix, subject_ids)
    -

    Arguments

    -
    x_matrix
    +

    Arguments +

    +
    +
    x_matrix

    (matrix)
    the design matrix with column names.

    subject_ids

    (factor)
    the subject IDs.

    -
    + +
    -

    Value

    +

    Value +

    Character vector with "intercept", "within" or "between" for each @@ -138,22 +171,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/index.html b/v0.3.1/reference/index.html index 27045d397..04883df3b 100644 --- a/v0.3.1/reference/index.html +++ b/v0.3.1/reference/index.html @@ -1,5 +1,23 @@ - -Function reference • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +44,8 @@ + - + + - + @@ -106,189 +132,252 @@
    -

    Package

    +

    Package +

    -
    +
    +
    -
    +
    +
    mmrm-package _PACKAGE
    -
    mmrm Package
    -
    -

    Functions

    +
    +mmrm Package
    + +
    +
    +

    Functions +

    -
    +
    +
    -
    +
    +
    mmrm()
    Fit an MMRM
    -
    +
    +
    +
    fit_mmrm()
    Low-Level Fitting Function for MMRM
    -
    +
    +
    +
    mmrm_control()
    Control Parameters for Fitting an MMRM
    -
    +
    +
    +
    fit_single_optimizer()
    Fitting an MMRM with Single Optimizer
    -
    +
    +
    +
    refit_multiple_optimizers()
    Refitting MMRM with Multiple Optimizers
    -
    +
    +
    +
    df_1d()
    Calculation of Degrees of Freedom for One-Dimensional Contrast
    -
    +
    +
    +
    df_md()
    Calculation of Degrees of Freedom for Multi-Dimensional Contrast
    -
    +
    +
    +
    component()
    Component Access for mmrm_tmb Objects
    -
    -

    Methods

    + +
    +
    +

    Methods +

    -
    +
    +
    -

    Covariance Structures

    + +
    +
    +

    Covariance Structures +

    -
    +
    +
    -
    +
    +
    cov_struct()
    Define a Covariance Structure
    -
    +
    +
    +
    as.cov_struct()
    Coerce into a Covariance Structure Definition
    -
    +
    +
    +
    format(<cov_struct>)
    Format Covariance Structure Object
    -
    +
    +
    +
    print(<cov_struct>)
    Print a Covariance Structure Object
    -
    +
    +
    +
    cov_types()
    Covariance Types
    -
    -

    Estimate Marginal Means

    + +
    +
    +

    Estimate Marginal Means +

    -
    +
    +
    -
    +
    +
    emmeans_support
    -
    Support for emmeans
    -
    -

    Datasets

    +
    Support for emmeans +
    + +
    +
    +

    Datasets +

    -
    +
    +
    -
    +
    +
    fev_data
    Example Data on FEV1
    -
    +
    +
    +
    bcva_data
    Example Data on BCVA
    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.1/reference/is_infix.html b/v0.3.1/reference/is_infix.html index 5e984581b..aec2b764b 100644 --- a/v0.3.1/reference/is_infix.html +++ b/v0.3.1/reference/is_infix.html @@ -1,5 +1,25 @@ - -Test Whether a Symbol is an Infix Operator — is_infix • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,49 +140,62 @@
    -

    Usage

    +

    Usage +

    is_infix(name)
    -

    Arguments

    -
    name
    +

    Arguments +

    +
    +
    name

    (symbol or name or string)
    a possible reference to an infix operator to check.

    -
    + +
    -

    Value

    +

    Value +

    A logical indicating whether the name is the name of an infix operator.

    -

    is_infix(as.name("|"))
    +

    +
    +
    is_infix(as.name("|"))
     is_infix("|")
    -is_infix("c")

    +is_infix("c")
    +

    +
    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/mmrm-package.html b/v0.3.1/reference/mmrm-package.html index 828434404..468165e79 100644 --- a/v0.3.1/reference/mmrm-package.html +++ b/v0.3.1/reference/mmrm-package.html @@ -1,5 +1,25 @@ - -mmrm Package — mmrm-package • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -113,15 +142,23 @@
    -

    See also

    -
    -

    Author

    +

    Author +

    Maintainer: Daniel Sabanes Bove daniel.sabanes_bove@roche.com

    -

    Authors:

    + +
    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/mmrm.html b/v0.3.1/reference/mmrm.html index f320e2225..0733d76b6 100644 --- a/v0.3.1/reference/mmrm.html +++ b/v0.3.1/reference/mmrm.html @@ -1,7 +1,27 @@ - -Fit an MMRM — mmrm • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,7 +143,8 @@
    -

    Usage

    +

    Usage +

    mmrm(
       formula,
       data,
    @@ -128,8 +157,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -162,15 +193,18 @@

    Argumentsmmrm_control().

    -

    + +
    -

    Value

    +

    Value +

    An mmrm object.

    -

    Details

    +

    Details +

    The formula typically looks like: FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID) so specifies response and covariates as usual, and exactly one special term @@ -196,15 +230,19 @@

    Detailsmmrm.

    -

    Note

    +

    Note +

    The mmrm object is also an mmrm_fit and an mmrm_tmb object, therefore corresponding methods also work (see mmrm_tmb_methods).

    -

    Additional contents depend on the choice of the adjustment method:

    • If Satterthwaite adjustment is used, the Jacobian information jac_list +

      Additional contents depend on the choice of the adjustment method:

      +
        +
      • If Satterthwaite adjustment is used, the Jacobian information jac_list is included.

      • If Kenward-Roger adjustment is used, kr_comp contains necessary components and beta_vcov_adj includes the adjusted coefficients covariance matrix.

      • -

      Use of the package emmeans is supported, see emmeans_support.

      +
    +

    Use of the package emmeans is supported, see emmeans_support.

    NA values are always omitted regardless of na.action setting.

    When the number of visit levels is large, it usually requires large memory to create the covariance matrix. By default, the maximum allowed visit levels is 100, and if there are more @@ -215,7 +253,8 @@

    Note

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -239,22 +278,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.1/reference/mmrm_control.html b/v0.3.1/reference/mmrm_control.html index 4065ba4e2..3e8d43062 100644 --- a/v0.3.1/reference/mmrm_control.html +++ b/v0.3.1/reference/mmrm_control.html @@ -1,9 +1,29 @@ - - + + + + + +Control Parameters for Fitting an MMRM — mmrm_control • mmrm +Control Parameters for Fitting an MMRM — mmrm_control • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,7 +146,8 @@
    -

    Usage

    +

    Usage +

    mmrm_control(
       n_cores = 1L,
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within"),
    @@ -132,8 +161,10 @@ 

    Usage

    -

    Arguments

    -
    n_cores
    +

    Arguments +

    +
    +
    n_cores

    (count)
    number of cores to be used.

    @@ -167,15 +198,18 @@

    Argumentsh_get_optimizers().

    -

    + +
    -

    Value

    +

    Value +

    List of class mmrm_control with the control parameters.

    + +
    -

    Examples

    +

    Examples +

    mmrm_control(
       optimizer_fun = stats::optim,
       optimizer_args = list(method = "L-BFGS-B")
    @@ -308,22 +346,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.1/reference/mmrm_methods.html b/v0.3.1/reference/mmrm_methods.html index b192bb082..a01fb683d 100644 --- a/v0.3.1/reference/mmrm_methods.html +++ b/v0.3.1/reference/mmrm_methods.html @@ -1,5 +1,25 @@ - -Methods for mmrm Objects — mmrm_methods • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm
     summary(object, ...)
     
    @@ -126,48 +155,65 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the fitted MMRM including Jacobian and call etc.

    ...

    not used.

    -
    + +
    -

    Value

    +

    Value +

    Depends on the method, see Details and Functions.

    -

    Details

    -

    While printing the summary of (mmrm)
    object, the following will be displayed:

    1. Formula. The formula used in the model.

    2. +

      Details +

      +

      While printing the summary of (mmrm)
      object, the following will be displayed:

      +
        +
      1. Formula. The formula used in the model.

      2. Data. The data used for analysis, including number of subjects, number of valid observations.

      3. Covariance. The covariance structure and number of variance parameters.

      4. Method. Restricted maximum likelihood(REML) or maximum likelihood(ML).

      5. Model selection criteria. AIC, BIC, log likelihood and deviance.

      6. Coefficients. Coefficients of the covariates.

      7. -
      8. Covariance estimate. The covariance estimate(for each group).

        1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available +

        2. +

          Covariance estimate. The covariance estimate(for each group).

          +
            +
          1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available in data will be displayed.

          2. If the covariance structure is spatial, the covariance matrix of two time points with unit distance will be displayed.

          3. -
        3. -
    + + + +
    -

    Functions

    +

    Functions +

    -
    • summary(mmrm): summarizes the MMRM fit results.

    • +
        +
      • summary(mmrm): summarizes the MMRM fit results.

      • print(summary.mmrm): prints the MMRM fit summary.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_tmb_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- mmrm(formula, fev_data)
     # Summary:
    @@ -224,22 +270,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.1/reference/mmrm_tidiers.html b/v0.3.1/reference/mmrm_tidiers.html index 6edf5d215..1b28011bd 100644 --- a/v0.3.1/reference/mmrm_tidiers.html +++ b/v0.3.1/reference/mmrm_tidiers.html @@ -1,9 +1,29 @@ - - + + + + + +Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm +Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,7 +146,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm
     tidy(x, conf.int = FALSE, conf.level = 0.95, ...)
     
    @@ -137,8 +166,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fitted model.

    @@ -170,21 +201,27 @@

    Argumentsresiduals.mmrm_tmb().

    -

    + +
    -

    Functions

    +

    Functions +

    -
    • tidy(mmrm): derives tidy tibble from an mmrm object.

    • +
        +
      • tidy(mmrm): derives tidy tibble from an mmrm object.

      • glance(mmrm): derives glance tibble from an mmrm object.

      • augment(mmrm): derives augment tibble from an mmrm object.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tmb_methods for additional methods.

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -276,22 +313,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.1/reference/mmrm_tmb_methods.html b/v0.3.1/reference/mmrm_tmb_methods.html index 6894b5d69..d695d407e 100644 --- a/v0.3.1/reference/mmrm_tmb_methods.html +++ b/v0.3.1/reference/mmrm_tmb_methods.html @@ -1,5 +1,25 @@ - -Methods for mmrm_tmb Objects — mmrm_tmb_methods • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm_tmb
     coef(object, complete = TRUE, ...)
     
    @@ -185,8 +214,10 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM object.

    @@ -272,15 +303,18 @@

    Arguments -

    + +
    -

    Value

    +

    Value +

    Depends on the method, see Functions.

    -

    Details

    +

    Details +

    include argument controls the variables the returned model frame will include. Possible options are "response_var", "subject_var", "visit_var" and "group_var", representing the response variable, subject variable, visit variable or group variable. @@ -288,9 +322,11 @@

    Detailsmodel.matrix.

    -

    Functions

    +

    Functions +

    -
    • coef(mmrm_tmb): obtains the estimated coefficients.

    • +
        +
      • coef(mmrm_tmb): obtains the estimated coefficients.

      • fitted(mmrm_tmb): obtains the fitted values.

      • predict(mmrm_tmb): predict conditional means for new data; optionally with standard errors and confidence or prediction intervals. @@ -324,11 +360,14 @@

        Functions -

        References

        +

        References +

        -
        • Hurvich CM, Tsai C (1989). +

          • Gałecki A, Burzykowski T (2013). +

          +
            +
          • Gałecki A, Burzykowski T (2013). “Linear mixed-effects model.” In Linear mixed-effects models using R, 245--273. Springer.

          • -
    + +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- fit_mmrm(formula, fev_data, weights = rep(1, nrow(fev_data)))
     # Estimated coefficients:
    @@ -3863,22 +3907,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.1/reference/parsnip_add_mmrm.html b/v0.3.1/reference/parsnip_add_mmrm.html index f5e101a5b..a11414b78 100644 --- a/v0.3.1/reference/parsnip_add_mmrm.html +++ b/v0.3.1/reference/parsnip_add_mmrm.html @@ -1,5 +1,25 @@ - -Register mmrm For Use With tidymodels — parsnip_add_mmrm • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -112,45 +141,55 @@
    -

    Usage

    +

    Usage +

    parsnip_add_mmrm(quietly = FALSE)
    -

    Arguments

    -
    quietly
    +

    Arguments +

    +
    +
    quietly

    logical: should progress and error messages be suppressed?

    -
    + +
    -

    Value

    +

    Value +

    A logical value indicating whether registration was successful.

    -

    Details

    +

    Details +

    We can use parsnip::show_model_info("linear_reg") to check the registration with parsnip and thus the wider tidymodels ecosystem.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/position_symbol.html b/v0.3.1/reference/position_symbol.html index 3323f9839..f6df2356c 100644 --- a/v0.3.1/reference/position_symbol.html +++ b/v0.3.1/reference/position_symbol.html @@ -1,9 +1,29 @@ - - + + + + + +Search For the Position of a Symbol — position_symbol • mmrm +Search For the Position of a Symbol — position_symbol • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    position_symbol(x, sym, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (list of language)
    a list of language objects in which to search for a specific symbol.

    @@ -137,9 +168,11 @@

    ArgumentsPosition().

    -

    + +
    -

    Value

    +

    Value +

    The position of the symbol if found, or the nomatch value @@ -147,22 +180,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/print.cov_struct.html b/v0.3.1/reference/print.cov_struct.html index bfa95957c..4afcb0315 100644 --- a/v0.3.1/reference/print.cov_struct.html +++ b/v0.3.1/reference/print.cov_struct.html @@ -1,5 +1,25 @@ - -Print a Covariance Structure Object — print.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,45 +140,54 @@
    -

    Usage

    +

    Usage +

    # S3 method for cov_struct
     print(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    ...

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    x invisibly.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/reexports.html b/v0.3.1/reference/reexports.html index a32b1d5af..570653cf1 100644 --- a/v0.3.1/reference/reexports.html +++ b/v0.3.1/reference/reexports.html @@ -1,19 +1,39 @@ - - + + + + + +Objects exported from other packages — reexports • mmrm +Objects exported from other packages — reexports • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -38,7 +60,8 @@ + - + + - + @@ -124,30 +152,36 @@

    These objects are imported from other packages. Follow the links below to see their documentation.

    -
    generics
    +
    +
    generics

    augment, glance, tidy

    -
    + + - + +
    -
    + + - - + + diff --git a/v0.3.1/reference/refit_multiple_optimizers.html b/v0.3.1/reference/refit_multiple_optimizers.html index a822cec9f..04bf216b5 100644 --- a/v0.3.1/reference/refit_multiple_optimizers.html +++ b/v0.3.1/reference/refit_multiple_optimizers.html @@ -1,5 +1,25 @@ - -Refitting MMRM with Multiple Optimizers — refit_multiple_optimizers • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    refit_multiple_optimizers(fit, ..., control = mmrm_control(...))
    -

    Arguments

    -
    fit
    +

    Arguments +

    +
    +
    fit

    (mmrm_fit)
    original model fit from fit_single_optimizer().

    @@ -129,20 +160,24 @@

    Arguments -

    Value

    +

    Value +

    The best (in terms of log likelihood) fit which converged.

    -

    Note

    +

    Note +

    For Windows, no parallel computations are currently implemented.

    -

    Examples

    +

    Examples +

    fit <- fit_single_optimizer(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data,
    @@ -153,22 +188,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.1/reference/register_on_load.html b/v0.3.1/reference/register_on_load.html index cb6c6619d..8784cd834 100644 --- a/v0.3.1/reference/register_on_load.html +++ b/v0.3.1/reference/register_on_load.html @@ -1,5 +1,25 @@ - -Helper Function for Registering Functionality With Suggests Packages — register_on_load • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    register_on_load(
       pkg,
       ver = c(NA_character_, NA_character_),
    @@ -122,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    pkg
    +

    Arguments +

    +
    +
    pkg

    (string)
    package name.

    @@ -144,9 +175,11 @@

    Arguments -

    Value

    +

    Value +

    A logical (invisibly) indicating whether registration was successful. @@ -154,22 +187,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/tmb_cov_type.html b/v0.3.1/reference/tmb_cov_type.html index 1cefcc80a..788d4a851 100644 --- a/v0.3.1/reference/tmb_cov_type.html +++ b/v0.3.1/reference/tmb_cov_type.html @@ -1,5 +1,25 @@ - -Produce A Covariance Identifier Passing to TMB — tmb_cov_type • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    tmb_cov_type(cov)
    -

    Arguments

    -
    cov
    +

    Arguments +

    +
    +
    cov

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    A string used for method dispatch when passed to TMB.

    + +
    -
    + + - - + + diff --git a/v0.3.1/reference/validate_cov_struct.html b/v0.3.1/reference/validate_cov_struct.html index 10e3c53e4..e26287783 100644 --- a/v0.3.1/reference/validate_cov_struct.html +++ b/v0.3.1/reference/validate_cov_struct.html @@ -1,5 +1,25 @@ - -Validate Covariance Structure Data — validate_cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    validate_cov_struct(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    x if successful, or an error is thrown otherwise.

    + +
    -
    + + - - + + diff --git a/v0.3.10/404.html b/v0.3.10/404.html index a9ced3629..fffd79770 100644 --- a/v0.3.10/404.html +++ b/v0.3.10/404.html @@ -1,5 +1,4 @@ - - + @@ -82,11 +81,10 @@ Changelog +v0.2.2 + + - + + - + @@ -111,46 +137,66 @@

    Thank you for your interest in contributing to this repo! Your contribution is highly valued. Please go through this document for guidance on how to contribute.

    -

    Programming conventions

    +

    Programming conventions +

    Please follow the programming conventions to ensure a consistent programming style across the package.

    Generally we follow the tidyverse style guide. Some specific conventions that deviate from this are explained below.

    -

    Functions

    -
    1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
    2. +

      Functions +

      +
        +
      1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
      2. Functions starting with h_ are helper functions and they should not be exported.
      3. Functions should be well documented using roxygen2 (even when they are not exported).
      4. Functions must be unit tested (even when they are not exported).
      5. -
    + +
    -

    Imports

    +

    Imports +

    In package mmrm, we follow the following convention in package imports.

    -
    1. When only a few functions from another package are needed: -
      1. In DESCRIPTION, add that package into Imports.
      2. +
          +
        1. When only a few functions from another package are needed: +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we add a importFrom with a single function from the package. -
            1. The function imported can be any random function within the package.
            2. -
          3. +
              +
            1. The function imported can be any random function within the package.
            2. +
            +
          4. Always use package::function style wherever you need to use the function.
          5. Example: stats.
          6. -
        2. +
        +
      3. When many functions from another package are needed: -
        1. In DESCRIPTION, add that package into Imports.
        2. +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we use a import to import every function.
          3. Use the functions directly without prefix.
          4. Example: checkmate.
          5. -
          -
    + + + +
    -

    Comments

    -
    • Comments should always follow sentence style.
    • +

      Comments +

      +
        +
      • Comments should always follow sentence style.
      • Comments should be as minimal as possible: Generally the code and variable names should be clear enough to not need any comments. Only use them when needed and explain the “Why” and not the “What”.
      • -
    + +
    -

    Documentation

    -
    • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

    • +

      Documentation +

      +
        +
      • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

      • Exported objects must have a lifecycle badge to clarify the maturity.

        -
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • -
      • +
          +
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • +
        +
      • Use Title Style for the title of the documentation.

      • Always include a @description part with at least one sentence describing the object.

      • @@ -162,38 +208,55 @@

        Documentationwebsite.

      • In vignettes, you cannot directly reference help pages but only pkgdown web pages. Note that this includes only exported objects. To make it look similar to the help page references, please here also use function() style.

      • mmrm_review_methods.Rmd is a large vignette and we precompute this vignette to make the GitHub actions faster. Run the script vignettes/precompile.R to regenerate the precomputed vignette and subsequently update it in GitHub. Before every release we need to run this again. Please note you need to install the package and then compile the vignette because efficiency is better after installation to provide a fair comparison.

      • -
    + +
    -

    Github conventions

    +

    Github conventions +

    When using GitHub to collaborate, the following conventions are needed:

    -
    1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. -
      • If you are going to work on this issue, please assign yourself.
      • -
    2. +
        +
      1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. +
          +
        • If you are going to work on this issue, please assign yourself.
        • +
        +
      2. Please create a branch in the mmrm repository, instead of creating forks, unless you are not yet a team member. -
        • Branches should be associated with a GitHub issue and linked to an issue id.
        • +
            +
          • Branches should be associated with a GitHub issue and linked to an issue id.
          • The name of a branch should be of the form: <issue_id>_<short_discription>.
          • -
          +
        +
      3. Add changes to the branch and push it to GitHub. -
        • Please use clear commit messages.
        • +
            +
          • Please use clear commit messages.
          • Please keep your changes focused on the issue. If there are independent changes, please separate it into another PR linking to another issue.
          • -
          +
        +
      4. Please create a Pull Request when you think your code changes are ready: -
        • Functions are well documented.
        • +
            +
          • Functions are well documented.
          • Functions have corresponding unit tests.
          • Changes pass all the GitHub action checks.
          • The checklist in the corresponding issue is completed.
          • -
          +
        +
      5. Address all the comments you receive. -
        • at least one approval is needed to merge.
        • -
      6. -
    +
      +
    • at least one approval is needed to merge.
    • +
    + + +
    -

    Contribution tips

    +

    Contribution tips +

    -

    Development environment Set-up

    +

    Development environment Set-up +

    The development this mmrm package is based on the latest R version and C++ compilers. The package dependencies are the most recent versions from CRAN. We recommend that your working environment is set up in the same way. Additionally, there are some tools we recommend you to install:

    -
    1. +
        +
      1. RTools if you work on a Windows operating system. Alternatively you can use docker to separate the operating system and the development system.
      2. GitKraken is a very useful user interface for git including visualization of git commit graphs, file history, etc.
      3. @@ -201,43 +264,82 @@

        Development environment Set-uplintr will allow you to perform static code analysis.
      4. pre-commit is a Python module that allows you to identify issues before you commit locally.
      5. -

    + +
    -

    Issue labels

    +

    Issue labels +

    The issues are categorized with several labels:

    - +
    Label name
    ++++ + + - + + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + -
    Label name Description
    SPx
    SPx SP (story points) indicate complexity, and the larger the subsequent number, the more time consuming the issue is expected to be
    priority
    priority Issues with this label should be completed with higher priority
    good first issue
    good first issue Good choices for new team members
    blocked
    blocked Blocked by other issues
    bug
    bug Something isn’t working
    devops
    devops Development and Operation
    discussion
    discussion Discussion needed
    documentation
    documentation Improvement of documentation is needed
    duplicate
    duplicate The issue already exists
    enhancement
    enhancement New feature or request
    help wanted
    help wanted Extra attention is needed
    invalid
    invalid This doesn’t seem right
    question
    question Further information needed

    Please choose an issue based on your interest, issue complexity, and priority.

    + + + +

    Please choose an issue based on your interest, issue complexity, and priority.

    -

    Add new unit tests

    +

    Add new unit tests +

    To add a new unit test, you need to first identify the test scope. Does the test fit in the scope of existing tests? If so, please modify the existing test files under tests/testthat/ folder or src/ folder, depending on whether the code to be tested is R or C++. Otherwise please create a new test file, with a name prefix of “test-”.

    In each test case, use the following structure:

    @@ -250,19 +352,25 @@ 

    Add new unit tests -

    Add integration tests

    +

    Add integration tests +

    Integration tests compare the results of SAS and R and assures the quality of our code. To add an integration test, you need to do the following:

    -
    1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
    2. +
        +
      1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
      2. Save the results in .txt format in the design/SAS/ folder.
      3. Decide the key outputs that are needed for comparison.
      4. Add a unit test verifying that the R implementation of the same model has the same results (conversion may be needed).
      5. -
    + +
    -

    Get started with C++

    +

    Get started with C++ +

    If you have no experience with C++, it is totally fine: TMB has provided us with many high-level functionalities that is very similar to R. Here we only list the most important things that you need to go through before you begin C++ programming.

    -
    1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
    2. +
        +
      1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
      2. Types. C++ is a strong type programming language and all objects need to be declared with type. Sometimes you can combine the declaration and definition. -
        1. +
            +
          1. int i = 1; This works, as we declare i as int and define it to be 1.
          2. i = 1; This fails, because i is not declared yet.
          3. @@ -270,53 +378,70 @@

            Get started with C++
          4. in R, if (TRUE) { a = '123' }; print(a) is legal.
          5. +
              +
            1. in R, if (TRUE) { a = '123' }; print(a) is legal.
            2. in C++, if (1) {string a = '123'}; std::stdout << a << std::endl; is illegal, because object a is terminated already.
            3. in C++, string a; if (1) {a = '123'}; std::stdout << a << std::endl; is legal, a is declared prior to if statement.
            4. -
            +

          +
        2. Polymorphism. Unlike in R, where function arguments have no explicitly defined types, in C++ the type of each argument of a function must be pre-specified. -
          1. +
              +
            1. Template is a special function that works with generic argument type. We could imagine a single function that could work on arguments of arbitrary type, and template functions make this possible through separation of function logic from the argument declaration. In this way we can use template functions and avoid the need to replicate the whole code for each type.
            2. -
          2. -

          With these points in mind, you are about ready to go.

          +
        +
      3. +
      +

      With these points in mind, you are about ready to go.

    -

    Get started with TMB

    +

    Get started with TMB +

    In mmrm we are not including any latent variables and so the Laplace approximation aspect of TMB is not used. We only use the automatic differentiation part of TMB. For detailed documentation of TMB, visit the TMB reference.

    One important feature of TMB are the R style matrix/array calculations. This is important because we mainly use this part to conduct our calculations. See matrix_arrays.cpp for examples.

    -

    Add a new covariance structure

    +

    Add a new covariance structure +

    To add a new covariance structure, you need to do the following:

    -
    1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
    2. +
        +
      1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
      2. Implement the covariance structure on the C++ side and the corresponding R interface.
      3. Add unit tests to make sure the new covariance structure is working as expected.
      4. Add integration tests under design/SAS/ folder to make sure SAS and R produce similar results (within tolerance).
      5. -
    + +
    -

    Add additional data

    +

    Add additional data +

    To add additional data to mmrm, please follow the next steps:

    -
    1. Make sure the data is needed.
    2. +
        +
      1. Make sure the data is needed.
      2. Document the data in R/data.R.
      3. Use save to create an rda data only containing this dataset. Here the function usethis::use_data can also be helpful.
      4. -
    + +
    -

    Communications within team

    +

    Communications within team +

    There are several communication channels, please use appropriate ones.

    -

    GitHub

    +

    GitHub +

    GitHub issues and pull requests are where implementations are discussed and reviewed. Feature requests, bugs, enhancements, technical implementations can be discussed here. When you have ideas that needs to be documented, it is better to have them in GitHub.

    -

    Slack

    +

    Slack +

    Slack is a messaging tool and we have the mmrm channel under the rinpharma space. You can put anything in the slack channel, e.g., you have completed a issue and are waiting for review, or you have some questions and don’t want to wait until the next stand-up meeting.

    To join the slack channel, please make sure you have a slack account, and send the email address to any team member.

    -

    Stand-up meetings

    +

    Stand-up meetings +

    We have stand-up meetings currently three times a week. The purpose of stand-up meetings is for team members to discuss the current work progress and raise any issue/questions for team discussion if needed.

    You don’t need to join all three meetings.

    @@ -324,22 +449,26 @@

    Stand-up meetings

    + + + + - - + + diff --git a/v0.3.10/PULL_REQUEST_TEMPLATE.html b/v0.3.10/PULL_REQUEST_TEMPLATE.html index 2ad45ba76..761d0d1b0 100644 --- a/v0.3.10/PULL_REQUEST_TEMPLATE.html +++ b/v0.3.10/PULL_REQUEST_TEMPLATE.html @@ -1,5 +1,23 @@ - -Description • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +44,8 @@ + - + + - + @@ -112,22 +138,26 @@ - + +
    -
    + + - - + + diff --git a/v0.3.10/articles/algorithm.html b/v0.3.10/articles/algorithm.html index 4b40e8454..080516d9d 100644 --- a/v0.3.10/articles/algorithm.html +++ b/v0.3.10/articles/algorithm.html @@ -1,5 +1,4 @@ - - + @@ -84,11 +83,10 @@ Changelog +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + - + + - + @@ -110,75 +136,104 @@

    Introduction

    -
    Package Introduction
    +
    +
    Package Introduction
    -
    Mixed Models for Repeated Measures
    + +
    Mixed Models for Repeated Measures
    -
    Comparison with other software
    + +
    Comparison with other software
    -
    + +
    +

    Covariance Structures

    -
    Covariance Structures
    +
    +
    Covariance Structures
    -
    + + + + + + + + + + + + + + + + +
    -
    + + - - + + diff --git a/v0.3.10/articles/introduction.html b/v0.3.10/articles/introduction.html index fce1584f2..53ba44c4e 100644 --- a/v0.3.10/articles/introduction.html +++ b/v0.3.10/articles/introduction.html @@ -1,5 +1,4 @@ - - + @@ -84,11 +83,10 @@ Changelog +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + - + + - + @@ -109,7 +135,8 @@

    Authors

    -
    • +
        +
      • Daniel Sabanes Bove. Author, maintainer.

      • @@ -181,7 +208,8 @@

        Authors

        AstraZeneca plc. Copyright holder, funder.

        -
    + +

    Citation

    @@ -200,22 +228,26 @@

    Citation

    }
    + +
    -
    + + - - + + diff --git a/v0.3.10/index.html b/v0.3.10/index.html index ed47800e8..7bb58c246 100644 --- a/v0.3.10/index.html +++ b/v0.3.10/index.html @@ -1,5 +1,4 @@ - - + @@ -108,11 +107,10 @@ Changelog +v0.2.2 + + - + + - + @@ -108,45 +134,70 @@
    -

    mmrm 0.3.10

    CRAN release: 2024-01-26

    +

    mmrm 0.3.10 +

    +

    CRAN release: 2024-01-26

    -

    Miscellaneous

    -
    • Fix internal test skipping functions for MacOS R.
    • -
    +

    Miscellaneous +

    +
      +
    • Fix internal test skipping functions for MacOS R.
    • +
    +
    -

    mmrm 0.3.9

    CRAN release: 2024-01-25

    +

    mmrm 0.3.9 +

    +

    CRAN release: 2024-01-25

    -

    Miscellaneous

    -
    • Fix internal test skipping functions for R versions older than 4.3.
    • -
    +

    Miscellaneous +

    +
      +
    • Fix internal test skipping functions for R versions older than 4.3.
    • +
    +
    -

    mmrm 0.3.8

    CRAN release: 2024-01-24

    +

    mmrm 0.3.8 +

    +

    CRAN release: 2024-01-24

    -

    New Features

    -
    • +

      New Features +

      +
        +
      • Anova is implemented for mmrm models and available upon loading the car package. It supports type II and III hypothesis testing.
      • The argument start for mmrm_control() is updated to allow better choices of initial values.
      • confint on mmrm models will give t-based confidence intervals now, instead of the normal approximation.
      • -
    + +
    -

    Bug Fixes

    -
    • Previously if the first optimizer failed, the best successful fit among the remaining optimizers was not returned correctly. This is fixed now.
    • -
    +

    Bug Fixes +

    +
      +
    • Previously if the first optimizer failed, the best successful fit among the remaining optimizers was not returned correctly. This is fixed now.
    • +
    +
    -

    Miscellaneous

    -
    • In documentation of mmrm_control(), the allowed vcov definition is corrected to “Empirical-Jackknife” (CR3), and “Empirical-Bias-Reduced” (CR2).
    • +

      Miscellaneous +

      +
        +
      • In documentation of mmrm_control(), the allowed vcov definition is corrected to “Empirical-Jackknife” (CR3), and “Empirical-Bias-Reduced” (CR2).
      • Fixed a compiler warning related to missing format specification.
      • If an empty contrast matrix is provided to df_md, it will return statistics with NA values.
      • -
    + +
    -

    mmrm 0.3.7

    CRAN release: 2023-12-08

    +

    mmrm 0.3.7 +

    +

    CRAN release: 2023-12-08

    -

    New Features

    -
    • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
    • +

      New Features +

      +
        +
      • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
      • Add empirical, empirical Jackknife and empirical bias-reduced adjusted coefficients covariance estimates, which can be specified via the new vcov argument of mmrm().
      • Add residual and between-within degrees of freedom methods.
      • Add Kenward-Roger support for spatial covariance structures.
      • @@ -157,76 +208,105 @@

        New FeaturesAdd tidy(), glance() and augment() methods to tidy the fit results into summary tables.
      • Add tidymodels framework support via a parsnip interface.
      • Add argument covariance to mmrm() to allow for easier programmatic access to specifying the model’s covariance structure and to expose covariance customization through the tidymodels interface.
      • -

    + +
    -

    Bug Fixes

    -
    • Previously mmrm() follows the global option na.action and if it is set other than "na.omit" an assertion would fail. This is now fixed and hence NA values are always removed prior to model fitting, independent of the global na.action option.
    • +

      Bug Fixes +

      +
        +
      • Previously mmrm() follows the global option na.action and if it is set other than "na.omit" an assertion would fail. This is now fixed and hence NA values are always removed prior to model fitting, independent of the global na.action option.
      • Previously a model.frame() call on an mmrm object with transformed terms, or new data, e.g. model.frame(mmrm(Y ~ log(X) + ar1(VISIT|ID), data = new_data), would fail. This is now fixed.
      • Previously mmrm() always required a data argument. Now fitting mmrm can also use environment variables instead of requiring data argument. (Note that fit_mmrm is not affected.)
      • Previously emmeans() failed when using transformed terms or not including the visit variable in the model formula. This is now fixed.
      • Previously mmrm() might provide non-finite values in the Jacobian calculations, leading to errors in the Satterthwaite degrees of freedom calculations. This will raise an error now and thus alert the user that the model fit was not successful.
      • -
    + +
    -

    Miscellaneous

    -
    • Use automatic differentiation to calculate Satterthwaite adjusted degrees of freedom, resulting in 10-fold speed-up of the Satterthwaite calculations after the initial model fit.
    • +

      Miscellaneous +

      +
        +
      • Use automatic differentiation to calculate Satterthwaite adjusted degrees of freedom, resulting in 10-fold speed-up of the Satterthwaite calculations after the initial model fit.
      • Add an interactive confirmation step if the number of visit levels is too large for non-spatial covariance structures. Use options(mmrm.max_visits = ) to specify the maximum number of visits allowed in non-interactive mode.
      • Removed free_cores() in favor of parallelly::availableCores(omit = 1).
      • The model.frame() method has been updated: The full argument is deprecated and the include argument can be used instead; by default all relevant variables are returned. Furthermore, it returns a data.frame the size of the number of observations utilized in the model for all combinations of the include argument when na.action= "na.omit".
      • Overall, seven vignettes have been added to the package. All vignettes have a slightly different look now to reduce the size of the overall R package on CRAN.
      • The used optimizer is now available via component(., "optimizer") instead of previously attr(., "optimizer").
      • -
    + +
    -

    mmrm 0.2.2

    CRAN release: 2022-12-20

    +

    mmrm 0.2.2 +

    +

    CRAN release: 2022-12-20

    -

    New Features

    -
    • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
    • +

      New Features +

      +
        +
      • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
      • Update the mmrm arguments to allow users more fine-grained control, e.g. mmrm(..., start = start, optimizer = c("BFGS", "nlminb")) to set the starting values for the variance estimates and to choose the available optimizers. These arguments will be passed to the new function mmrm_control.
      • Add new argument drop_visit_levels to allow users to keep all levels in visits, even when they are not observed in the data. Dropping unobserved levels was done silently previously, and now a message will be given. See ?mmrm_control for more details.
      • -
    + +
    -

    Bug Fixes

    -
    • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
    • +

      Bug Fixes +

      +
        +
      • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
      • Previously in mmrm calls, the weights object in the environment where the formula is defined was replaced by the weights used internally. Now this behavior is removed and your variable weights e.g. in the global environment will no longer be replaced.
      • -
    + +
    -

    Miscellaneous

    -
    • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
    • +

      Miscellaneous +

      +
        +
      • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
      • Deprecated optimizer = "automatic" in favor of not specifying the optimizer. By default, all remaining optimizers will be tried if the first optimizer fails to reach convergence.
      • -
    + +
    -

    mmrm 0.1.5

    CRAN release: 2022-10-18

    -
    • First CRAN version of the package.
    • +

      mmrm 0.1.5 +

      +

      CRAN release: 2022-10-18

      +
        +
      • First CRAN version of the package.
      • The package fits mixed models for repeated measures (MMRM) based on the marginal linear model without random effects.
      • The motivation for this package is to have a fast, reliable (in terms of convergence behavior) and feature complete implementation of MMRM in R.
      • -
      -

      New Features

      -
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • +
      +
      +

      New Features +

      +
        +
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • Fast C++ implementation of Maximum Likelihood (ML) and Restricted Maximum Likelihood (REML) estimation.
      • Currently Satterthwaite adjusted degrees of freedom calculation is supported.
      • Interface to the emmeans package for computing estimated marginal means (also called least-square means) for the coefficients.
      • Multiple optimizers are run to reach convergence in as many cases as possible.
      • Flexible formula based model specification and support for standard S3 methods such as summary, logLik, etc.
      • -
      +
    +
    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/Anova.mmrm.html b/v0.3.10/reference/Anova.mmrm.html index 2da3aca88..727f25bcb 100644 --- a/v0.3.10/reference/Anova.mmrm.html +++ b/v0.3.10/reference/Anova.mmrm.html @@ -1,5 +1,25 @@ - -Conduct type II/III hypothesis testing on the MMRM fit results. — Anova.mmrm • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    Anova.mmrm(
       mod,
       type = c("II", "III", "2", "3"),
    @@ -123,8 +152,10 @@ 

    Usage

    -

    Arguments

    -
    mod
    +

    Arguments +

    +
    +
    mod

    (mmrm)
    the fitted MMRM.

    @@ -139,31 +170,37 @@

    Arguments -

    Details

    +

    Details +

    Anova will return anova object with one row per variable and columns Num Df(numerator degrees of freedom), Denom Df(denominator degrees of freedom), F Statistic and Pr(>=F).

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/COV_TYPES.html b/v0.3.10/reference/COV_TYPES.html index 668fa7f6e..0c7b5a5a3 100644 --- a/v0.3.10/reference/COV_TYPES.html +++ b/v0.3.10/reference/COV_TYPES.html @@ -1,5 +1,25 @@ - -Covariance Type Database — COV_TYPES • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,14 +141,17 @@
    -

    Usage

    +

    Usage +

    COV_TYPES
    -

    Format

    +

    Format +

    A data frame with 5 variables and one record per covariance type:

    -
    name
    +
    +
    name

    The long-form name of the covariance structure type

    abbr
    @@ -139,25 +170,30 @@

    Format<

    A logical value indicating whether the covariance structure is spatial.

    -

    + + + +
    -
    + + - - + + diff --git a/v0.3.10/reference/as.cov_struct.html b/v0.3.10/reference/as.cov_struct.html index a958e79fe..4f4affcdb 100644 --- a/v0.3.10/reference/as.cov_struct.html +++ b/v0.3.10/reference/as.cov_struct.html @@ -1,5 +1,25 @@ - -Coerce into a Covariance Structure Definition — as.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    as.cov_struct(x, ...)
     
     # S3 method for formula
    @@ -121,8 +150,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    an object from which to derive a covariance structure. See object specific sections for details.

    @@ -135,44 +166,66 @@

    Arguments -

    Value

    +

    Value +

    A cov_struct() object.

    -

    Details

    +

    Details +

    A covariance structure can be parsed from a model definition formula or call. Generally, covariance structures defined using non-standard evaluation take the following form:

    -

    type( (visit, )* visit | (group /)? subject )

    +

    +
    +
    type( (visit, )* visit | (group /)? subject )
    +

    +

    For example, formulas may include terms such as

    -

    us(time | subject)
    +

    +
    +
    us(time | subject)
     cp(time | group / subject)
    -sp_exp(coord1, coord2 | group / subject)

    +sp_exp(coord1, coord2 | group / subject)
    +

    +

    Note that only sp_exp (spatial) covariance structures may provide multiple coordinates, which identify the Euclidean distance between the time points.

    -

    Methods (by class)

    +

    Methods (by class) +

    -
    • as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be +

        +
      • +

        as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be covariance structure definitions and must follow the form:

        -

        y ~ xs + type( (visit, )* visit | (group /)? subject )

        +

        +
        +
        y ~ xs + type( (visit, )* visit | (group /)? subject )
        +

        +

        Any component on the right hand side of a formula is considered when -searching for a covariance definition.

      • -
    +searching for a covariance definition.

    + + +
    -

    See also

    +

    See also +

    Other covariance types: cov_struct(), covariance_types

    -

    Examples

    +

    Examples +

    # provide a covariance structure as a right-sided formula
     as.cov_struct(~ csh(visit | group / subject))
     #> <covariance structure>
    @@ -192,22 +245,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.10/reference/bcva_data.html b/v0.3.10/reference/bcva_data.html index 5b243208d..88c828980 100644 --- a/v0.3.10/reference/bcva_data.html +++ b/v0.3.10/reference/bcva_data.html @@ -1,5 +1,25 @@ - -Example Data on BCVA — bcva_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,48 +141,59 @@
    -

    Usage

    +

    Usage +

    bcva_data
    -

    Format

    -

    A tibble with 10,000 rows and 7 variables:

    • USUBJID: subject ID.

    • +

      Format +

      +

      A tibble with 10,000 rows and 7 variables:

      +
        +
      • USUBJID: subject ID.

      • VISITN: visit number (numeric).

      • AVISIT: visit number (factor).

      • ARMCD: treatment, TRT or CTL.

      • RACE: 3-category race.

      • BCVA_BL: BCVA at baseline.

      • BCVA_CHG: Change in BCVA at study visits.

      • -
    + +
    -

    Source

    +

    Source +

    This is an artificial dataset.

    -

    Note

    +

    Note +

    Measurements of BCVA (best corrected visual acuity) is a measure of how how many letters a person can read off of an eye chart using corrective lenses or contacts. This a common endpoint in ophthalmology trials.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/cached_mmrm_results.html b/v0.3.10/reference/cached_mmrm_results.html index 62a86486b..95aa4c33f 100644 --- a/v0.3.10/reference/cached_mmrm_results.html +++ b/v0.3.10/reference/cached_mmrm_results.html @@ -1,5 +1,25 @@ - -Cache Data for mmrm Model Comparison — cached_mmrm_results • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,25 +141,32 @@
    -

    Usage

    +

    Usage +

    cached_mmrm_results
    -

    Format

    -

    A list with following elements:

    • conv_time_fev: Convergence time on FEV data.

    • +

      Format +

      +

      A list with following elements:

      +
        +
      • conv_time_fev: Convergence time on FEV data.

      • conv_time_bcva: Convergence time on BCVA data.

      • rel_diff_ests_tbl_fev: Relative difference in estimates on FEV data.

      • rel_diff_ests_tbl_bcva: Relative difference in estimates on BCVA data.

      • conv_rate: Convergence rate on data with different missing levels.

      • df_missingness: Summary of missingness on simulated data.

      • -
    + +
    -

    Source

    +

    Source +

    This is created based on simulations on FEV data and BCVA data.

    -

    Note

    +

    Note +

    The cached data for comparison is used for the vignettes generation. Please make sure that this data is refreshed before each package release by running the script data-raw/mmrm_review.R. @@ -140,22 +175,26 @@

    Note

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/car_add_mmrm.html b/v0.3.10/reference/car_add_mmrm.html index cbec92640..0f1425e45 100644 --- a/v0.3.10/reference/car_add_mmrm.html +++ b/v0.3.10/reference/car_add_mmrm.html @@ -1,5 +1,25 @@ - -Register mmrm For Use With car::Anova — car_add_mmrm • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -113,40 +142,49 @@
    -

    Usage

    +

    Usage +

    car_add_mmrm(quietly = FALSE)
    -

    Arguments

    -
    quietly
    +

    Arguments +

    +
    +
    quietly

    logical: should progress and error messages be suppressed?

    -
    + +
    -

    Value

    +

    Value +

    A logical value indicating whether registration was successful.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/check_package_version.html b/v0.3.10/reference/check_package_version.html index 9918b19a9..b9333a9b8 100644 --- a/v0.3.10/reference/check_package_version.html +++ b/v0.3.10/reference/check_package_version.html @@ -1,5 +1,25 @@ - -Check Suggested Dependency Against Version Requirements — check_package_version • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    check_package_version(pkg, ver = c(NA_character_, NA_character_))
    -

    Arguments

    -
    pkg
    +

    Arguments +

    +
    +
    pkg

    (string)
    package name.

    @@ -129,9 +160,11 @@

    Arguments -

    Value

    +

    Value +

    A logical (invisibly) indicating whether the loaded package meets @@ -139,22 +172,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/component.html b/v0.3.10/reference/component.html index e498656cf..dd4a255d5 100644 --- a/v0.3.10/reference/component.html +++ b/v0.3.10/reference/component.html @@ -1,5 +1,25 @@ - -Component Access for mmrm_tmb Objects — component • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    component(
       object,
       name = c("cov_type", "subject_var", "n_theta", "n_subjects", "n_timepoints", "n_obs",
    @@ -125,24 +154,31 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    name

    (character)
    the component(s) to be retrieved.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding component of the object, see details.

    -

    Details

    -

    Available component() names are as follows:

    • call: low-level function call which generated the model.

    • +

      Details +

      +

      Available component() names are as follows:

      +
    + +
    -

    See also

    +

    See also +

    In the lme4 package there is a similar function getME().

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -3083,22 +3122,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.10/reference/cov_struct.html b/v0.3.10/reference/cov_struct.html index 95df3a89f..ad1a6b244 100644 --- a/v0.3.10/reference/cov_struct.html +++ b/v0.3.10/reference/cov_struct.html @@ -1,5 +1,25 @@ - -Define a Covariance Structure — cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    cov_struct(
       type = cov_types(),
       visits,
    @@ -124,8 +153,10 @@ 

    Usage

    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    the name of the covariance structure type to use. For available options, see cov_types(). If a type abbreviation is used that implies heterogeneity (e.g. cph) and no value is provided to @@ -151,22 +182,26 @@

    Arguments -

    Value

    +

    Value +

    A cov_struct object.

    -

    See also

    +

    See also +

    Other covariance types: as.cov_struct(), covariance_types

    -

    Examples

    +

    Examples +

    cov_struct("csh", "AVISITN", "USUBJID")
     #> <covariance structure>
     #> heterogeneous compound symmetry:
    @@ -183,22 +218,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.10/reference/cov_type_abbr.html b/v0.3.10/reference/cov_type_abbr.html index e96454ef1..e78658b54 100644 --- a/v0.3.10/reference/cov_type_abbr.html +++ b/v0.3.10/reference/cov_type_abbr.html @@ -1,5 +1,25 @@ - -Retrieve Associated Abbreviated Covariance Structure Type Name — cov_type_abbr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,41 +141,50 @@
    -

    Usage

    +

    Usage +

    cov_type_abbr(type)
    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    either a full name or abbreviate covariance structure type name to collapse into an abbreviated type.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding abbreviated covariance type name.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/cov_type_name.html b/v0.3.10/reference/cov_type_name.html index 84b27c860..1531da454 100644 --- a/v0.3.10/reference/cov_type_name.html +++ b/v0.3.10/reference/cov_type_name.html @@ -1,5 +1,25 @@ - -Retrieve Associated Full Covariance Structure Type Name — cov_type_name • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,41 +141,50 @@
    -

    Usage

    +

    Usage +

    cov_type_name(type)
    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    either a full name or abbreviate covariance structure type name to convert to a long-form type.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding abbreviated covariance type name.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/covariance_types.html b/v0.3.10/reference/covariance_types.html index 3fcc87701..8a40246cf 100644 --- a/v0.3.10/reference/covariance_types.html +++ b/v0.3.10/reference/covariance_types.html @@ -1,5 +1,25 @@ - -Covariance Types — covariance_types • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    cov_types(
       form = c("name", "abbr", "habbr"),
       filter = c("heterogeneous", "spatial")
    @@ -121,8 +150,10 @@ 

    Usage

    -

    Arguments

    -
    form
    +

    Arguments +

    +
    +
    form

    (character)
    covariance structure type name form. One or more of "name", "abbr" (abbreviation), or "habbr" (heterogeneous abbreviation).

    @@ -132,67 +163,155 @@

    Arguments or "spatial".

    -

    + +
    -

    Value

    +

    Value +

    A character vector of accepted covariance structure type names and abbreviations.

    -

    Note

    +

    Note +

    The ante-dependence covariance structure in this package refers to homogeneous ante-dependence, while the ante-dependence covariance structure from SAS PROC MIXED refers to heterogeneous ante-dependence and the homogeneous version is not available in SAS.

    For all non-spatial covariance structures, the time variable must -be coded as a factor.

    -

    Spatial Covariance structures:

    +be coded as a factor.

    +
    +

    Spatial Covariance structures: +

    -
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)

    where \(d_{ij}\) denotes the Euclidean distance between time points + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)
    +

    where \(d_{ij}\) denotes the Euclidean distance between time points \(i\) and \(j\).

    -

    Abbreviations for Covariance Structures

    +

    Abbreviations for Covariance Structures +

    -

    Common Covariance Structures:

    +

    Common Covariance Structures: +

    -
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)
    +

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, respectively, out of total \(m\) time points, \(1 \leq i, j \leq m\).

    -

    See also

    +

    See also +

    Other covariance types: as.cov_struct(), cov_struct()

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/df_1d.html b/v0.3.10/reference/df_1d.html index 783b72bec..2bfc94397 100644 --- a/v0.3.10/reference/df_1d.html +++ b/v0.3.10/reference/df_1d.html @@ -1,9 +1,29 @@ - - + + + + + +Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm +Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -119,13 +147,16 @@
    -

    Usage

    +

    Usage +

    df_1d(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -134,16 +165,19 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -169,22 +203,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.10/reference/df_md.html b/v0.3.10/reference/df_md.html index a48233a3c..239ab4e28 100644 --- a/v0.3.10/reference/df_md.html +++ b/v0.3.10/reference/df_md.html @@ -1,11 +1,31 @@ - - + + + + + +Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm +Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -122,13 +150,16 @@
    -

    Usage

    +

    Usage +

    df_md(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -138,16 +169,19 @@

    Arguments -

    Value

    +

    Value +

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

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -170,22 +204,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.10/reference/drop_elements.html b/v0.3.10/reference/drop_elements.html index a35ac24b3..7fca1bbc8 100644 --- a/v0.3.10/reference/drop_elements.html +++ b/v0.3.10/reference/drop_elements.html @@ -1,5 +1,25 @@ - -Drop Items from an Indexible — drop_elements • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    drop_elements(x, n)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    Any object that can be consumed by seq_along() and indexed by a logical vector of the same length.

    @@ -127,31 +158,37 @@

    Arguments -

    Value

    +

    Value +

    A subset of x.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/emit_tidymodels_register_msg.html b/v0.3.10/reference/emit_tidymodels_register_msg.html index 1991110b6..8fbad7988 100644 --- a/v0.3.10/reference/emit_tidymodels_register_msg.html +++ b/v0.3.10/reference/emit_tidymodels_register_msg.html @@ -1,5 +1,25 @@ - -Format a Message to Emit When Tidymodels is Loaded — emit_tidymodels_register_msg • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,12 +141,14 @@
    -

    Usage

    +

    Usage +

    emit_tidymodels_register_msg()
    -

    Value

    +

    Value +

    A character message to emit. Either a ansi-formatted cli output if @@ -126,22 +156,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/emmeans_support.html b/v0.3.10/reference/emmeans_support.html index 7681c59a4..0c12b0062 100644 --- a/v0.3.10/reference/emmeans_support.html +++ b/v0.3.10/reference/emmeans_support.html @@ -1,17 +1,37 @@ - - + + + + + +Support for emmeans — emmeans_support • mmrm +Support for emmeans — emmeans_support • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -36,7 +58,8 @@ + - + + - +
    @@ -133,7 +162,8 @@
    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -162,22 +192,26 @@ 

    Examples#> Results are averaged over the levels of: RACE, SEX

    -
    + +
    + + - - + + diff --git a/v0.3.10/reference/emp_start.html b/v0.3.10/reference/emp_start.html index 770ece6b5..b8330351a 100644 --- a/v0.3.10/reference/emp_start.html +++ b/v0.3.10/reference/emp_start.html @@ -1,5 +1,25 @@ - -Empirical Starting Value — emp_start • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    emp_start(data, model_formula, visit_var, subject_var, subject_groups, ...)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (data.frame)
    data used for model fitting.

    @@ -142,44 +173,52 @@

    Arguments -

    Value

    +

    Value +

    A numeric vector of starting values.

    -

    Details

    +

    Details +

    This emp_start only works for unstructured covariance structure. It uses linear regression to first obtain the coefficients and use the residuals to obtain the empirical variance-covariance, and it is then used to obtain the starting values.

    -

    Note

    +

    Note +

    data is used instead of full_frame because full_frame is already transformed if model contains transformations, e.g. log(FEV1) ~ exp(FEV1_BL) will drop FEV1 and FEV1_BL but add log(FEV1) and exp(FEV1_BL) in full_frame.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/fev_data.html b/v0.3.10/reference/fev_data.html index 3e9998877..91dc9e081 100644 --- a/v0.3.10/reference/fev_data.html +++ b/v0.3.10/reference/fev_data.html @@ -1,5 +1,25 @@ - -Example Data on FEV1 — fev_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,17 @@
    -

    Usage

    +

    Usage +

    fev_data
    -

    Format

    -

    A tibble with 800 rows and 7 variables:

    • USUBJID: subject ID.

    • +

      Format +

      +

      A tibble with 800 rows and 7 variables:

      +
        +
      • USUBJID: subject ID.

      • AVISIT: visit number.

      • ARMCD: treatment, TRT or PBO.

      • RACE: 3-category race.

      • @@ -127,35 +159,42 @@

        Format<
      • FEV1_BL: FEV1 at baseline (%).

      • FEV1: FEV1 at study visits.

      • WEIGHT: weighting variable.

      • -

    + +
    -

    Source

    +

    Source +

    This is an artificial dataset.

    -

    Note

    +

    Note +

    Measurements of FEV1 (forced expired volume in one second) is a measure of how quickly the lungs can be emptied. Low levels of FEV1 may indicate chronic obstructive pulmonary disease (COPD).

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/fill_names.html b/v0.3.10/reference/fill_names.html index 224205561..229a2291c 100644 --- a/v0.3.10/reference/fill_names.html +++ b/v0.3.10/reference/fill_names.html @@ -1,5 +1,25 @@ - -Complete character Vector Names From Values — fill_names • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,41 +141,50 @@
    -

    Usage

    +

    Usage +

    fill_names(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character or list)
    value whose names should be completed from element values.

    -
    + +
    -

    Value

    +

    Value +

    A named vector or list.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/fit_mmrm.html b/v0.3.10/reference/fit_mmrm.html index f8a0bcdee..dd32790da 100644 --- a/v0.3.10/reference/fit_mmrm.html +++ b/v0.3.10/reference/fit_mmrm.html @@ -1,11 +1,31 @@ - - + + + + + +Low-Level Fitting Function for MMRM — fit_mmrm • mmrm +Low-Level Fitting Function for MMRM — fit_mmrm • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -122,7 +150,8 @@
    -

    Usage

    +

    Usage +

    fit_mmrm(
       formula,
       data,
    @@ -136,8 +165,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    model formula with exactly one special term specifying the visits within subjects, see details.

    @@ -176,16 +207,19 @@

    Argumentsmmrm_control().

    -

    + +
    -

    Value

    +

    Value +

    List of class mmrm_tmb, see h_mmrm_tmb_fit() for details. In addition, it contains elements call and optimizer.

    + + - - + + diff --git a/v0.3.10/reference/fit_single_optimizer.html b/v0.3.10/reference/fit_single_optimizer.html index 73458ac0c..45e83e665 100644 --- a/v0.3.10/reference/fit_single_optimizer.html +++ b/v0.3.10/reference/fit_single_optimizer.html @@ -1,9 +1,29 @@ - - + + + + + +Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm +Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -119,7 +147,8 @@
    -

    Usage

    +

    Usage +

    fit_single_optimizer(
       formula,
       data,
    @@ -134,8 +163,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -175,9 +206,11 @@

    Arguments -

    Value

    +

    Value +

    The mmrm_fit object, with additional attributes containing warnings, @@ -185,7 +218,8 @@

    Value

    mmrm_tmb
    contents.

    + +
    - - + + diff --git a/v0.3.10/reference/flat_expr.html b/v0.3.10/reference/flat_expr.html index 1df9c3240..880ce48ed 100644 --- a/v0.3.10/reference/flat_expr.html +++ b/v0.3.10/reference/flat_expr.html @@ -1,11 +1,31 @@ - - + + + + + +Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm +Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -122,61 +150,86 @@
    -

    Usage

    +

    Usage +

    flatten_call(call)
     
     flatten_expr(expr)
    -

    Arguments

    -
    call, expr
    +

    Arguments +

    +
    +
    call, expr

    (language)
    a language object to flatten.

    -
    + +
    -

    Value

    +

    Value +

    A list of atomic values, symbols, infix operator names and subexpressions.

    -

    Details

    +

    Details +

    Where 1 + 2 | 3 in R's syntax tree is (|, (+, 1, 2), 3), flattening it into its visual order produces (1, +, 2, |, 3), which makes for more fluent interpretation of non-standard grammar rules used in formulas.

    -

    Functions

    +

    Functions +

    -
    • flatten_call(): Flatten a call into a list of names and argument expressions.

      +
        +
      • +

        flatten_call(): Flatten a call into a list of names and argument expressions.

        The call name and all arguments are flattened into the same list, meaning a call of the form sp_exp(a, b, c | d / e) produces a list of the form (sp_exp, a, b, c, |, d, /, e).

        -

        flatten_call(quote(sp_exp(a, b, c | d / e)))

      • -
      • flatten_expr(): Flatten nested expressions

        -

        flatten_expr(quote(1 + 2 + 3 | 4))

      • -
    +

    +
    +
    flatten_call(quote(sp_exp(a, b, c | d / e)))
    +

    +
    + +
  • +

    flatten_expr(): Flatten nested expressions

    +

    +
    +
    flatten_expr(quote(1 + 2 + 3 | 4))
    +

    +
    +
  • + + + +
    -
    + + - - + + diff --git a/v0.3.10/reference/format.cov_struct.html b/v0.3.10/reference/format.cov_struct.html index d8cfe4436..24c086574 100644 --- a/v0.3.10/reference/format.cov_struct.html +++ b/v0.3.10/reference/format.cov_struct.html @@ -1,5 +1,25 @@ - -Format Covariance Structure Object — format.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,45 +141,54 @@
    -

    Usage

    +

    Usage +

    # S3 method for cov_struct
     format(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    ...

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string for x.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/format_symbols.html b/v0.3.10/reference/format_symbols.html index 4798124e1..1f7404878 100644 --- a/v0.3.10/reference/format_symbols.html +++ b/v0.3.10/reference/format_symbols.html @@ -1,7 +1,27 @@ - -Format Symbol Objects — format_symbols • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,40 +144,49 @@
    -

    Usage

    +

    Usage +

    format_symbols(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character) A vector of variable names.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string of comma-separated variables.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/formula_rhs.html b/v0.3.10/reference/formula_rhs.html index 740b0c119..e5b9608a5 100644 --- a/v0.3.10/reference/formula_rhs.html +++ b/v0.3.10/reference/formula_rhs.html @@ -1,5 +1,25 @@ - -Extract Right-Hand-Side (rhs) from Formula — formula_rhs • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,47 +141,60 @@
    -

    Usage

    +

    Usage +

    formula_rhs(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula.

    -
    + +
    -

    Value

    +

    Value +

    A formula without a response, derived from the right-hand-side of the formula, f.

    -

    formula_rhs(a ~ b + c)
    -formula_rhs(~ b + c)

    +

    +
    +
    formula_rhs(a ~ b + c)
    +formula_rhs(~ b + c)
    +

    +
    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_add_covariance_terms.html b/v0.3.10/reference/h_add_covariance_terms.html index a6273d74e..25d8435c8 100644 --- a/v0.3.10/reference/h_add_covariance_terms.html +++ b/v0.3.10/reference/h_add_covariance_terms.html @@ -1,5 +1,25 @@ - -Add Individual Covariance Variables As Terms to Formula — h_add_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_add_covariance_terms(f, covariance)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula to which covariance structure terms should be added.

    @@ -128,37 +159,44 @@

    Arguments -

    Value

    +

    Value +

    A new formula with included covariance terms.

    -

    Details

    +

    Details +

    stats::update() is used to append the covariance structure and the environment attribute will not be changed. This ensures the returned formula and the input formula have the same environment.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_add_terms.html b/v0.3.10/reference/h_add_terms.html index cce9eecad..52516627f 100644 --- a/v0.3.10/reference/h_add_terms.html +++ b/v0.3.10/reference/h_add_terms.html @@ -1,5 +1,25 @@ - -Add Formula Terms with Character — h_add_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_add_terms(f, adds, drop_response = FALSE)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula to be updated.

    @@ -130,37 +161,44 @@

    Arguments -

    Value

    +

    Value +

    A new formula with elements in drops removed.

    -

    Details

    +

    Details +

    Elements in adds will be added from the formula, while the environment of the formula is unchanged. If adds is NULL or character(0), the formula is unchanged.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_coef_table.html b/v0.3.10/reference/h_coef_table.html index 2da25a8d5..782e4e00e 100644 --- a/v0.3.10/reference/h_coef_table.html +++ b/v0.3.10/reference/h_coef_table.html @@ -1,5 +1,25 @@ - -Coefficients Table for MMRM Fit — h_coef_table • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,18 +141,23 @@
    -

    Usage

    +

    Usage +

    h_coef_table(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    model fit.

    -
    + +
    -

    Value

    +

    Value +

    Matrix with one row per coefficient and columns @@ -132,22 +165,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_confirm_large_levels.html b/v0.3.10/reference/h_confirm_large_levels.html index 193f583a1..d8f27394a 100644 --- a/v0.3.10/reference/h_confirm_large_levels.html +++ b/v0.3.10/reference/h_confirm_large_levels.html @@ -1,7 +1,27 @@ - -Ask for Confirmation on Large Visit Levels — h_confirm_large_levels • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,34 +144,42 @@
    -

    Usage

    +

    Usage +

    h_confirm_large_levels(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (numeric)
    number of visit levels.

    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_construct_model_frame_inputs.html b/v0.3.10/reference/h_construct_model_frame_inputs.html index 4fb433fc5..f0573f3d5 100644 --- a/v0.3.10/reference/h_construct_model_frame_inputs.html +++ b/v0.3.10/reference/h_construct_model_frame_inputs.html @@ -1,13 +1,33 @@ - - + + + + + +Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm +Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -32,7 +54,8 @@ + - + + - + @@ -125,7 +153,8 @@
    -

    Usage

    +

    Usage +

    h_construct_model_frame_inputs(
       formula,
       data,
    @@ -136,8 +165,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (mmrm)
    mmrm fit object.

    @@ -153,36 +184,45 @@

    Arguments -

    Value

    +

    Value +

    -

    named list with four elements:

    • "formula": the formula including the columns requested in the include= argument.

    • +

      named list with four elements:

      +
        +
      • "formula": the formula including the columns requested in the include= argument.

      • "formula_full": the formula including all columns

      • "data": a data frame including all columns where factor and character columns have been processed with h_factor_ref().

      • "is_full": a logical scalar indicating if the formula and full formula are identical

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_default_value.html b/v0.3.10/reference/h_default_value.html index 3b26e803e..0471f6e11 100644 --- a/v0.3.10/reference/h_default_value.html +++ b/v0.3.10/reference/h_default_value.html @@ -1,9 +1,29 @@ - -Default Value on NULL -Return default value when first argument is NULL. — h_default_value • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -119,42 +147,51 @@
    -

    Usage

    +

    Usage +

    h_default_value(x, y)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    Object.

    y

    Object.

    -
    + +
    -

    Details

    +

    Details +

    If x is NULL, returns y. Otherwise return x.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_df_1d_bw.html b/v0.3.10/reference/h_df_1d_bw.html index 4823dcefa..5d2b9cd20 100644 --- a/v0.3.10/reference/h_df_1d_bw.html +++ b/v0.3.10/reference/h_df_1d_bw.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom for One-Dimensional Contrast — h_df_1d_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_bw(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_df_1d_kr.html b/v0.3.10/reference/h_df_1d_kr.html index b9dfe07de..3a10c9cd3 100644 --- a/v0.3.10/reference/h_df_1d_kr.html +++ b/v0.3.10/reference/h_df_1d_kr.html @@ -1,7 +1,27 @@ - -Calculation of Kenward-Roger Degrees of Freedom for One-Dimensional Contrast — h_df_1d_kr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,13 +144,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_kr(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -131,31 +162,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_df_1d_res.html b/v0.3.10/reference/h_df_1d_res.html index 17ce7fb45..cdb195ac7 100644 --- a/v0.3.10/reference/h_df_1d_res.html +++ b/v0.3.10/reference/h_df_1d_res.html @@ -1,7 +1,27 @@ - -Calculation of Residual Degrees of Freedom for One-Dimensional Contrast — h_df_1d_res • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,13 +144,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_res(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -131,31 +162,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_df_1d_sat.html b/v0.3.10/reference/h_df_1d_sat.html index 80c68d6b9..0f60571f8 100644 --- a/v0.3.10/reference/h_df_1d_sat.html +++ b/v0.3.10/reference/h_df_1d_sat.html @@ -1,7 +1,27 @@ - -Calculation of Satterthwaite Degrees of Freedom for One-Dimensional Contrast — h_df_1d_sat • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,13 +144,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_sat(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -131,31 +162,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_df_bw_calc.html b/v0.3.10/reference/h_df_bw_calc.html index fb007abe6..f65ad4e5f 100644 --- a/v0.3.10/reference/h_df_bw_calc.html +++ b/v0.3.10/reference/h_df_bw_calc.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom — h_df_bw_calc • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,42 +141,54 @@
    -

    Usage

    +

    Usage +

    h_df_bw_calc(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    -

    List with:

    + + + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_df_md_bw.html b/v0.3.10/reference/h_df_md_bw.html index 30710aee6..2259e76c0 100644 --- a/v0.3.10/reference/h_df_md_bw.html +++ b/v0.3.10/reference/h_df_md_bw.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_bw(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -129,31 +160,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_df_md_from_1d.html b/v0.3.10/reference/h_df_md_from_1d.html index f82cecb36..9a3f0bd44 100644 --- a/v0.3.10/reference/h_df_md_from_1d.html +++ b/v0.3.10/reference/h_df_md_from_1d.html @@ -1,5 +1,25 @@ - -Creating F-Statistic Results from One-Dimensional Contrast — h_df_md_from_1d • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,22 +141,27 @@
    -

    Usage

    +

    Usage +

    h_df_md_from_1d(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    model fit.

    contrast

    (numeric)
    one-dimensional contrast.

    -
    + +
    -

    Value

    +

    Value +

    The one-dimensional degrees of freedom are calculated and then @@ -136,22 +169,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_df_md_kr.html b/v0.3.10/reference/h_df_md_kr.html index bb4429806..79d6f9ab0 100644 --- a/v0.3.10/reference/h_df_md_kr.html +++ b/v0.3.10/reference/h_df_md_kr.html @@ -1,5 +1,25 @@ - -Calculation of Kenward-Roger Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_kr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_kr(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -129,31 +160,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_df_md_res.html b/v0.3.10/reference/h_df_md_res.html index ca5f1b8b5..b2e8d964c 100644 --- a/v0.3.10/reference/h_df_md_res.html +++ b/v0.3.10/reference/h_df_md_res.html @@ -1,5 +1,25 @@ - -Calculation of Residual Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_res • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_res(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -129,31 +160,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_df_md_sat.html b/v0.3.10/reference/h_df_md_sat.html index 9242b6618..d51b669d5 100644 --- a/v0.3.10/reference/h_df_md_sat.html +++ b/v0.3.10/reference/h_df_md_sat.html @@ -1,5 +1,25 @@ - -Calculation of Satterthwaite Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_sat • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_sat(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -129,31 +160,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_df_min_bw.html b/v0.3.10/reference/h_df_min_bw.html index d01197106..dd45409dc 100644 --- a/v0.3.10/reference/h_df_min_bw.html +++ b/v0.3.10/reference/h_df_min_bw.html @@ -1,5 +1,25 @@ - -Assign Minimum Degrees of Freedom Given Involved Coefficients — h_df_min_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_df_min_bw(bw_calc, is_coef_involved)
    -

    Arguments

    -
    bw_calc
    +

    Arguments +

    +
    +
    bw_calc

    (list)
    from h_df_bw_calc().

    @@ -127,9 +158,11 @@

    Arguments -

    Value

    +

    Value +

    The minimum of the degrees of freedom assigned to each involved @@ -137,22 +170,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_df_to_tibble.html b/v0.3.10/reference/h_df_to_tibble.html index 45e928160..c5f881367 100644 --- a/v0.3.10/reference/h_df_to_tibble.html +++ b/v0.3.10/reference/h_df_to_tibble.html @@ -1,5 +1,25 @@ - -Coerce a Data Frame to a tibble — h_df_to_tibble • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -113,24 +142,30 @@
    -

    Usage

    +

    Usage +

    h_df_to_tibble(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (data.frame)
    what to coerce.

    -
    + +
    -

    Value

    +

    Value +

    The data as a tibble, potentially with a .rownames column.

    -

    Details

    +

    Details +

    This is only a thin wrapper around tibble::as_tibble(), except giving a useful error message and it checks for rownames and adds them as a new column .rownames if they are not just a numeric sequence as @@ -138,22 +173,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.10/reference/h_drop_covariance_terms.html b/v0.3.10/reference/h_drop_covariance_terms.html index 7057288da..80b1fca0e 100644 --- a/v0.3.10/reference/h_drop_covariance_terms.html +++ b/v0.3.10/reference/h_drop_covariance_terms.html @@ -1,5 +1,25 @@ - -Drop Formula Terms used for Covariance Structure Definition — h_drop_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,46 +141,56 @@
    -

    Usage

    +

    Usage +

    h_drop_covariance_terms(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula from which covariance terms should be dropped.

    -
    + +
    -

    Value

    +

    Value +

    The formula without accepted covariance terms.

    -

    Details

    +

    Details +

    terms is used and it will preserve the environment attribute. This ensures the returned formula and the input formula have the same environment.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_extract_covariance_terms.html b/v0.3.10/reference/h_extract_covariance_terms.html index 8f40e0edc..af6880658 100644 --- a/v0.3.10/reference/h_extract_covariance_terms.html +++ b/v0.3.10/reference/h_extract_covariance_terms.html @@ -1,5 +1,25 @@ - -Extract Formula Terms used for Covariance Structure Definition — h_extract_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,41 +141,50 @@
    -

    Usage

    +

    Usage +

    h_extract_covariance_terms(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula from which covariance terms should be extracted.

    -
    + +
    -

    Value

    +

    Value +

    A list of covariance structure expressions found in f.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_factor_ref.html b/v0.3.10/reference/h_factor_ref.html index 5d341b814..f2bf29100 100644 --- a/v0.3.10/reference/h_factor_ref.html +++ b/v0.3.10/reference/h_factor_ref.html @@ -1,5 +1,25 @@ - -Convert Character to Factor Following Reference — h_factor_ref • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_factor_ref(x, ref, var_name = vname(x))
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character or factor)
    input.

    @@ -130,31 +161,37 @@

    Arguments -

    Details

    +

    Details +

    Use ref to convert x into factor with the same levels. This is needed even if x and ref are both character because in model.matrix if x only has one level there could be errors.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_get_contrast.html b/v0.3.10/reference/h_get_contrast.html index cf82fc6fb..a7c383da3 100644 --- a/v0.3.10/reference/h_get_contrast.html +++ b/v0.3.10/reference/h_get_contrast.html @@ -1,5 +1,25 @@ - -Obtain Contrast for Specified Effect — h_get_contrast • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    h_get_contrast(
       object,
       effect,
    @@ -123,8 +152,10 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the fitted MMRM.

    @@ -139,31 +170,37 @@

    Arguments -

    Value

    +

    Value +

    A matrix of the contrast.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_get_cov_default.html b/v0.3.10/reference/h_get_cov_default.html index 4738e45b7..a4ab746fa 100644 --- a/v0.3.10/reference/h_get_cov_default.html +++ b/v0.3.10/reference/h_get_cov_default.html @@ -1,7 +1,27 @@ - -Obtain Default Covariance Method — h_get_cov_default • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,20 +144,25 @@
    -

    Usage

    +

    Usage +

    h_get_cov_default(
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within")
     )
    -

    Arguments

    -
    method
    +

    Arguments +

    +
    +
    method

    (string)
    degrees of freedom method.

    -
    + +
    -

    Details

    +

    Details +

    The default covariance method is different for different degrees of freedom method. For "Satterthwaite" or "Between-Within", "Asymptotic" is returned. For "Kenward-Roger" only, "Kenward-Roger" is returned. @@ -137,22 +170,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.10/reference/h_get_empirical.html b/v0.3.10/reference/h_get_empirical.html index da1f1bafe..262465090 100644 --- a/v0.3.10/reference/h_get_empirical.html +++ b/v0.3.10/reference/h_get_empirical.html @@ -1,9 +1,29 @@ - -Obtain Empirical/Jackknife/Bias-Reduced Covariance — h_get_empirical • mmrm +Obtain Empirical/Jackknife/Bias-Reduced Covariance — h_get_empirical • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -119,13 +147,16 @@
    -

    Usage

    +

    Usage +

    h_get_empirical(tmb_data, theta, beta, beta_vcov, type)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    @@ -145,32 +176,41 @@

    Arguments -

    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • cov: matrix empirical covariance.

    • +

      Named list with elements:

      +
        +
      • cov: matrix empirical covariance.

      • df_mat: matrix to calculate Satterthwaite degree of freedom.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_get_kr_comp.html b/v0.3.10/reference/h_get_kr_comp.html index 01bcd1c09..17845557e 100644 --- a/v0.3.10/reference/h_get_kr_comp.html +++ b/v0.3.10/reference/h_get_kr_comp.html @@ -1,7 +1,27 @@ - -Obtain Kenward-Roger Adjustment Components — h_get_kr_comp • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,30 +144,39 @@
    -

    Usage

    +

    Usage +

    h_get_kr_comp(tmb_data, theta)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    theta

    (numeric)
    theta estimate.

    -
    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • P: matrix of \(P\) component.

    • +

      Named list with elements:

      +
        +
      • P: matrix of \(P\) component.

      • Q: matrix of \(Q\) component.

      • R: matrix of \(R\) component.

      • -
    + +
    -

    Details

    +

    Details +

    the function returns a named list, \(P\), \(Q\) and \(R\), which corresponds to the paper in 1997. The matrices are stacked in columns so that \(P\), \(Q\) and \(R\) has the same column number(number of beta parameters). The number of rows, is dependent on @@ -151,22 +188,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.10/reference/h_get_optimizers.html b/v0.3.10/reference/h_get_optimizers.html index d76d4f92e..dc283f585 100644 --- a/v0.3.10/reference/h_get_optimizers.html +++ b/v0.3.10/reference/h_get_optimizers.html @@ -1,5 +1,25 @@ - -Obtain Optimizer according to Optimizer String Value — h_get_optimizers • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    h_get_optimizers(
       optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"),
       optimizer_fun = h_optimizer_fun(optimizer),
    @@ -123,8 +152,10 @@ 

    Usage

    -

    Arguments

    -
    optimizer
    +

    Arguments +

    +
    +
    optimizer

    (character)
    names of built-in optimizers to try, subset of "L-BFGS-B", "BFGS", "CG" and "nlminb".

    @@ -141,46 +172,59 @@

    Arguments -

    Value

    +

    Value +

    Named list of optimizers created by h_partial_fun_args().

    -

    Details

    -

    If you want to use only the built-in optimizers:

    • optimizer is a shortcut to create a list of built-in optimizer functions +

      Details +

      +

      If you want to use only the built-in optimizers:

      +
        +
      • optimizer is a shortcut to create a list of built-in optimizer functions passed to optimizer_fun.

      • Allowed are "L-BFGS-B", "BFGS", "CG" (using stats::optim() with corresponding method) and "nlminb" (using stats::nlminb()).

      • Other arguments should go into optimizer_args.

      • -

      If you want to use your own optimizer function:

      • Make sure that there are three arguments: parameter (start value), objective function +

      +

      If you want to use your own optimizer function:

      +
        +
      • Make sure that there are three arguments: parameter (start value), objective function and gradient function are sequentially in the function arguments.

      • If there are other named arguments in front of these, make sure they are correctly specified through optimizer_args.

      • If the hessian can be used, please make sure its argument name is hessian and please add attribute use_hessian = TRUE to the function, using attr(fun, "use_hessian) <- TRUE.

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_get_prediction.html b/v0.3.10/reference/h_get_prediction.html index ed0586b24..814d19ebd 100644 --- a/v0.3.10/reference/h_get_prediction.html +++ b/v0.3.10/reference/h_get_prediction.html @@ -1,5 +1,25 @@ - -Get Prediction — h_get_prediction • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_get_prediction(tmb_data, theta, beta, beta_vcov)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    object.

    @@ -134,37 +165,47 @@

    Arguments -

    Value

    +

    Value +

    -

    List with:

    • prediction: Matrix with columns fit, conf_var, and var.

    • +

      List with:

      +
        +
      • prediction: Matrix with columns fit, conf_var, and var.

      • covariance: List with subject specific covariance matrices.

      • index: List of zero-based subject indices.

      • -
    + +
    -

    Details

    +

    Details +

    See predict function in predict.cpp which is called internally.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_get_prediction_variance.html b/v0.3.10/reference/h_get_prediction_variance.html index c1661d4b8..a3c947ba7 100644 --- a/v0.3.10/reference/h_get_prediction_variance.html +++ b/v0.3.10/reference/h_get_prediction_variance.html @@ -1,5 +1,25 @@ - -Get Prediction Variance — h_get_prediction_variance • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_get_prediction_variance(object, nsim, tmb_data)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    @@ -130,25 +161,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.10/reference/h_get_sim_per_subj.html b/v0.3.10/reference/h_get_sim_per_subj.html index 81be55a42..552d3d751 100644 --- a/v0.3.10/reference/h_get_sim_per_subj.html +++ b/v0.3.10/reference/h_get_sim_per_subj.html @@ -1,5 +1,25 @@ - -Get simulated values by patient. — h_get_sim_per_subj • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_get_sim_per_subj(predict_res, nsub, nsim)
    -

    Arguments

    -
    predict_res
    +

    Arguments +

    +
    +
    predict_res

    (list)
    from h_get_prediction().

    @@ -130,25 +161,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.10/reference/h_get_theta_from_cov.html b/v0.3.10/reference/h_get_theta_from_cov.html index ab786e711..ba629ad8b 100644 --- a/v0.3.10/reference/h_get_theta_from_cov.html +++ b/v0.3.10/reference/h_get_theta_from_cov.html @@ -1,5 +1,25 @@ - -Obtain Theta from Covariance Matrix — h_get_theta_from_cov • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,39 +141,48 @@
    -

    Usage

    +

    Usage +

    h_get_theta_from_cov(covariance)
    -

    Arguments

    -
    covariance
    +

    Arguments +

    +
    +
    covariance

    (matrix) of covariance matrix values.

    -
    + +
    -

    Details

    +

    Details +

    If the covariance matrix has NA in some of the elements, they will be replaced by 0 (non-diagonal) and 1 (diagonal). This ensures that the matrix is positive definite.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_gradient.html b/v0.3.10/reference/h_gradient.html index 8d89bc03f..9492fedc2 100644 --- a/v0.3.10/reference/h_gradient.html +++ b/v0.3.10/reference/h_gradient.html @@ -1,7 +1,27 @@ - -Computation of a Gradient Given Jacobian and Contrast Vector — h_gradient • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,13 +144,16 @@
    -

    Usage

    +

    Usage +

    h_gradient(jac_list, contrast)
    -

    Arguments

    -
    jac_list
    +

    Arguments +

    +
    +
    jac_list

    (list)
    Jacobian list produced e.g. by h_jac_list().

    @@ -131,9 +162,11 @@

    Arguments -

    Value

    +

    Value +

    Numeric vector which contains the quadratic forms of each element of @@ -141,22 +174,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_jac_list.html b/v0.3.10/reference/h_jac_list.html index 473057d83..14e2f53b3 100644 --- a/v0.3.10/reference/h_jac_list.html +++ b/v0.3.10/reference/h_jac_list.html @@ -1,5 +1,25 @@ - -Obtain List of Jacobian Matrix Entries for Covariance Matrix — h_jac_list • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_jac_list(tmb_data, theta_est, beta_vcov)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    @@ -130,9 +161,11 @@

    Arguments -

    Value

    +

    Value +

    List with one element per variance parameter containing a matrix @@ -141,22 +174,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_kr_df.html b/v0.3.10/reference/h_kr_df.html index 21e45feb7..98c916c47 100644 --- a/v0.3.10/reference/h_kr_df.html +++ b/v0.3.10/reference/h_kr_df.html @@ -1,7 +1,27 @@ - -Obtain the Adjusted Kenward-Roger degrees of freedom — h_kr_df • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,13 +144,16 @@
    -

    Usage

    +

    Usage +

    h_kr_df(v0, l, w, p)
    -

    Arguments

    -
    v0
    +

    Arguments +

    +
    +
    v0

    (matrix)
    unadjusted covariance matrix.

    @@ -137,32 +168,41 @@

    Argumentsh_get_kr_comp().

    -

    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • m: numeric degrees of freedom.

    • +

      Named list with elements:

      +
        +
      • m: numeric degrees of freedom.

      • lambda: numeric F statistic scale parameter.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_md_denom_df.html b/v0.3.10/reference/h_md_denom_df.html index c4e1a41e2..e46f36aa0 100644 --- a/v0.3.10/reference/h_md_denom_df.html +++ b/v0.3.10/reference/h_md_denom_df.html @@ -1,5 +1,25 @@ - -Calculating Denominator Degrees of Freedom for the Multi-Dimensional Case — h_md_denom_df • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,47 +141,57 @@
    -

    Usage

    +

    Usage +

    h_md_denom_df(t_stat_df)
    -

    Arguments

    -
    t_stat_df
    +

    Arguments +

    +
    +
    t_stat_df

    (numeric)
    n t-statistic derived degrees of freedom.

    -
    + +
    -

    Value

    +

    Value +

    Usually the calculation is returning 2 * E / (E - n) where E is the sum of t / (t - 2) over all t_stat_df values t.

    -

    Note

    +

    Note +

    If the input values are two similar to each other then just the average of them is returned. If any of the inputs is not larger than 2 then 2 is returned.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_mmrm_tmb_assert_start.html b/v0.3.10/reference/h_mmrm_tmb_assert_start.html index 4389ea848..17b785a27 100644 --- a/v0.3.10/reference/h_mmrm_tmb_assert_start.html +++ b/v0.3.10/reference/h_mmrm_tmb_assert_start.html @@ -1,5 +1,25 @@ - -Asserting Sane Start Values for TMB Fit — h_mmrm_tmb_assert_start • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,40 +141,49 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_assert_start(tmb_object)
    -

    Arguments

    -
    tmb_object
    +

    Arguments +

    +
    +
    tmb_object

    (list)
    created with TMB::MakeADFun().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used for assertions.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_mmrm_tmb_check_conv.html b/v0.3.10/reference/h_mmrm_tmb_check_conv.html index ba9dcb039..0ed95bd76 100644 --- a/v0.3.10/reference/h_mmrm_tmb_check_conv.html +++ b/v0.3.10/reference/h_mmrm_tmb_check_conv.html @@ -1,5 +1,25 @@ - -Checking the TMB Optimization Result — h_mmrm_tmb_check_conv • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,22 +141,27 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_check_conv(tmb_opt, mmrm_tmb)
    -

    Arguments

    -
    tmb_opt
    +

    Arguments +

    +
    +
    tmb_opt

    (list)
    optimization result.

    mmrm_tmb

    (mmrm_tmb)
    result from h_mmrm_tmb_fit().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used to generate warnings in case that the model @@ -136,22 +169,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_mmrm_tmb_data.html b/v0.3.10/reference/h_mmrm_tmb_data.html index 82753cf5e..b5f3ace87 100644 --- a/v0.3.10/reference/h_mmrm_tmb_data.html +++ b/v0.3.10/reference/h_mmrm_tmb_data.html @@ -1,5 +1,25 @@ - -Data for TMB Fit — h_mmrm_tmb_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_data(
       formula_parts,
       data,
    @@ -127,8 +156,10 @@ 

    Usage

    -

    Arguments

    -
    formula_parts
    +

    Arguments +

    +
    +
    formula_parts

    (mmrm_tmb_formula_parts)
    list with formula parts from h_mmrm_tmb_formula_parts().

    @@ -162,12 +193,16 @@

    Arguments -

    Value

    +

    Value +

    -

    List of class mmrm_tmb_data with elements:

    • full_frame: data.frame with n rows containing all variables needed in the model.

    • +

      List of class mmrm_tmb_data with elements:

      +
        +
      • full_frame: data.frame with n rows containing all variables needed in the model.

      • data: data.frame of input dataset.

      • x_matrix: matrix with n rows and p columns specifying the overall design matrix.

      • x_cols_aliased: logical with potentially more than p elements indicating which @@ -187,9 +222,11 @@

        Value

        reml: int specifying whether REML estimation is used (1), otherwise ML (0).

      • subject_groups: factor specifying the grouping for each subject.

      • n_groups: int with the number of total groups

      • -
    + +
    -

    Details

    +

    Details +

    Note that the subject_var must not be factor but can also be character. If it is character, then it will be converted to factor internally. Here the levels will be the unique values, sorted alphabetically and numerically if there @@ -198,22 +235,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.10/reference/h_mmrm_tmb_extract_cov.html b/v0.3.10/reference/h_mmrm_tmb_extract_cov.html index d525a463b..44e9f144b 100644 --- a/v0.3.10/reference/h_mmrm_tmb_extract_cov.html +++ b/v0.3.10/reference/h_mmrm_tmb_extract_cov.html @@ -1,7 +1,27 @@ - -Extract covariance matrix from TMB report and input data — h_mmrm_tmb_extract_cov • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,13 +144,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_extract_cov(tmb_report, tmb_data, visit_var, is_spatial)
    -

    Arguments

    -
    tmb_report
    +

    Arguments +

    +
    +
    tmb_report

    (list)
    report created with TMB::MakeADFun() report function.

    @@ -137,9 +168,11 @@

    Arguments -

    Value

    +

    Value +

    Return a simple covariance matrix if there is no grouping, or a named @@ -148,22 +181,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_mmrm_tmb_fit.html b/v0.3.10/reference/h_mmrm_tmb_fit.html index dac6c8f19..cd1489ede 100644 --- a/v0.3.10/reference/h_mmrm_tmb_fit.html +++ b/v0.3.10/reference/h_mmrm_tmb_fit.html @@ -1,7 +1,27 @@ - -Build TMB Fit Result List — h_mmrm_tmb_fit • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,13 +144,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_fit(tmb_object, tmb_opt, formula_parts, tmb_data)
    -

    Arguments

    -
    tmb_object
    +

    Arguments +

    +
    +
    tmb_object

    (list)
    created with TMB::MakeADFun().

    @@ -138,12 +169,16 @@

    Argumentsh_mmrm_tmb_data().

    -

    + +
    -

    Value

    +

    Value +

    -

    List of class mmrm_tmb with:

    • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

    • +

      List of class mmrm_tmb with:

      +
        +
      • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

      • beta_est: vector of coefficient estimates.

      • beta_vcov: Variance-covariance matrix for coefficient estimates.

      • beta_vcov_inv_L: Lower triangular matrix L of the inverse variance-covariance matrix decomposition.

      • @@ -158,31 +193,37 @@

        Value

        opt_details: list with optimization details including convergence code.

      • tmb_object: original TMB object created with TMB::MakeADFun().

      • tmb_data: input.

      • -
    + +
    -

    Details

    +

    Details +

    Instead of inverting or decomposing beta_vcov, it can be more efficient to use its robust Cholesky decomposition LDL^T, therefore we return the corresponding two components L and D as well since they have been available on the C++ side already.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_mmrm_tmb_formula_parts.html b/v0.3.10/reference/h_mmrm_tmb_formula_parts.html index 7db8bbbcb..2712adaac 100644 --- a/v0.3.10/reference/h_mmrm_tmb_formula_parts.html +++ b/v0.3.10/reference/h_mmrm_tmb_formula_parts.html @@ -1,5 +1,25 @@ - -Processing the Formula for TMB Fit — h_mmrm_tmb_formula_parts • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_formula_parts(
       formula,
       covariance = as.cov_struct(formula, warn_partial = FALSE)
    @@ -121,8 +150,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    Original formula.

    @@ -130,12 +161,16 @@

    Arguments -

    Value

    +

    Value +

    -

    List of class mmrm_tmb_formula_parts with elements:

    • formula: the original input.

    • +

      List of class mmrm_tmb_formula_parts with elements:

      +
        +
      • formula: the original input.

      • model_formula: formula with the covariance term is removed.

      • model_formula: formula with the covariance term removed.

      • full_formula: same as model_formula but includes the covariance @@ -147,25 +182,30 @@

        Value

        subject_var: string with the subject variable name.

      • group_var: string with the group variable name. If no group specified, this element is NULL.

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_mmrm_tmb_parameters.html b/v0.3.10/reference/h_mmrm_tmb_parameters.html index 2a7f10f6e..744d99b46 100644 --- a/v0.3.10/reference/h_mmrm_tmb_parameters.html +++ b/v0.3.10/reference/h_mmrm_tmb_parameters.html @@ -1,5 +1,25 @@ - -Start Parameters for TMB Fit — h_mmrm_tmb_parameters • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_parameters(formula_parts, tmb_data, start, n_groups = 1L)
    -

    Arguments

    -
    formula_parts
    +

    Arguments +

    +
    +
    formula_parts

    (mmrm_tmb_formula_parts)
    produced by h_mmrm_tmb_formula_parts().

    @@ -136,9 +167,11 @@

    Arguments -

    Value

    +

    Value +

    List with element theta containing the start values for the variance @@ -146,22 +179,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_newdata_add_pred.html b/v0.3.10/reference/h_newdata_add_pred.html index 563c60d62..5d0756d5b 100644 --- a/v0.3.10/reference/h_newdata_add_pred.html +++ b/v0.3.10/reference/h_newdata_add_pred.html @@ -1,5 +1,25 @@ - -Add Prediction Results to New Data — h_newdata_add_pred • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_newdata_add_pred(x, newdata, se_fit, interval, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fit.

    @@ -139,9 +170,11 @@

    Argumentspredict.mmrm_tmb().

    -

    + +
    -

    Value

    +

    Value +

    The newdata as a tibble with additional columns .fitted, @@ -152,22 +185,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_optimizer_fun.html b/v0.3.10/reference/h_optimizer_fun.html index b4f7a02e8..cf417cb88 100644 --- a/v0.3.10/reference/h_optimizer_fun.html +++ b/v0.3.10/reference/h_optimizer_fun.html @@ -1,5 +1,25 @@ - -Obtain Optimizer Function with Character — h_optimizer_fun • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,40 +141,49 @@
    -

    Usage

    +

    Usage +

    h_optimizer_fun(optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"))
    -

    Arguments

    -
    optimizer
    +

    Arguments +

    +
    +
    optimizer

    (character)
    vector of optimizers.

    -
    + +
    -

    Value

    +

    Value +

    A (list)
    of optimizer functions generated from h_partial_fun_args().

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_partial_fun_args.html b/v0.3.10/reference/h_partial_fun_args.html index f6a989498..84baee259 100644 --- a/v0.3.10/reference/h_partial_fun_args.html +++ b/v0.3.10/reference/h_partial_fun_args.html @@ -1,5 +1,25 @@ - -Create Partial Functions — h_partial_fun_args • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_partial_fun_args(fun, ..., additional_attr = list())
    -

    Arguments

    -
    fun
    +

    Arguments +

    +
    +
    fun

    (function)
    to be wrapped.

    @@ -130,16 +161,19 @@

    Arguments -

    Value

    +

    Value +

    Object with S3 class "partial", a function with args attribute (and possibly more attributes from additional_attr).

    -

    Details

    +

    Details +

    This function add args attribute to the original function, and add an extra class partial to the function. args is the argument for the function, and elements in ... will override the existing @@ -147,22 +181,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.10/reference/h_print_aic_list.html b/v0.3.10/reference/h_print_aic_list.html index ec8e26157..b325e83ac 100644 --- a/v0.3.10/reference/h_print_aic_list.html +++ b/v0.3.10/reference/h_print_aic_list.html @@ -1,5 +1,25 @@ - -Printing AIC and other Model Fit Criteria — h_print_aic_list • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,38 +141,46 @@
    -

    Usage

    +

    Usage +

    h_print_aic_list(aic_list, digits = 1)
    -

    Arguments

    -
    aic_list
    +

    Arguments +

    +
    +
    aic_list

    (list)
    list as part of from summary.mmrm().

    digits

    (number)
    number of decimal places used with round().

    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_print_call.html b/v0.3.10/reference/h_print_call.html index 41e711087..2ea04b16d 100644 --- a/v0.3.10/reference/h_print_call.html +++ b/v0.3.10/reference/h_print_call.html @@ -1,5 +1,25 @@ - -Printing MMRM Function Call — h_print_call • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_print_call(call, n_obs, n_subjects, n_timepoints)
    -

    Arguments

    -
    call
    +

    Arguments +

    +
    +
    call

    (call)
    original mmrm() function call.

    @@ -134,25 +165,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.10/reference/h_print_cov.html b/v0.3.10/reference/h_print_cov.html index 965d25cb9..5fd0cede4 100644 --- a/v0.3.10/reference/h_print_cov.html +++ b/v0.3.10/reference/h_print_cov.html @@ -1,5 +1,25 @@ - -Printing MMRM Covariance Type — h_print_cov • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_print_cov(cov_type, n_theta, n_groups)
    -

    Arguments

    -
    cov_type
    +

    Arguments +

    +
    +
    cov_type

    (string)
    covariance structure abbreviation.

    @@ -130,25 +161,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.10/reference/h_quad_form.html b/v0.3.10/reference/h_quad_form.html index fe01e823b..546b7cad7 100644 --- a/v0.3.10/reference/h_quad_form.html +++ b/v0.3.10/reference/h_quad_form.html @@ -1,7 +1,27 @@ - -Quadratic Form Calculations — h_quad_form • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,15 +144,18 @@
    -

    Usage

    +

    Usage +

    h_quad_form_vec(vec, center)
     
     h_quad_form_mat(mat, center)
    -

    Arguments

    -
    vec
    +

    Arguments +

    +
    +
    vec

    (numeric)
    interpreted as a row vector.

    @@ -138,34 +169,42 @@

    Arguments -

    Functions

    +

    Functions +

    -
    • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) +

        +
      • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) as a numeric (not a matrix).

      • h_quad_form_mat(): calculates the quadratic form mat %*% center %*% t(mat) as a matrix, the result is square and has dimensions identical to the number of rows in mat.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_reconcile_cov_struct.html b/v0.3.10/reference/h_reconcile_cov_struct.html index 65a60c5e2..c4bda0d3c 100644 --- a/v0.3.10/reference/h_reconcile_cov_struct.html +++ b/v0.3.10/reference/h_reconcile_cov_struct.html @@ -1,5 +1,25 @@ - -Reconcile Possible Covariance Structure Inputs — h_reconcile_cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_reconcile_cov_struct(formula = NULL, covariance = NULL)
    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -129,9 +160,11 @@

    Argumentsas.cov_struct(). If no value is provided, a structure is derived from the provided formula.

    -

    + +
    -

    Value

    +

    Value +

    The value covariance if it's provided or a covariance structure @@ -140,22 +173,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_record_all_output.html b/v0.3.10/reference/h_record_all_output.html index c51a205f7..5a37079eb 100644 --- a/v0.3.10/reference/h_record_all_output.html +++ b/v0.3.10/reference/h_record_all_output.html @@ -1,9 +1,29 @@ - - + + + + + +Capture all Output — h_record_all_output • mmrm +Capture all Output — h_record_all_output • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -119,13 +147,16 @@
    -

    Usage

    +

    Usage +

    h_record_all_output(expr, remove = list(), divergence = list())
    -

    Arguments

    -
    expr
    +

    Arguments +

    +
    +
    expr

    (expression)
    to be executed.

    @@ -140,35 +171,44 @@

    Arguments -

    Value

    +

    Value +

    -

    A list containing

    • result: The object returned by expr or list() if an error was thrown.

    • +

      A list containing

      +
        +
      • result: The object returned by expr or list() if an error was thrown.

      • warnings: NULL or a character vector if warnings were thrown.

      • errors: NULL or a string if an error was thrown.

      • messages: NULL or a character vector if messages were produced.

      • divergence: NULL or a character vector if divergence messages were caught.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_register_s3.html b/v0.3.10/reference/h_register_s3.html index 28390de0f..1972a9fb9 100644 --- a/v0.3.10/reference/h_register_s3.html +++ b/v0.3.10/reference/h_register_s3.html @@ -1,9 +1,29 @@ - -Register S3 Method -Register S3 method to a generic. — h_register_s3 • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -119,13 +147,16 @@
    -

    Usage

    +

    Usage +

    h_register_s3(pkg, generic, class, envir = parent.frame())
    -

    Arguments

    -
    pkg
    +

    Arguments +

    +
    +
    pkg

    (string) name of the package name.

    @@ -140,29 +171,35 @@

    Arguments -

    Details

    +

    Details +

    This function is adapted from emmeans:::register_s3_method().

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_residuals_normalized.html b/v0.3.10/reference/h_residuals_normalized.html index 00f086f0f..539e1efe2 100644 --- a/v0.3.10/reference/h_residuals_normalized.html +++ b/v0.3.10/reference/h_residuals_normalized.html @@ -1,5 +1,25 @@ - -Calculate normalized residuals — h_residuals_normalized • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,40 +141,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_normalized(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_residuals_pearson.html b/v0.3.10/reference/h_residuals_pearson.html index 8f60058bf..909002b72 100644 --- a/v0.3.10/reference/h_residuals_pearson.html +++ b/v0.3.10/reference/h_residuals_pearson.html @@ -1,5 +1,25 @@ - -Calculate Pearson Residuals — h_residuals_pearson • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,40 +141,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_pearson(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_residuals_response.html b/v0.3.10/reference/h_residuals_response.html index 8fdf6e2c6..7db797279 100644 --- a/v0.3.10/reference/h_residuals_response.html +++ b/v0.3.10/reference/h_residuals_response.html @@ -1,5 +1,25 @@ - -Calculate response residuals. — h_residuals_response • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,40 +141,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_response(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_split_control.html b/v0.3.10/reference/h_split_control.html index ae783f6ac..8ba809e7d 100644 --- a/v0.3.10/reference/h_split_control.html +++ b/v0.3.10/reference/h_split_control.html @@ -1,7 +1,27 @@ - -Split Control List — h_split_control • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,44 +144,53 @@
    -

    Usage

    +

    Usage +

    h_split_control(control, ...)
    -

    Arguments

    -
    control
    +

    Arguments +

    +
    +
    control

    (mmrm_control)
    object.

    ...

    additional parameters to update the control object.

    -
    + +
    -

    Value

    +

    Value +

    A list of mmrm_control entries.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_summarize_all_fits.html b/v0.3.10/reference/h_summarize_all_fits.html index c418b8028..9620bc380 100644 --- a/v0.3.10/reference/h_summarize_all_fits.html +++ b/v0.3.10/reference/h_summarize_all_fits.html @@ -1,5 +1,25 @@ - -Summarizing List of Fits — h_summarize_all_fits • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,40 +141,49 @@
    -

    Usage

    +

    Usage +

    h_summarize_all_fits(all_fits)
    -

    Arguments

    -
    all_fits
    +

    Arguments +

    +
    +
    all_fits

    (list of mmrm_fit or try-error)
    list of fits.

    -
    + +
    -

    Value

    +

    Value +

    List with warnings, messages, log_liks and converged results.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_tbl_confint_terms.html b/v0.3.10/reference/h_tbl_confint_terms.html index 6cfca47c9..835e326ad 100644 --- a/v0.3.10/reference/h_tbl_confint_terms.html +++ b/v0.3.10/reference/h_tbl_confint_terms.html @@ -1,5 +1,25 @@ - -Extract tibble with Confidence Intervals and Term Names — h_tbl_confint_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,44 +141,53 @@
    -

    Usage

    +

    Usage +

    h_tbl_confint_terms(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fit object.

    ...

    passed to stats::confint(), hence not used at the moment.

    -
    + +
    -

    Value

    +

    Value +

    A tibble with term, conf.low, conf.high columns.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_test_1d.html b/v0.3.10/reference/h_test_1d.html index a32f26185..6a45e1a76 100644 --- a/v0.3.10/reference/h_test_1d.html +++ b/v0.3.10/reference/h_test_1d.html @@ -1,7 +1,27 @@ - -Creating T-Statistic Test Results For One-Dimensional Contrast — h_test_1d • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,13 +144,16 @@
    -

    Usage

    +

    Usage +

    h_test_1d(object, contrast, df)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -135,31 +166,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val (2-sided p-value).

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_test_md.html b/v0.3.10/reference/h_test_md.html index 1bff90bbc..70964be3d 100644 --- a/v0.3.10/reference/h_test_md.html +++ b/v0.3.10/reference/h_test_md.html @@ -1,7 +1,27 @@ - -Creating F-Statistic Test Results For Multi-Dimensional Contrast — h_test_md • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,13 +144,16 @@
    -

    Usage

    +

    Usage +

    h_test_md(object, contrast, df, f_stat_factor = 1)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -137,31 +168,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_tr.html b/v0.3.10/reference/h_tr.html index a45fc8596..22de1613a 100644 --- a/v0.3.10/reference/h_tr.html +++ b/v0.3.10/reference/h_tr.html @@ -1,5 +1,25 @@ - -Trace of a Matrix — h_tr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,40 +141,49 @@
    -

    Usage

    +

    Usage +

    h_tr(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (matrix)
    square matrix input.

    -
    + +
    -

    Value

    +

    Value +

    The trace of the square matrix.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_valid_formula.html b/v0.3.10/reference/h_valid_formula.html index c76271901..277ba37ad 100644 --- a/v0.3.10/reference/h_valid_formula.html +++ b/v0.3.10/reference/h_valid_formula.html @@ -1,5 +1,25 @@ - -Validate mmrm Formula — h_valid_formula • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,39 +141,48 @@
    -

    Usage

    +

    Usage +

    h_valid_formula(formula)
    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    to check.

    -
    + +
    -

    Details

    +

    Details +

    In mmrm models, . is not allowed as it introduces ambiguity of covariates to be used, so it is not allowed to be in formula.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_var_adj.html b/v0.3.10/reference/h_var_adj.html index c21f6a5e8..92df163a4 100644 --- a/v0.3.10/reference/h_var_adj.html +++ b/v0.3.10/reference/h_var_adj.html @@ -1,9 +1,29 @@ - -Obtain the Adjusted Covariance Matrix — h_var_adj • mmrm +Obtain the Adjusted Covariance Matrix — h_var_adj • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -119,13 +147,16 @@
    -

    Usage

    +

    Usage +

    h_var_adj(v, w, p, q, r, linear = FALSE)
    -

    Arguments

    -
    v
    +

    Arguments +

    +
    +
    v

    (matrix)
    unadjusted covariance matrix.

    @@ -148,31 +179,37 @@

    Arguments -

    Value

    +

    Value +

    The matrix of adjusted covariance matrix.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_warn_na_action.html b/v0.3.10/reference/h_warn_na_action.html index 12800159f..10e048d68 100644 --- a/v0.3.10/reference/h_warn_na_action.html +++ b/v0.3.10/reference/h_warn_na_action.html @@ -1,5 +1,25 @@ - -Warn on na.action — h_warn_na_action • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,27 +141,32 @@
    -

    Usage

    +

    Usage +

    h_warn_na_action()
    - + +
    -
    + + - - + + diff --git a/v0.3.10/reference/h_within_or_between.html b/v0.3.10/reference/h_within_or_between.html index bfa39c945..7831494b0 100644 --- a/v0.3.10/reference/h_within_or_between.html +++ b/v0.3.10/reference/h_within_or_between.html @@ -1,7 +1,27 @@ - -Determine Within or Between for each Design Matrix Column — h_within_or_between • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,22 +144,27 @@
    -

    Usage

    +

    Usage +

    h_within_or_between(x_matrix, subject_ids)
    -

    Arguments

    -
    x_matrix
    +

    Arguments +

    +
    +
    x_matrix

    (matrix)
    the design matrix with column names.

    subject_ids

    (factor)
    the subject IDs.

    -
    + +
    -

    Value

    +

    Value +

    Character vector with "intercept", "within" or "between" for each @@ -139,22 +172,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/index.html b/v0.3.10/reference/index.html index ac433c374..13ae0c417 100644 --- a/v0.3.10/reference/index.html +++ b/v0.3.10/reference/index.html @@ -1,5 +1,23 @@ - -Function reference • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +44,8 @@ + - + + - + @@ -107,210 +133,280 @@
    -

    Package

    +

    Package +

    -
    +
    +
    -
    +
    +
    mmrm-package
    -
    mmrm Package
    -
    -

    Functions

    +
    +mmrm Package
    + +
    +
    +

    Functions +

    -
    +
    +
    -
    +
    +
    mmrm()
    Fit an MMRM
    -
    +
    +
    +
    fit_mmrm()
    Low-Level Fitting Function for MMRM
    -
    +
    +
    +
    mmrm_control()
    Control Parameters for Fitting an MMRM
    -
    +
    +
    +
    fit_single_optimizer()
    Fitting an MMRM with Single Optimizer
    -
    +
    +
    +
    refit_multiple_optimizers()
    Refitting MMRM with Multiple Optimizers
    -
    +
    +
    +
    df_1d()
    Calculation of Degrees of Freedom for One-Dimensional Contrast
    -
    +
    +
    +
    df_md()
    Calculation of Degrees of Freedom for Multi-Dimensional Contrast
    -
    +
    +
    +
    component()
    Component Access for mmrm_tmb Objects
    -
    -

    Start Values

    + +
    +
    +

    Start Values +

    -
    +
    +
    -
    +
    +
    std_start()
    Standard Starting Value
    -
    +
    +
    +
    emp_start()
    Empirical Starting Value
    -
    -

    Methods

    + +
    +
    +

    Methods +

    -
    +
    +
    -

    Covariance Structures

    + +
    +
    +

    Covariance Structures +

    -
    +
    +
    -
    +
    +
    cov_struct()
    Define a Covariance Structure
    -
    +
    +
    +
    as.cov_struct()
    Coerce into a Covariance Structure Definition
    -
    +
    +
    +
    format(<cov_struct>)
    Format Covariance Structure Object
    -
    +
    +
    +
    print(<cov_struct>)
    Print a Covariance Structure Object
    -
    +
    +
    +
    cov_types()
    Covariance Types
    -
    -

    Estimate Marginal Means

    + +
    +
    +

    Estimate Marginal Means +

    -
    +
    +
    -
    +
    +
    emmeans_support
    -
    Support for emmeans
    -
    -

    Datasets

    +
    Support for emmeans +
    + +
    +
    +

    Datasets +

    -
    +
    +
    -
    +
    +
    fev_data
    Example Data on FEV1
    -
    +
    +
    +
    bcva_data
    Example Data on BCVA
    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.10/reference/is_infix.html b/v0.3.10/reference/is_infix.html index 6a6e612d7..bd8af83e1 100644 --- a/v0.3.10/reference/is_infix.html +++ b/v0.3.10/reference/is_infix.html @@ -1,5 +1,25 @@ - -Test Whether a Symbol is an Infix Operator — is_infix • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,49 +141,62 @@
    -

    Usage

    +

    Usage +

    is_infix(name)
    -

    Arguments

    -
    name
    +

    Arguments +

    +
    +
    name

    (symbol or name or string)
    a possible reference to an infix operator to check.

    -
    + +
    -

    Value

    +

    Value +

    A logical indicating whether the name is the name of an infix operator.

    -

    is_infix(as.name("|"))
    +

    +
    +
    is_infix(as.name("|"))
     is_infix("|")
    -is_infix("c")

    +is_infix("c")
    +

    +
    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/mmrm-package.html b/v0.3.10/reference/mmrm-package.html index 09ba683fd..ec03b0188 100644 --- a/v0.3.10/reference/mmrm-package.html +++ b/v0.3.10/reference/mmrm-package.html @@ -1,5 +1,25 @@ - -mmrm Package — mmrm-package • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -114,15 +143,23 @@
    -

    See also

    -
    -

    Author

    +

    Author +

    Maintainer: Daniel Sabanes Bove daniel.sabanes_bove@roche.com

    -

    Authors:

    + +
    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/mmrm.html b/v0.3.10/reference/mmrm.html index 41ff7151b..710f3c91f 100644 --- a/v0.3.10/reference/mmrm.html +++ b/v0.3.10/reference/mmrm.html @@ -1,7 +1,27 @@ - -Fit an MMRM — mmrm • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,7 +144,8 @@
    -

    Usage

    +

    Usage +

    mmrm(
       formula,
       data,
    @@ -129,8 +158,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -163,15 +194,18 @@

    Argumentsmmrm_control().

    -

    + +
    -

    Value

    +

    Value +

    An mmrm object.

    -

    Details

    +

    Details +

    The formula typically looks like: FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID) so specifies response and covariates as usual, and exactly one special term @@ -197,15 +231,19 @@

    Detailsmmrm.

    -

    Note

    +

    Note +

    The mmrm object is also an mmrm_fit and an mmrm_tmb object, therefore corresponding methods also work (see mmrm_tmb_methods).

    -

    Additional contents depend on the choice of the adjustment method:

    • If Satterthwaite adjustment is used, the Jacobian information jac_list +

      Additional contents depend on the choice of the adjustment method:

      +
        +
      • If Satterthwaite adjustment is used, the Jacobian information jac_list is included.

      • If Kenward-Roger adjustment is used, kr_comp contains necessary components and beta_vcov_adj includes the adjusted coefficients covariance matrix.

      • -

      Use of the package emmeans is supported, see emmeans_support.

      +
    +

    Use of the package emmeans is supported, see emmeans_support.

    NA values are always omitted regardless of na.action setting.

    When the number of visit levels is large, it usually requires large memory to create the covariance matrix. By default, the maximum allowed visit levels is 100, and if there are more @@ -216,7 +254,8 @@

    Note

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -240,22 +279,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.10/reference/mmrm_control.html b/v0.3.10/reference/mmrm_control.html index efcf3f85e..469432674 100644 --- a/v0.3.10/reference/mmrm_control.html +++ b/v0.3.10/reference/mmrm_control.html @@ -1,9 +1,29 @@ - - + + + + + +Control Parameters for Fitting an MMRM — mmrm_control • mmrm +Control Parameters for Fitting an MMRM — mmrm_control • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -119,7 +147,8 @@
    -

    Usage

    +

    Usage +

    mmrm_control(
       n_cores = 1L,
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within"),
    @@ -133,8 +162,10 @@ 

    Usage

    -

    Arguments

    -
    n_cores
    +

    Arguments +

    +
    +
    n_cores

    (count)
    number of cores to be used.

    @@ -168,15 +199,18 @@

    Argumentsh_get_optimizers().

    -

    + +
    -

    Value

    +

    Value +

    List of class mmrm_control with the control parameters.

    -

    Details

    +

    Details +

    For example, if the data only has observations at visits VIS1, VIS3 and VIS4, by default they are treated to be equally spaced, the distance from VIS1 to VIS3, and from VIS3 to VIS4, are identical. However, you can manually convert this visit into a factor, with @@ -184,14 +218,45 @@

    DetailsVIS1 to VIS3 will be double, as VIS2 is a valid visit. However, please be cautious because this can lead to convergence failure when using an unstructured covariance matrix and there are no observations -at the missing visits.

    + +
    -

    Examples

    +

    Examples +

    mmrm_control(
       optimizer_fun = stats::optim,
       optimizer_args = list(method = "L-BFGS-B")
    @@ -327,22 +394,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.10/reference/mmrm_methods.html b/v0.3.10/reference/mmrm_methods.html index e3ebd102f..719c4e5a9 100644 --- a/v0.3.10/reference/mmrm_methods.html +++ b/v0.3.10/reference/mmrm_methods.html @@ -1,5 +1,25 @@ - -Methods for mmrm Objects — mmrm_methods • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm
     summary(object, ...)
     
    @@ -130,52 +159,69 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the fitted MMRM including Jacobian and call etc.

    ...

    not used.

    -
    + +
    -

    Value

    +

    Value +

    Depends on the method, see Details and Functions.

    -

    Details

    -

    While printing the summary of (mmrm)
    object, the following will be displayed:

    1. Formula. The formula used in the model.

    2. +

      Details +

      +

      While printing the summary of (mmrm)
      object, the following will be displayed:

      +
        +
      1. Formula. The formula used in the model.

      2. Data. The data used for analysis, including number of subjects, number of valid observations.

      3. Covariance. The covariance structure and number of variance parameters.

      4. Method. Restricted maximum likelihood(REML) or maximum likelihood(ML).

      5. Model selection criteria. AIC, BIC, log likelihood and deviance.

      6. Coefficients. Coefficients of the covariates.

      7. -
      8. Covariance estimate. The covariance estimate(for each group).

        1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available +

        2. +

          Covariance estimate. The covariance estimate(for each group).

          +
            +
          1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available in data will be displayed.

          2. If the covariance structure is spatial, the covariance matrix of two time points with unit distance will be displayed.

          3. -
        3. -

        confint is used to obtain the confidence intervals for the coefficients. +

      + +
    +

    confint is used to obtain the confidence intervals for the coefficients. Please note that this is different from the confidence interval of difference of least square means from emmeans.

    -

    Functions

    +

    Functions +

    -
    • summary(mmrm): summarizes the MMRM fit results.

    • +
        +
      • summary(mmrm): summarizes the MMRM fit results.

      • print(summary.mmrm): prints the MMRM fit summary.

      • confint(mmrm): obtain the confidence intervals for the coefficients.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_tmb_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- mmrm(formula, fev_data)
     # Summary:
    @@ -246,22 +292,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.10/reference/mmrm_tidiers.html b/v0.3.10/reference/mmrm_tidiers.html index 7d4001f3a..f02958f85 100644 --- a/v0.3.10/reference/mmrm_tidiers.html +++ b/v0.3.10/reference/mmrm_tidiers.html @@ -1,9 +1,29 @@ - - + + + + + +Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm +Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -119,7 +147,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm
     tidy(x, conf.int = FALSE, conf.level = 0.95, ...)
     
    @@ -138,8 +167,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fitted model.

    @@ -171,21 +202,27 @@

    Argumentsresiduals.mmrm_tmb().

    -

    + +
    -

    Functions

    +

    Functions +

    -
    • tidy(mmrm): derives tidy tibble from an mmrm object.

    • +
        +
      • tidy(mmrm): derives tidy tibble from an mmrm object.

      • glance(mmrm): derives glance tibble from an mmrm object.

      • augment(mmrm): derives augment tibble from an mmrm object.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tmb_methods for additional methods.

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -277,22 +314,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.10/reference/mmrm_tmb_methods.html b/v0.3.10/reference/mmrm_tmb_methods.html index 0ae71875c..0d5bb3ece 100644 --- a/v0.3.10/reference/mmrm_tmb_methods.html +++ b/v0.3.10/reference/mmrm_tmb_methods.html @@ -1,5 +1,25 @@ - -Methods for mmrm_tmb Objects — mmrm_tmb_methods • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm_tmb
     coef(object, complete = TRUE, ...)
     
    @@ -186,8 +215,10 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM object.

    @@ -273,15 +304,18 @@

    Arguments -

    + +
    -

    Value

    +

    Value +

    Depends on the method, see Functions.

    -

    Details

    +

    Details +

    include argument controls the variables the returned model frame will include. Possible options are "response_var", "subject_var", "visit_var" and "group_var", representing the response variable, subject variable, visit variable or group variable. @@ -289,9 +323,11 @@

    Detailsmodel.matrix.

    -

    Functions

    +

    Functions +

    -
    • coef(mmrm_tmb): obtains the estimated coefficients.

    • +
        +
      • coef(mmrm_tmb): obtains the estimated coefficients.

      • fitted(mmrm_tmb): obtains the fitted values.

      • predict(mmrm_tmb): predict conditional means for new data; optionally with standard errors and confidence or prediction intervals. @@ -325,11 +361,14 @@

        Functions -

        References

        +

        References +

        -
        • Hurvich CM, Tsai C (1989). +

          • Gałecki A, Burzykowski T (2013). +

          +
            +
          • Gałecki A, Burzykowski T (2013). “Linear mixed-effects model.” In Linear mixed-effects models using R, 245--273. Springer.

          • -
    + +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- fit_mmrm(formula, fev_data, weights = rep(1, nrow(fev_data)))
     # Estimated coefficients:
    @@ -3864,22 +3908,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.10/reference/parsnip_add_mmrm.html b/v0.3.10/reference/parsnip_add_mmrm.html index ed5d89c36..bcf285343 100644 --- a/v0.3.10/reference/parsnip_add_mmrm.html +++ b/v0.3.10/reference/parsnip_add_mmrm.html @@ -1,5 +1,25 @@ - -Register mmrm For Use With tidymodels — parsnip_add_mmrm • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -113,45 +142,55 @@
    -

    Usage

    +

    Usage +

    parsnip_add_mmrm(quietly = FALSE)
    -

    Arguments

    -
    quietly
    +

    Arguments +

    +
    +
    quietly

    logical: should progress and error messages be suppressed?

    -
    + +
    -

    Value

    +

    Value +

    A logical value indicating whether registration was successful.

    -

    Details

    +

    Details +

    We can use parsnip::show_model_info("linear_reg") to check the registration with parsnip and thus the wider tidymodels ecosystem.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/position_symbol.html b/v0.3.10/reference/position_symbol.html index 9a18ca977..ad1f3f81d 100644 --- a/v0.3.10/reference/position_symbol.html +++ b/v0.3.10/reference/position_symbol.html @@ -1,9 +1,29 @@ - - + + + + + +Search For the Position of a Symbol — position_symbol • mmrm +Search For the Position of a Symbol — position_symbol • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -119,13 +147,16 @@
    -

    Usage

    +

    Usage +

    position_symbol(x, sym, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (list of language)
    a list of language objects in which to search for a specific symbol.

    @@ -138,9 +169,11 @@

    ArgumentsPosition().

    -

    + +
    -

    Value

    +

    Value +

    The position of the symbol if found, or the nomatch value @@ -148,22 +181,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/print.cov_struct.html b/v0.3.10/reference/print.cov_struct.html index 2e7fae4f8..844799320 100644 --- a/v0.3.10/reference/print.cov_struct.html +++ b/v0.3.10/reference/print.cov_struct.html @@ -1,5 +1,25 @@ - -Print a Covariance Structure Object — print.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,45 +141,54 @@
    -

    Usage

    +

    Usage +

    # S3 method for cov_struct
     print(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    ...

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    x invisibly.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/reexports.html b/v0.3.10/reference/reexports.html index 21d2cdaa8..723f1c9bc 100644 --- a/v0.3.10/reference/reexports.html +++ b/v0.3.10/reference/reexports.html @@ -1,19 +1,39 @@ - - + + + + + +Objects exported from other packages — reexports • mmrm +Objects exported from other packages — reexports • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -38,7 +60,8 @@ + - + + - + @@ -125,30 +153,36 @@

    These objects are imported from other packages. Follow the links below to see their documentation.

    -
    generics
    +
    +
    generics

    augment, glance, tidy

    -
    + + - + +
    -
    + + - - + + diff --git a/v0.3.10/reference/refit_multiple_optimizers.html b/v0.3.10/reference/refit_multiple_optimizers.html index 4b9f43bdb..c21e336f8 100644 --- a/v0.3.10/reference/refit_multiple_optimizers.html +++ b/v0.3.10/reference/refit_multiple_optimizers.html @@ -1,5 +1,25 @@ - -Refitting MMRM with Multiple Optimizers — refit_multiple_optimizers • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    refit_multiple_optimizers(fit, ..., control = mmrm_control(...))
    -

    Arguments

    -
    fit
    +

    Arguments +

    +
    +
    fit

    (mmrm_fit)
    original model fit from fit_single_optimizer().

    @@ -130,20 +161,24 @@

    Arguments -

    Value

    +

    Value +

    The best (in terms of log likelihood) fit which converged.

    -

    Note

    +

    Note +

    For Windows, no parallel computations are currently implemented.

    -

    Examples

    +

    Examples +

    fit <- fit_single_optimizer(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data,
    @@ -154,22 +189,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.10/reference/register_on_load.html b/v0.3.10/reference/register_on_load.html index 71a56dbbb..63ac3a17b 100644 --- a/v0.3.10/reference/register_on_load.html +++ b/v0.3.10/reference/register_on_load.html @@ -1,5 +1,25 @@ - -Helper Function for Registering Functionality With Suggests Packages — register_on_load • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    register_on_load(
       pkg,
       ver = c(NA_character_, NA_character_),
    @@ -123,8 +152,10 @@ 

    Usage

    -

    Arguments

    -
    pkg
    +

    Arguments +

    +
    +
    pkg

    (string)
    package name.

    @@ -145,9 +176,11 @@

    Arguments -

    Value

    +

    Value +

    A logical (invisibly) indicating whether registration was successful. @@ -155,22 +188,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/std_start.html b/v0.3.10/reference/std_start.html index 946c763b4..fff383f34 100644 --- a/v0.3.10/reference/std_start.html +++ b/v0.3.10/reference/std_start.html @@ -1,5 +1,25 @@ - -Standard Starting Value — std_start • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    std_start(cov_type, n_visits, n_groups, ...)
    -

    Arguments

    -
    cov_type
    +

    Arguments +

    +
    +
    cov_type

    (string)
    name of the covariance structure.

    @@ -134,15 +165,18 @@

    Arguments -

    Value

    +

    Value +

    A numeric vector of starting values.

    -

    Details

    +

    Details +

    std_start will try to provide variance parameter from identity matrix. However, for ar1 and ar1h the corresponding values are not ideal because the \(\rho\) is usually a positive number thus using 0 as starting value can lead to @@ -150,22 +184,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.10/reference/tmb_cov_type.html b/v0.3.10/reference/tmb_cov_type.html index a902f4972..0370720c3 100644 --- a/v0.3.10/reference/tmb_cov_type.html +++ b/v0.3.10/reference/tmb_cov_type.html @@ -1,5 +1,25 @@ - -Produce A Covariance Identifier Passing to TMB — tmb_cov_type • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,40 +141,49 @@
    -

    Usage

    +

    Usage +

    tmb_cov_type(cov)
    -

    Arguments

    -
    cov
    +

    Arguments +

    +
    +
    cov

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    A string used for method dispatch when passed to TMB.

    + +
    -
    + + - - + + diff --git a/v0.3.10/reference/validate_cov_struct.html b/v0.3.10/reference/validate_cov_struct.html index 9b346611e..47dc701a1 100644 --- a/v0.3.10/reference/validate_cov_struct.html +++ b/v0.3.10/reference/validate_cov_struct.html @@ -1,5 +1,25 @@ - -Validate Covariance Structure Data — validate_cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,40 +141,49 @@
    -

    Usage

    +

    Usage +

    validate_cov_struct(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    x if successful, or an error is thrown otherwise.

    + +
    -
    + + - - + + diff --git a/v0.3.11/404.html b/v0.3.11/404.html index 9e05f3445..8fc326399 100644 --- a/v0.3.11/404.html +++ b/v0.3.11/404.html @@ -1,5 +1,4 @@ - - + @@ -82,11 +81,10 @@ Changelog +v0.2.2 + + - + + - + @@ -111,46 +137,66 @@

    Thank you for your interest in contributing to this repo! Your contribution is highly valued. Please go through this document for guidance on how to contribute.

    -

    Programming conventions

    +

    Programming conventions +

    Please follow the programming conventions to ensure a consistent programming style across the package.

    Generally we follow the tidyverse style guide. Some specific conventions that deviate from this are explained below.

    -

    Functions

    -
    1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
    2. +

      Functions +

      +
        +
      1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
      2. Functions starting with h_ are helper functions and they should not be exported.
      3. Functions should be well documented using roxygen2 (even when they are not exported).
      4. Functions must be unit tested (even when they are not exported).
      5. -
    + +
    -

    Imports

    +

    Imports +

    In package mmrm, we follow the following convention in package imports.

    -
    1. When only a few functions from another package are needed: -
      1. In DESCRIPTION, add that package into Imports.
      2. +
          +
        1. When only a few functions from another package are needed: +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we add a importFrom with a single function from the package. -
            1. The function imported can be any random function within the package.
            2. -
          3. +
              +
            1. The function imported can be any random function within the package.
            2. +
            +
          4. Always use package::function style wherever you need to use the function.
          5. Example: stats.
          6. -
        2. +
        +
      3. When many functions from another package are needed: -
        1. In DESCRIPTION, add that package into Imports.
        2. +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we use a import to import every function.
          3. Use the functions directly without prefix.
          4. Example: checkmate.
          5. -
          -
    + + + +
    -

    Comments

    -
    • Comments should always follow sentence style.
    • +

      Comments +

      +
        +
      • Comments should always follow sentence style.
      • Comments should be as minimal as possible: Generally the code and variable names should be clear enough to not need any comments. Only use them when needed and explain the “Why” and not the “What”.
      • -
    + +
    -

    Documentation

    -
    • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

    • +

      Documentation +

      +
        +
      • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

      • Exported objects must have a lifecycle badge to clarify the maturity.

        -
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • -
      • +
          +
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • +
        +
      • Use Title Style for the title of the documentation.

      • Always include a @description part with at least one sentence describing the object.

      • @@ -162,38 +208,55 @@

        Documentationwebsite.

      • In vignettes, you cannot directly reference help pages but only pkgdown web pages. Note that this includes only exported objects. To make it look similar to the help page references, please here also use function() style.

      • mmrm_review_methods.Rmd is a large vignette and we precompute this vignette to make the GitHub actions faster. Run the script vignettes/precompile.R to regenerate the precomputed vignette and subsequently update it in GitHub. Before every release we need to run this again. Please note you need to install the package and then compile the vignette because efficiency is better after installation to provide a fair comparison.

      • -
    + +
    -

    Github conventions

    +

    Github conventions +

    When using GitHub to collaborate, the following conventions are needed:

    -
    1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. -
      • If you are going to work on this issue, please assign yourself.
      • -
    2. +
        +
      1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. +
          +
        • If you are going to work on this issue, please assign yourself.
        • +
        +
      2. Please create a branch in the mmrm repository, instead of creating forks, unless you are not yet a team member. -
        • Branches should be associated with a GitHub issue and linked to an issue id.
        • +
            +
          • Branches should be associated with a GitHub issue and linked to an issue id.
          • The name of a branch should be of the form: <issue_id>_<short_discription>.
          • -
          +
        +
      3. Add changes to the branch and push it to GitHub. -
        • Please use clear commit messages.
        • +
            +
          • Please use clear commit messages.
          • Please keep your changes focused on the issue. If there are independent changes, please separate it into another PR linking to another issue.
          • -
          +
        +
      4. Please create a Pull Request when you think your code changes are ready: -
        • Functions are well documented.
        • +
            +
          • Functions are well documented.
          • Functions have corresponding unit tests.
          • Changes pass all the GitHub action checks.
          • The checklist in the corresponding issue is completed.
          • -
          +
        +
      5. Address all the comments you receive. -
        • at least one approval is needed to merge.
        • -
      6. -
    +
      +
    • at least one approval is needed to merge.
    • +
    + + +
    -

    Contribution tips

    +

    Contribution tips +

    -

    Development environment Set-up

    +

    Development environment Set-up +

    The development this mmrm package is based on the latest R version and C++ compilers. The package dependencies are the most recent versions from CRAN. We recommend that your working environment is set up in the same way. Additionally, there are some tools we recommend you to install:

    -
    1. +
        +
      1. RTools if you work on a Windows operating system. Alternatively you can use docker to separate the operating system and the development system.
      2. GitKraken is a very useful user interface for git including visualization of git commit graphs, file history, etc.
      3. @@ -201,43 +264,82 @@

        Development environment Set-uplintr will allow you to perform static code analysis.
      4. pre-commit is a Python module that allows you to identify issues before you commit locally.
      5. -

    + +
    -

    Issue labels

    +

    Issue labels +

    The issues are categorized with several labels:

    - +
    Label name
    ++++ + + - + + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + -
    Label name Description
    SPx
    SPx SP (story points) indicate complexity, and the larger the subsequent number, the more time consuming the issue is expected to be
    priority
    priority Issues with this label should be completed with higher priority
    good first issue
    good first issue Good choices for new team members
    blocked
    blocked Blocked by other issues
    bug
    bug Something isn’t working
    devops
    devops Development and Operation
    discussion
    discussion Discussion needed
    documentation
    documentation Improvement of documentation is needed
    duplicate
    duplicate The issue already exists
    enhancement
    enhancement New feature or request
    help wanted
    help wanted Extra attention is needed
    invalid
    invalid This doesn’t seem right
    question
    question Further information needed

    Please choose an issue based on your interest, issue complexity, and priority.

    + + + +

    Please choose an issue based on your interest, issue complexity, and priority.

    -

    Add new unit tests

    +

    Add new unit tests +

    To add a new unit test, you need to first identify the test scope. Does the test fit in the scope of existing tests? If so, please modify the existing test files under tests/testthat/ folder or src/ folder, depending on whether the code to be tested is R or C++. Otherwise please create a new test file, with a name prefix of “test-”.

    In each test case, use the following structure:

    @@ -250,19 +352,25 @@ 

    Add new unit tests -

    Add integration tests

    +

    Add integration tests +

    Integration tests compare the results of SAS and R and assures the quality of our code. To add an integration test, you need to do the following:

    -
    1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
    2. +
        +
      1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
      2. Save the results in .txt format in the design/SAS/ folder.
      3. Decide the key outputs that are needed for comparison.
      4. Add a unit test verifying that the R implementation of the same model has the same results (conversion may be needed).
      5. -
    + +
    -

    Get started with C++

    +

    Get started with C++ +

    If you have no experience with C++, it is totally fine: TMB has provided us with many high-level functionalities that is very similar to R. Here we only list the most important things that you need to go through before you begin C++ programming.

    -
    1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
    2. +
        +
      1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
      2. Types. C++ is a strong type programming language and all objects need to be declared with type. Sometimes you can combine the declaration and definition. -
        1. +
            +
          1. int i = 1; This works, as we declare i as int and define it to be 1.
          2. i = 1; This fails, because i is not declared yet.
          3. @@ -270,53 +378,70 @@

            Get started with C++
          4. in R, if (TRUE) { a = '123' }; print(a) is legal.
          5. +
              +
            1. in R, if (TRUE) { a = '123' }; print(a) is legal.
            2. in C++, if (1) {string a = '123'}; std::stdout << a << std::endl; is illegal, because object a is terminated already.
            3. in C++, string a; if (1) {a = '123'}; std::stdout << a << std::endl; is legal, a is declared prior to if statement.
            4. -
            +

          +
        2. Polymorphism. Unlike in R, where function arguments have no explicitly defined types, in C++ the type of each argument of a function must be pre-specified. -
          1. +
              +
            1. Template is a special function that works with generic argument type. We could imagine a single function that could work on arguments of arbitrary type, and template functions make this possible through separation of function logic from the argument declaration. In this way we can use template functions and avoid the need to replicate the whole code for each type.
            2. -
          2. -

          With these points in mind, you are about ready to go.

          +
        +
      3. +
      +

      With these points in mind, you are about ready to go.

    -

    Get started with TMB

    +

    Get started with TMB +

    In mmrm we are not including any latent variables and so the Laplace approximation aspect of TMB is not used. We only use the automatic differentiation part of TMB. For detailed documentation of TMB, visit the TMB reference.

    One important feature of TMB are the R style matrix/array calculations. This is important because we mainly use this part to conduct our calculations. See matrix_arrays.cpp for examples.

    -

    Add a new covariance structure

    +

    Add a new covariance structure +

    To add a new covariance structure, you need to do the following:

    -
    1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
    2. +
        +
      1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
      2. Implement the covariance structure on the C++ side and the corresponding R interface.
      3. Add unit tests to make sure the new covariance structure is working as expected.
      4. Add integration tests under design/SAS/ folder to make sure SAS and R produce similar results (within tolerance).
      5. -
    + +
    -

    Add additional data

    +

    Add additional data +

    To add additional data to mmrm, please follow the next steps:

    -
    1. Make sure the data is needed.
    2. +
        +
      1. Make sure the data is needed.
      2. Document the data in R/data.R.
      3. Use save to create an rda data only containing this dataset. Here the function usethis::use_data can also be helpful.
      4. -
    + +
    -

    Communications within team

    +

    Communications within team +

    There are several communication channels, please use appropriate ones.

    -

    GitHub

    +

    GitHub +

    GitHub issues and pull requests are where implementations are discussed and reviewed. Feature requests, bugs, enhancements, technical implementations can be discussed here. When you have ideas that needs to be documented, it is better to have them in GitHub.

    -

    Slack

    +

    Slack +

    Slack is a messaging tool and we have the mmrm channel under the rinpharma space. You can put anything in the slack channel, e.g., you have completed a issue and are waiting for review, or you have some questions and don’t want to wait until the next stand-up meeting.

    To join the slack channel, please make sure you have a slack account, and send the email address to any team member.

    -

    Stand-up meetings

    +

    Stand-up meetings +

    We have stand-up meetings currently three times a week. The purpose of stand-up meetings is for team members to discuss the current work progress and raise any issue/questions for team discussion if needed.

    You don’t need to join all three meetings.

    @@ -324,22 +449,26 @@

    Stand-up meetings

    + + + + - - + + diff --git a/v0.3.11/PULL_REQUEST_TEMPLATE.html b/v0.3.11/PULL_REQUEST_TEMPLATE.html index 7d5345219..3c82bc215 100644 --- a/v0.3.11/PULL_REQUEST_TEMPLATE.html +++ b/v0.3.11/PULL_REQUEST_TEMPLATE.html @@ -1,5 +1,23 @@ - -Description • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +44,8 @@ + - + + - + @@ -112,22 +138,26 @@ - + +
    -
    + + - - + + diff --git a/v0.3.11/articles/algorithm.html b/v0.3.11/articles/algorithm.html index 4f00b0546..8e409d507 100644 --- a/v0.3.11/articles/algorithm.html +++ b/v0.3.11/articles/algorithm.html @@ -1,5 +1,4 @@ - - + @@ -84,11 +83,10 @@ Changelog +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + - + + - + @@ -110,75 +136,104 @@

    Introduction

    -
    Package Introduction
    +
    +
    Package Introduction
    -
    Mixed Models for Repeated Measures
    + +
    Mixed Models for Repeated Measures
    -
    Comparison with other software
    + +
    Comparison with other software
    -
    + +
    +

    Covariance Structures

    -
    Covariance Structures
    +
    +
    Covariance Structures
    -
    + + + + + + + + + + + + + + + + +
    -
    + + - - + + diff --git a/v0.3.11/articles/introduction.html b/v0.3.11/articles/introduction.html index b4f6367d4..1fd79c830 100644 --- a/v0.3.11/articles/introduction.html +++ b/v0.3.11/articles/introduction.html @@ -1,5 +1,4 @@ - - + @@ -84,11 +83,10 @@ Changelog +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + - + + - + @@ -109,7 +135,8 @@

    Authors

    -
    • +
        +
      • Daniel Sabanes Bove. Author, maintainer.

      • @@ -181,7 +208,8 @@

        Authors

        AstraZeneca plc. Copyright holder, funder.

        -
    + +

    Citation

    @@ -200,22 +228,26 @@

    Citation

    }
    + +
    -
    + + - - + + diff --git a/v0.3.11/index.html b/v0.3.11/index.html index 905b69d62..78f26eb16 100644 --- a/v0.3.11/index.html +++ b/v0.3.11/index.html @@ -1,5 +1,4 @@ - - + @@ -108,11 +107,10 @@ Changelog +v0.2.2 + + - + + - + @@ -108,53 +134,83 @@
    -

    mmrm 0.3.11

    CRAN release: 2024-03-05

    +

    mmrm 0.3.11 +

    +

    CRAN release: 2024-03-05

    -

    Bug Fixes

    -
    • Previously if a secondary optimizer fails mmrm will fail. This is fixed now.
    • +

      Bug Fixes +

      +
        +
      • Previously if a secondary optimizer fails mmrm will fail. This is fixed now.
      • Previously character covariate variables will make Anova fail. This is fixed now.
      • -
    + +
    -

    mmrm 0.3.10

    CRAN release: 2024-01-26

    +

    mmrm 0.3.10 +

    +

    CRAN release: 2024-01-26

    -

    Miscellaneous

    -
    • Fix internal test skipping functions for MacOS R.
    • -
    +

    Miscellaneous +

    +
      +
    • Fix internal test skipping functions for MacOS R.
    • +
    +
    -

    mmrm 0.3.9

    CRAN release: 2024-01-25

    +

    mmrm 0.3.9 +

    +

    CRAN release: 2024-01-25

    -

    Miscellaneous

    -
    • Fix internal test skipping functions for R versions older than 4.3.
    • -
    +

    Miscellaneous +

    +
      +
    • Fix internal test skipping functions for R versions older than 4.3.
    • +
    +
    -

    mmrm 0.3.8

    CRAN release: 2024-01-24

    +

    mmrm 0.3.8 +

    +

    CRAN release: 2024-01-24

    -

    New Features

    -
    • +

      New Features +

      +
        +
      • Anova is implemented for mmrm models and available upon loading the car package. It supports type II and III hypothesis testing.
      • The argument start for mmrm_control() is updated to allow better choices of initial values.
      • confint on mmrm models will give t-based confidence intervals now, instead of the normal approximation.
      • -
    + +
    -

    Bug Fixes

    -
    • Previously if the first optimizer failed, the best successful fit among the remaining optimizers was not returned correctly. This is fixed now.
    • -
    +

    Bug Fixes +

    +
      +
    • Previously if the first optimizer failed, the best successful fit among the remaining optimizers was not returned correctly. This is fixed now.
    • +
    +
    -

    Miscellaneous

    -
    • In documentation of mmrm_control(), the allowed vcov definition is corrected to “Empirical-Jackknife” (CR3), and “Empirical-Bias-Reduced” (CR2).
    • +

      Miscellaneous +

      +
        +
      • In documentation of mmrm_control(), the allowed vcov definition is corrected to “Empirical-Jackknife” (CR3), and “Empirical-Bias-Reduced” (CR2).
      • Fixed a compiler warning related to missing format specification.
      • If an empty contrast matrix is provided to df_md, it will return statistics with NA values.
      • -
    + +
    -

    mmrm 0.3.7

    CRAN release: 2023-12-08

    +

    mmrm 0.3.7 +

    +

    CRAN release: 2023-12-08

    -

    New Features

    -
    • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
    • +

      New Features +

      +
        +
      • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
      • Add empirical, empirical Jackknife and empirical bias-reduced adjusted coefficients covariance estimates, which can be specified via the new vcov argument of mmrm().
      • Add residual and between-within degrees of freedom methods.
      • Add Kenward-Roger support for spatial covariance structures.
      • @@ -165,76 +221,105 @@

        New FeaturesAdd tidy(), glance() and augment() methods to tidy the fit results into summary tables.
      • Add tidymodels framework support via a parsnip interface.
      • Add argument covariance to mmrm() to allow for easier programmatic access to specifying the model’s covariance structure and to expose covariance customization through the tidymodels interface.
      • -

    + +
    -

    Bug Fixes

    -
    • Previously mmrm() follows the global option na.action and if it is set other than "na.omit" an assertion would fail. This is now fixed and hence NA values are always removed prior to model fitting, independent of the global na.action option.
    • +

      Bug Fixes +

      +
        +
      • Previously mmrm() follows the global option na.action and if it is set other than "na.omit" an assertion would fail. This is now fixed and hence NA values are always removed prior to model fitting, independent of the global na.action option.
      • Previously a model.frame() call on an mmrm object with transformed terms, or new data, e.g. model.frame(mmrm(Y ~ log(X) + ar1(VISIT|ID), data = new_data), would fail. This is now fixed.
      • Previously mmrm() always required a data argument. Now fitting mmrm can also use environment variables instead of requiring data argument. (Note that fit_mmrm is not affected.)
      • Previously emmeans() failed when using transformed terms or not including the visit variable in the model formula. This is now fixed.
      • Previously mmrm() might provide non-finite values in the Jacobian calculations, leading to errors in the Satterthwaite degrees of freedom calculations. This will raise an error now and thus alert the user that the model fit was not successful.
      • -
    + +
    -

    Miscellaneous

    -
    • Use automatic differentiation to calculate Satterthwaite adjusted degrees of freedom, resulting in 10-fold speed-up of the Satterthwaite calculations after the initial model fit.
    • +

      Miscellaneous +

      +
        +
      • Use automatic differentiation to calculate Satterthwaite adjusted degrees of freedom, resulting in 10-fold speed-up of the Satterthwaite calculations after the initial model fit.
      • Add an interactive confirmation step if the number of visit levels is too large for non-spatial covariance structures. Use options(mmrm.max_visits = ) to specify the maximum number of visits allowed in non-interactive mode.
      • Removed free_cores() in favor of parallelly::availableCores(omit = 1).
      • The model.frame() method has been updated: The full argument is deprecated and the include argument can be used instead; by default all relevant variables are returned. Furthermore, it returns a data.frame the size of the number of observations utilized in the model for all combinations of the include argument when na.action= "na.omit".
      • Overall, seven vignettes have been added to the package. All vignettes have a slightly different look now to reduce the size of the overall R package on CRAN.
      • The used optimizer is now available via component(., "optimizer") instead of previously attr(., "optimizer").
      • -
    + +
    -

    mmrm 0.2.2

    CRAN release: 2022-12-20

    +

    mmrm 0.2.2 +

    +

    CRAN release: 2022-12-20

    -

    New Features

    -
    • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
    • +

      New Features +

      +
        +
      • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
      • Update the mmrm arguments to allow users more fine-grained control, e.g. mmrm(..., start = start, optimizer = c("BFGS", "nlminb")) to set the starting values for the variance estimates and to choose the available optimizers. These arguments will be passed to the new function mmrm_control.
      • Add new argument drop_visit_levels to allow users to keep all levels in visits, even when they are not observed in the data. Dropping unobserved levels was done silently previously, and now a message will be given. See ?mmrm_control for more details.
      • -
    + +
    -

    Bug Fixes

    -
    • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
    • +

      Bug Fixes +

      +
        +
      • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
      • Previously in mmrm calls, the weights object in the environment where the formula is defined was replaced by the weights used internally. Now this behavior is removed and your variable weights e.g. in the global environment will no longer be replaced.
      • -
    + +
    -

    Miscellaneous

    -
    • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
    • +

      Miscellaneous +

      +
        +
      • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
      • Deprecated optimizer = "automatic" in favor of not specifying the optimizer. By default, all remaining optimizers will be tried if the first optimizer fails to reach convergence.
      • -
    + +
    -

    mmrm 0.1.5

    CRAN release: 2022-10-18

    -
    • First CRAN version of the package.
    • +

      mmrm 0.1.5 +

      +

      CRAN release: 2022-10-18

      +
        +
      • First CRAN version of the package.
      • The package fits mixed models for repeated measures (MMRM) based on the marginal linear model without random effects.
      • The motivation for this package is to have a fast, reliable (in terms of convergence behavior) and feature complete implementation of MMRM in R.
      • -
      -

      New Features

      -
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • +
      +
      +

      New Features +

      +
        +
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • Fast C++ implementation of Maximum Likelihood (ML) and Restricted Maximum Likelihood (REML) estimation.
      • Currently Satterthwaite adjusted degrees of freedom calculation is supported.
      • Interface to the emmeans package for computing estimated marginal means (also called least-square means) for the coefficients.
      • Multiple optimizers are run to reach convergence in as many cases as possible.
      • Flexible formula based model specification and support for standard S3 methods such as summary, logLik, etc.
      • -
      +
    +
    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/Anova.mmrm.html b/v0.3.11/reference/Anova.mmrm.html index d1f4240dc..b0a1f1f07 100644 --- a/v0.3.11/reference/Anova.mmrm.html +++ b/v0.3.11/reference/Anova.mmrm.html @@ -1,5 +1,25 @@ - -Conduct type II/III hypothesis testing on the MMRM fit results. — Anova.mmrm • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    Anova.mmrm(
       mod,
       type = c("II", "III", "2", "3"),
    @@ -123,8 +152,10 @@ 

    Usage

    -

    Arguments

    -
    mod
    +

    Arguments +

    +
    +
    mod

    (mmrm)
    the fitted MMRM.

    @@ -139,31 +170,37 @@

    Arguments -

    Details

    +

    Details +

    Anova will return anova object with one row per variable and columns Num Df(numerator degrees of freedom), Denom Df(denominator degrees of freedom), F Statistic and Pr(>=F).

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/COV_TYPES.html b/v0.3.11/reference/COV_TYPES.html index 370bcfdef..7802c7e3e 100644 --- a/v0.3.11/reference/COV_TYPES.html +++ b/v0.3.11/reference/COV_TYPES.html @@ -1,5 +1,25 @@ - -Covariance Type Database — COV_TYPES • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,14 +141,17 @@
    -

    Usage

    +

    Usage +

    COV_TYPES
    -

    Format

    +

    Format +

    A data frame with 5 variables and one record per covariance type:

    -
    name
    +
    +
    name

    The long-form name of the covariance structure type

    abbr
    @@ -139,25 +170,30 @@

    Format<

    A logical value indicating whether the covariance structure is spatial.

    -

    + + + +
    -
    + + - - + + diff --git a/v0.3.11/reference/as.cov_struct.html b/v0.3.11/reference/as.cov_struct.html index ff29f5e6d..e10aa7ca8 100644 --- a/v0.3.11/reference/as.cov_struct.html +++ b/v0.3.11/reference/as.cov_struct.html @@ -1,5 +1,25 @@ - -Coerce into a Covariance Structure Definition — as.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    as.cov_struct(x, ...)
     
     # S3 method for formula
    @@ -121,8 +150,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    an object from which to derive a covariance structure. See object specific sections for details.

    @@ -135,44 +166,66 @@

    Arguments -

    Value

    +

    Value +

    A cov_struct() object.

    -

    Details

    +

    Details +

    A covariance structure can be parsed from a model definition formula or call. Generally, covariance structures defined using non-standard evaluation take the following form:

    -

    type( (visit, )* visit | (group /)? subject )

    +

    +
    +
    type( (visit, )* visit | (group /)? subject )
    +

    +

    For example, formulas may include terms such as

    -

    us(time | subject)
    +

    +
    +
    us(time | subject)
     cp(time | group / subject)
    -sp_exp(coord1, coord2 | group / subject)

    +sp_exp(coord1, coord2 | group / subject)
    +

    +

    Note that only sp_exp (spatial) covariance structures may provide multiple coordinates, which identify the Euclidean distance between the time points.

    -

    Methods (by class)

    +

    Methods (by class) +

    -
    • as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be +

        +
      • +

        as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be covariance structure definitions and must follow the form:

        -

        y ~ xs + type( (visit, )* visit | (group /)? subject )

        +

        +
        +
        y ~ xs + type( (visit, )* visit | (group /)? subject )
        +

        +

        Any component on the right hand side of a formula is considered when -searching for a covariance definition.

      • -
    +searching for a covariance definition.

    + + +
    -

    See also

    +

    See also +

    Other covariance types: cov_struct(), covariance_types

    -

    Examples

    +

    Examples +

    # provide a covariance structure as a right-sided formula
     as.cov_struct(~ csh(visit | group / subject))
     #> <covariance structure>
    @@ -192,22 +245,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.11/reference/bcva_data.html b/v0.3.11/reference/bcva_data.html index d2113f18f..c1a857b13 100644 --- a/v0.3.11/reference/bcva_data.html +++ b/v0.3.11/reference/bcva_data.html @@ -1,5 +1,25 @@ - -Example Data on BCVA — bcva_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,48 +141,59 @@
    -

    Usage

    +

    Usage +

    bcva_data
    -

    Format

    -

    A tibble with 10,000 rows and 7 variables:

    • USUBJID: subject ID.

    • +

      Format +

      +

      A tibble with 10,000 rows and 7 variables:

      +
        +
      • USUBJID: subject ID.

      • VISITN: visit number (numeric).

      • AVISIT: visit number (factor).

      • ARMCD: treatment, TRT or CTL.

      • RACE: 3-category race.

      • BCVA_BL: BCVA at baseline.

      • BCVA_CHG: Change in BCVA at study visits.

      • -
    + +
    -

    Source

    +

    Source +

    This is an artificial dataset.

    -

    Note

    +

    Note +

    Measurements of BCVA (best corrected visual acuity) is a measure of how how many letters a person can read off of an eye chart using corrective lenses or contacts. This a common endpoint in ophthalmology trials.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/cached_mmrm_results.html b/v0.3.11/reference/cached_mmrm_results.html index 3f71585f6..5f3dedcd5 100644 --- a/v0.3.11/reference/cached_mmrm_results.html +++ b/v0.3.11/reference/cached_mmrm_results.html @@ -1,5 +1,25 @@ - -Cache Data for mmrm Model Comparison — cached_mmrm_results • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,25 +141,32 @@
    -

    Usage

    +

    Usage +

    cached_mmrm_results
    -

    Format

    -

    A list with following elements:

    • conv_time_fev: Convergence time on FEV data.

    • +

      Format +

      +

      A list with following elements:

      +
        +
      • conv_time_fev: Convergence time on FEV data.

      • conv_time_bcva: Convergence time on BCVA data.

      • rel_diff_ests_tbl_fev: Relative difference in estimates on FEV data.

      • rel_diff_ests_tbl_bcva: Relative difference in estimates on BCVA data.

      • conv_rate: Convergence rate on data with different missing levels.

      • df_missingness: Summary of missingness on simulated data.

      • -
    + +
    -

    Source

    +

    Source +

    This is created based on simulations on FEV data and BCVA data.

    -

    Note

    +

    Note +

    The cached data for comparison is used for the vignettes generation. Please make sure that this data is refreshed before each package release by running the script data-raw/mmrm_review.R. @@ -140,22 +175,26 @@

    Note

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/car_add_mmrm.html b/v0.3.11/reference/car_add_mmrm.html index 4d0b1e018..fc132c831 100644 --- a/v0.3.11/reference/car_add_mmrm.html +++ b/v0.3.11/reference/car_add_mmrm.html @@ -1,5 +1,25 @@ - -Register mmrm For Use With car::Anova — car_add_mmrm • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -113,40 +142,49 @@
    -

    Usage

    +

    Usage +

    car_add_mmrm(quietly = FALSE)
    -

    Arguments

    -
    quietly
    +

    Arguments +

    +
    +
    quietly

    logical: should progress and error messages be suppressed?

    -
    + +
    -

    Value

    +

    Value +

    A logical value indicating whether registration was successful.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/check_package_version.html b/v0.3.11/reference/check_package_version.html index c56b18ab9..727cdd48b 100644 --- a/v0.3.11/reference/check_package_version.html +++ b/v0.3.11/reference/check_package_version.html @@ -1,5 +1,25 @@ - -Check Suggested Dependency Against Version Requirements — check_package_version • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    check_package_version(pkg, ver = c(NA_character_, NA_character_))
    -

    Arguments

    -
    pkg
    +

    Arguments +

    +
    +
    pkg

    (string)
    package name.

    @@ -129,9 +160,11 @@

    Arguments -

    Value

    +

    Value +

    A logical (invisibly) indicating whether the loaded package meets @@ -139,22 +172,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/component.html b/v0.3.11/reference/component.html index 11238b625..ac2cf7cb7 100644 --- a/v0.3.11/reference/component.html +++ b/v0.3.11/reference/component.html @@ -1,5 +1,25 @@ - -Component Access for mmrm_tmb Objects — component • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    component(
       object,
       name = c("cov_type", "subject_var", "n_theta", "n_subjects", "n_timepoints", "n_obs",
    @@ -125,24 +154,31 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    name

    (character)
    the component(s) to be retrieved.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding component of the object, see details.

    -

    Details

    -

    Available component() names are as follows:

    • call: low-level function call which generated the model.

    • +

      Details +

      +

      Available component() names are as follows:

      +
    + +
    -

    See also

    +

    See also +

    In the lme4 package there is a similar function getME().

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -3083,22 +3122,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.11/reference/cov_struct.html b/v0.3.11/reference/cov_struct.html index 151a42348..e82f5d908 100644 --- a/v0.3.11/reference/cov_struct.html +++ b/v0.3.11/reference/cov_struct.html @@ -1,5 +1,25 @@ - -Define a Covariance Structure — cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    cov_struct(
       type = cov_types(),
       visits,
    @@ -124,8 +153,10 @@ 

    Usage

    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    the name of the covariance structure type to use. For available options, see cov_types(). If a type abbreviation is used that implies heterogeneity (e.g. cph) and no value is provided to @@ -151,22 +182,26 @@

    Arguments -

    Value

    +

    Value +

    A cov_struct object.

    -

    See also

    +

    See also +

    Other covariance types: as.cov_struct(), covariance_types

    -

    Examples

    +

    Examples +

    cov_struct("csh", "AVISITN", "USUBJID")
     #> <covariance structure>
     #> heterogeneous compound symmetry:
    @@ -183,22 +218,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.11/reference/cov_type_abbr.html b/v0.3.11/reference/cov_type_abbr.html index 4003512a3..692b1900b 100644 --- a/v0.3.11/reference/cov_type_abbr.html +++ b/v0.3.11/reference/cov_type_abbr.html @@ -1,5 +1,25 @@ - -Retrieve Associated Abbreviated Covariance Structure Type Name — cov_type_abbr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,41 +141,50 @@
    -

    Usage

    +

    Usage +

    cov_type_abbr(type)
    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    either a full name or abbreviate covariance structure type name to collapse into an abbreviated type.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding abbreviated covariance type name.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/cov_type_name.html b/v0.3.11/reference/cov_type_name.html index 80162251f..fddb4b443 100644 --- a/v0.3.11/reference/cov_type_name.html +++ b/v0.3.11/reference/cov_type_name.html @@ -1,5 +1,25 @@ - -Retrieve Associated Full Covariance Structure Type Name — cov_type_name • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,41 +141,50 @@
    -

    Usage

    +

    Usage +

    cov_type_name(type)
    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    either a full name or abbreviate covariance structure type name to convert to a long-form type.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding abbreviated covariance type name.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/covariance_types.html b/v0.3.11/reference/covariance_types.html index f38b5017b..f58d90480 100644 --- a/v0.3.11/reference/covariance_types.html +++ b/v0.3.11/reference/covariance_types.html @@ -1,5 +1,25 @@ - -Covariance Types — covariance_types • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    cov_types(
       form = c("name", "abbr", "habbr"),
       filter = c("heterogeneous", "spatial")
    @@ -121,8 +150,10 @@ 

    Usage

    -

    Arguments

    -
    form
    +

    Arguments +

    +
    +
    form

    (character)
    covariance structure type name form. One or more of "name", "abbr" (abbreviation), or "habbr" (heterogeneous abbreviation).

    @@ -132,67 +163,155 @@

    Arguments or "spatial".

    -

    + +
    -

    Value

    +

    Value +

    A character vector of accepted covariance structure type names and abbreviations.

    -

    Note

    +

    Note +

    The ante-dependence covariance structure in this package refers to homogeneous ante-dependence, while the ante-dependence covariance structure from SAS PROC MIXED refers to heterogeneous ante-dependence and the homogeneous version is not available in SAS.

    For all non-spatial covariance structures, the time variable must -be coded as a factor.

    -

    Spatial Covariance structures:

    +be coded as a factor.

    +
    +

    Spatial Covariance structures: +

    -
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)

    where \(d_{ij}\) denotes the Euclidean distance between time points + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)
    +

    where \(d_{ij}\) denotes the Euclidean distance between time points \(i\) and \(j\).

    -

    Abbreviations for Covariance Structures

    +

    Abbreviations for Covariance Structures +

    -

    Common Covariance Structures:

    +

    Common Covariance Structures: +

    -
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)
    +

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, respectively, out of total \(m\) time points, \(1 \leq i, j \leq m\).

    -

    See also

    +

    See also +

    Other covariance types: as.cov_struct(), cov_struct()

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/df_1d.html b/v0.3.11/reference/df_1d.html index 811985b19..3facc00e2 100644 --- a/v0.3.11/reference/df_1d.html +++ b/v0.3.11/reference/df_1d.html @@ -1,9 +1,29 @@ - - + + + + + +Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm +Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -119,13 +147,16 @@
    -

    Usage

    +

    Usage +

    df_1d(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -134,16 +165,19 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -169,22 +203,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.11/reference/df_md.html b/v0.3.11/reference/df_md.html index a956a0f41..89bba2551 100644 --- a/v0.3.11/reference/df_md.html +++ b/v0.3.11/reference/df_md.html @@ -1,11 +1,31 @@ - - + + + + + +Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm +Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -122,13 +150,16 @@
    -

    Usage

    +

    Usage +

    df_md(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -138,16 +169,19 @@

    Arguments -

    Value

    +

    Value +

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

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -170,22 +204,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.11/reference/drop_elements.html b/v0.3.11/reference/drop_elements.html index fb0b16e20..30baa48ab 100644 --- a/v0.3.11/reference/drop_elements.html +++ b/v0.3.11/reference/drop_elements.html @@ -1,5 +1,25 @@ - -Drop Items from an Indexible — drop_elements • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    drop_elements(x, n)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    Any object that can be consumed by seq_along() and indexed by a logical vector of the same length.

    @@ -127,31 +158,37 @@

    Arguments -

    Value

    +

    Value +

    A subset of x.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/emit_tidymodels_register_msg.html b/v0.3.11/reference/emit_tidymodels_register_msg.html index 9d28aa120..7e8dafe53 100644 --- a/v0.3.11/reference/emit_tidymodels_register_msg.html +++ b/v0.3.11/reference/emit_tidymodels_register_msg.html @@ -1,5 +1,25 @@ - -Format a Message to Emit When Tidymodels is Loaded — emit_tidymodels_register_msg • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,12 +141,14 @@
    -

    Usage

    +

    Usage +

    emit_tidymodels_register_msg()
    -

    Value

    +

    Value +

    A character message to emit. Either a ansi-formatted cli output if @@ -126,22 +156,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/emmeans_support.html b/v0.3.11/reference/emmeans_support.html index efbc10887..deb67c086 100644 --- a/v0.3.11/reference/emmeans_support.html +++ b/v0.3.11/reference/emmeans_support.html @@ -1,17 +1,37 @@ - - + + + + + +Support for emmeans — emmeans_support • mmrm +Support for emmeans — emmeans_support • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -36,7 +58,8 @@ + - + + - +
    @@ -133,7 +162,8 @@
    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -162,22 +192,26 @@ 

    Examples#> Results are averaged over the levels of: RACE, SEX

    -
    + +
    + + - - + + diff --git a/v0.3.11/reference/emp_start.html b/v0.3.11/reference/emp_start.html index 3c0e779bd..9dbc98b15 100644 --- a/v0.3.11/reference/emp_start.html +++ b/v0.3.11/reference/emp_start.html @@ -1,5 +1,25 @@ - -Empirical Starting Value — emp_start • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    emp_start(data, model_formula, visit_var, subject_var, subject_groups, ...)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (data.frame)
    data used for model fitting.

    @@ -142,44 +173,52 @@

    Arguments -

    Value

    +

    Value +

    A numeric vector of starting values.

    -

    Details

    +

    Details +

    This emp_start only works for unstructured covariance structure. It uses linear regression to first obtain the coefficients and use the residuals to obtain the empirical variance-covariance, and it is then used to obtain the starting values.

    -

    Note

    +

    Note +

    data is used instead of full_frame because full_frame is already transformed if model contains transformations, e.g. log(FEV1) ~ exp(FEV1_BL) will drop FEV1 and FEV1_BL but add log(FEV1) and exp(FEV1_BL) in full_frame.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/fev_data.html b/v0.3.11/reference/fev_data.html index 041ca314a..c66a49337 100644 --- a/v0.3.11/reference/fev_data.html +++ b/v0.3.11/reference/fev_data.html @@ -1,5 +1,25 @@ - -Example Data on FEV1 — fev_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,17 @@
    -

    Usage

    +

    Usage +

    fev_data
    -

    Format

    -

    A tibble with 800 rows and 7 variables:

    • USUBJID: subject ID.

    • +

      Format +

      +

      A tibble with 800 rows and 7 variables:

      +
        +
      • USUBJID: subject ID.

      • AVISIT: visit number.

      • ARMCD: treatment, TRT or PBO.

      • RACE: 3-category race.

      • @@ -129,35 +161,42 @@

        Format<
      • WEIGHT: weighting variable.

      • VISITN: integer order of the visit.

      • VISITN2: coordinates of the visit for distance calculation.

      • -

    + +
    -

    Source

    +

    Source +

    This is an artificial dataset.

    -

    Note

    +

    Note +

    Measurements of FEV1 (forced expired volume in one second) is a measure of how quickly the lungs can be emptied. Low levels of FEV1 may indicate chronic obstructive pulmonary disease (COPD).

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/fill_names.html b/v0.3.11/reference/fill_names.html index dca3e1619..088039f79 100644 --- a/v0.3.11/reference/fill_names.html +++ b/v0.3.11/reference/fill_names.html @@ -1,5 +1,25 @@ - -Complete character Vector Names From Values — fill_names • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,41 +141,50 @@
    -

    Usage

    +

    Usage +

    fill_names(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character or list)
    value whose names should be completed from element values.

    -
    + +
    -

    Value

    +

    Value +

    A named vector or list.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/fit_mmrm.html b/v0.3.11/reference/fit_mmrm.html index 6ba607fbb..52225f4b4 100644 --- a/v0.3.11/reference/fit_mmrm.html +++ b/v0.3.11/reference/fit_mmrm.html @@ -1,11 +1,31 @@ - - + + + + + +Low-Level Fitting Function for MMRM — fit_mmrm • mmrm +Low-Level Fitting Function for MMRM — fit_mmrm • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -122,7 +150,8 @@
    -

    Usage

    +

    Usage +

    fit_mmrm(
       formula,
       data,
    @@ -136,8 +165,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    model formula with exactly one special term specifying the visits within subjects, see details.

    @@ -176,16 +207,19 @@

    Argumentsmmrm_control().

    -

    + +
    -

    Value

    +

    Value +

    List of class mmrm_tmb, see h_mmrm_tmb_fit() for details. In addition, it contains elements call and optimizer.

    + + - - + + diff --git a/v0.3.11/reference/fit_single_optimizer.html b/v0.3.11/reference/fit_single_optimizer.html index ff14785f8..baf2155d6 100644 --- a/v0.3.11/reference/fit_single_optimizer.html +++ b/v0.3.11/reference/fit_single_optimizer.html @@ -1,9 +1,29 @@ - - + + + + + +Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm +Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -119,7 +147,8 @@
    -

    Usage

    +

    Usage +

    fit_single_optimizer(
       formula,
       data,
    @@ -134,8 +163,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -175,9 +206,11 @@

    Arguments -

    Value

    +

    Value +

    The mmrm_fit object, with additional attributes containing warnings, @@ -185,7 +218,8 @@

    Value

    mmrm_tmb
    contents.

    + +
    - - + + diff --git a/v0.3.11/reference/flat_expr.html b/v0.3.11/reference/flat_expr.html index 70ac4a723..bc38ec90e 100644 --- a/v0.3.11/reference/flat_expr.html +++ b/v0.3.11/reference/flat_expr.html @@ -1,11 +1,31 @@ - - + + + + + +Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm +Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -122,61 +150,86 @@
    -

    Usage

    +

    Usage +

    flatten_call(call)
     
     flatten_expr(expr)
    -

    Arguments

    -
    call, expr
    +

    Arguments +

    +
    +
    call, expr

    (language)
    a language object to flatten.

    -
    + +
    -

    Value

    +

    Value +

    A list of atomic values, symbols, infix operator names and subexpressions.

    -

    Details

    +

    Details +

    Where 1 + 2 | 3 in R's syntax tree is (|, (+, 1, 2), 3), flattening it into its visual order produces (1, +, 2, |, 3), which makes for more fluent interpretation of non-standard grammar rules used in formulas.

    -

    Functions

    +

    Functions +

    -
    • flatten_call(): Flatten a call into a list of names and argument expressions.

      +
        +
      • +

        flatten_call(): Flatten a call into a list of names and argument expressions.

        The call name and all arguments are flattened into the same list, meaning a call of the form sp_exp(a, b, c | d / e) produces a list of the form (sp_exp, a, b, c, |, d, /, e).

        -

        flatten_call(quote(sp_exp(a, b, c | d / e)))

      • -
      • flatten_expr(): Flatten nested expressions

        -

        flatten_expr(quote(1 + 2 + 3 | 4))

      • -
    +

    +
    +
    flatten_call(quote(sp_exp(a, b, c | d / e)))
    +

    +
    + +
  • +

    flatten_expr(): Flatten nested expressions

    +

    +
    +
    flatten_expr(quote(1 + 2 + 3 | 4))
    +

    +
    +
  • + + + +
    -
    + + - - + + diff --git a/v0.3.11/reference/format.cov_struct.html b/v0.3.11/reference/format.cov_struct.html index 479cdafbb..fd0ab6745 100644 --- a/v0.3.11/reference/format.cov_struct.html +++ b/v0.3.11/reference/format.cov_struct.html @@ -1,5 +1,25 @@ - -Format Covariance Structure Object — format.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,45 +141,54 @@
    -

    Usage

    +

    Usage +

    # S3 method for cov_struct
     format(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    ...

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string for x.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/format_symbols.html b/v0.3.11/reference/format_symbols.html index 631a51708..52cb8eecb 100644 --- a/v0.3.11/reference/format_symbols.html +++ b/v0.3.11/reference/format_symbols.html @@ -1,7 +1,27 @@ - -Format Symbol Objects — format_symbols • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,40 +144,49 @@
    -

    Usage

    +

    Usage +

    format_symbols(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character) A vector of variable names.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string of comma-separated variables.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/formula_rhs.html b/v0.3.11/reference/formula_rhs.html index 8e0be5f0a..463bca7d5 100644 --- a/v0.3.11/reference/formula_rhs.html +++ b/v0.3.11/reference/formula_rhs.html @@ -1,5 +1,25 @@ - -Extract Right-Hand-Side (rhs) from Formula — formula_rhs • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,47 +141,60 @@
    -

    Usage

    +

    Usage +

    formula_rhs(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula.

    -
    + +
    -

    Value

    +

    Value +

    A formula without a response, derived from the right-hand-side of the formula, f.

    -

    formula_rhs(a ~ b + c)
    -formula_rhs(~ b + c)

    +

    +
    +
    formula_rhs(a ~ b + c)
    +formula_rhs(~ b + c)
    +

    +
    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_add_covariance_terms.html b/v0.3.11/reference/h_add_covariance_terms.html index 5fc25d7f7..c73403ed7 100644 --- a/v0.3.11/reference/h_add_covariance_terms.html +++ b/v0.3.11/reference/h_add_covariance_terms.html @@ -1,5 +1,25 @@ - -Add Individual Covariance Variables As Terms to Formula — h_add_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_add_covariance_terms(f, covariance)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula to which covariance structure terms should be added.

    @@ -128,37 +159,44 @@

    Arguments -

    Value

    +

    Value +

    A new formula with included covariance terms.

    -

    Details

    +

    Details +

    stats::update() is used to append the covariance structure and the environment attribute will not be changed. This ensures the returned formula and the input formula have the same environment.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_add_terms.html b/v0.3.11/reference/h_add_terms.html index 269500f5f..148dc9d56 100644 --- a/v0.3.11/reference/h_add_terms.html +++ b/v0.3.11/reference/h_add_terms.html @@ -1,5 +1,25 @@ - -Add Formula Terms with Character — h_add_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_add_terms(f, adds, drop_response = FALSE)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula to be updated.

    @@ -130,37 +161,44 @@

    Arguments -

    Value

    +

    Value +

    A new formula with elements in drops removed.

    -

    Details

    +

    Details +

    Elements in adds will be added from the formula, while the environment of the formula is unchanged. If adds is NULL or character(0), the formula is unchanged.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_coef_table.html b/v0.3.11/reference/h_coef_table.html index 6bdaa6f36..d63215ca6 100644 --- a/v0.3.11/reference/h_coef_table.html +++ b/v0.3.11/reference/h_coef_table.html @@ -1,5 +1,25 @@ - -Coefficients Table for MMRM Fit — h_coef_table • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,18 +141,23 @@
    -

    Usage

    +

    Usage +

    h_coef_table(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    model fit.

    -
    + +
    -

    Value

    +

    Value +

    Matrix with one row per coefficient and columns @@ -132,22 +165,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_confirm_large_levels.html b/v0.3.11/reference/h_confirm_large_levels.html index 05516cb1a..af5e0103a 100644 --- a/v0.3.11/reference/h_confirm_large_levels.html +++ b/v0.3.11/reference/h_confirm_large_levels.html @@ -1,7 +1,27 @@ - -Ask for Confirmation on Large Visit Levels — h_confirm_large_levels • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,34 +144,42 @@
    -

    Usage

    +

    Usage +

    h_confirm_large_levels(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (numeric)
    number of visit levels.

    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_construct_model_frame_inputs.html b/v0.3.11/reference/h_construct_model_frame_inputs.html index cd6635ded..7086facd8 100644 --- a/v0.3.11/reference/h_construct_model_frame_inputs.html +++ b/v0.3.11/reference/h_construct_model_frame_inputs.html @@ -1,13 +1,33 @@ - - + + + + + +Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm +Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -32,7 +54,8 @@ + - + + - + @@ -125,7 +153,8 @@
    -

    Usage

    +

    Usage +

    h_construct_model_frame_inputs(
       formula,
       data,
    @@ -136,8 +165,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (mmrm)
    mmrm fit object.

    @@ -153,36 +184,45 @@

    Arguments -

    Value

    +

    Value +

    -

    named list with four elements:

    • "formula": the formula including the columns requested in the include= argument.

    • +

      named list with four elements:

      +
        +
      • "formula": the formula including the columns requested in the include= argument.

      • "formula_full": the formula including all columns

      • "data": a data frame including all columns where factor and character columns have been processed with h_factor_ref().

      • "is_full": a logical scalar indicating if the formula and full formula are identical

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_default_value.html b/v0.3.11/reference/h_default_value.html index 0592b8949..a3a4111fc 100644 --- a/v0.3.11/reference/h_default_value.html +++ b/v0.3.11/reference/h_default_value.html @@ -1,9 +1,29 @@ - -Default Value on NULL -Return default value when first argument is NULL. — h_default_value • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -119,42 +147,51 @@
    -

    Usage

    +

    Usage +

    h_default_value(x, y)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    Object.

    y

    Object.

    -
    + +
    -

    Details

    +

    Details +

    If x is NULL, returns y. Otherwise return x.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_df_1d_bw.html b/v0.3.11/reference/h_df_1d_bw.html index 2fedeb9b1..3c6534cc9 100644 --- a/v0.3.11/reference/h_df_1d_bw.html +++ b/v0.3.11/reference/h_df_1d_bw.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom for One-Dimensional Contrast — h_df_1d_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_bw(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_df_1d_kr.html b/v0.3.11/reference/h_df_1d_kr.html index fb9e6082c..a2978fc12 100644 --- a/v0.3.11/reference/h_df_1d_kr.html +++ b/v0.3.11/reference/h_df_1d_kr.html @@ -1,7 +1,27 @@ - -Calculation of Kenward-Roger Degrees of Freedom for One-Dimensional Contrast — h_df_1d_kr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,13 +144,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_kr(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -131,31 +162,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_df_1d_res.html b/v0.3.11/reference/h_df_1d_res.html index 9594b759b..362ab12d1 100644 --- a/v0.3.11/reference/h_df_1d_res.html +++ b/v0.3.11/reference/h_df_1d_res.html @@ -1,7 +1,27 @@ - -Calculation of Residual Degrees of Freedom for One-Dimensional Contrast — h_df_1d_res • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,13 +144,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_res(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -131,31 +162,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_df_1d_sat.html b/v0.3.11/reference/h_df_1d_sat.html index 39b6f9881..b489e4f9c 100644 --- a/v0.3.11/reference/h_df_1d_sat.html +++ b/v0.3.11/reference/h_df_1d_sat.html @@ -1,7 +1,27 @@ - -Calculation of Satterthwaite Degrees of Freedom for One-Dimensional Contrast — h_df_1d_sat • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,13 +144,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_sat(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -131,31 +162,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_df_bw_calc.html b/v0.3.11/reference/h_df_bw_calc.html index bc9319183..3aad1c1e2 100644 --- a/v0.3.11/reference/h_df_bw_calc.html +++ b/v0.3.11/reference/h_df_bw_calc.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom — h_df_bw_calc • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,42 +141,54 @@
    -

    Usage

    +

    Usage +

    h_df_bw_calc(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    -

    List with:

    + + + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_df_md_bw.html b/v0.3.11/reference/h_df_md_bw.html index af1a212d3..2d7ce03b9 100644 --- a/v0.3.11/reference/h_df_md_bw.html +++ b/v0.3.11/reference/h_df_md_bw.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_bw(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -129,31 +160,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_df_md_from_1d.html b/v0.3.11/reference/h_df_md_from_1d.html index 949a74f2a..cdc6d6a6c 100644 --- a/v0.3.11/reference/h_df_md_from_1d.html +++ b/v0.3.11/reference/h_df_md_from_1d.html @@ -1,5 +1,25 @@ - -Creating F-Statistic Results from One-Dimensional Contrast — h_df_md_from_1d • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,22 +141,27 @@
    -

    Usage

    +

    Usage +

    h_df_md_from_1d(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    model fit.

    contrast

    (numeric)
    one-dimensional contrast.

    -
    + +
    -

    Value

    +

    Value +

    The one-dimensional degrees of freedom are calculated and then @@ -136,22 +169,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_df_md_kr.html b/v0.3.11/reference/h_df_md_kr.html index f8c23b5d5..dede8052a 100644 --- a/v0.3.11/reference/h_df_md_kr.html +++ b/v0.3.11/reference/h_df_md_kr.html @@ -1,5 +1,25 @@ - -Calculation of Kenward-Roger Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_kr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_kr(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -129,31 +160,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_df_md_res.html b/v0.3.11/reference/h_df_md_res.html index 75e569d8b..cac459deb 100644 --- a/v0.3.11/reference/h_df_md_res.html +++ b/v0.3.11/reference/h_df_md_res.html @@ -1,5 +1,25 @@ - -Calculation of Residual Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_res • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_res(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -129,31 +160,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_df_md_sat.html b/v0.3.11/reference/h_df_md_sat.html index 91351df18..dc00576fb 100644 --- a/v0.3.11/reference/h_df_md_sat.html +++ b/v0.3.11/reference/h_df_md_sat.html @@ -1,5 +1,25 @@ - -Calculation of Satterthwaite Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_sat • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_sat(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -129,31 +160,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_df_min_bw.html b/v0.3.11/reference/h_df_min_bw.html index 5a13cf119..35451dc9b 100644 --- a/v0.3.11/reference/h_df_min_bw.html +++ b/v0.3.11/reference/h_df_min_bw.html @@ -1,5 +1,25 @@ - -Assign Minimum Degrees of Freedom Given Involved Coefficients — h_df_min_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_df_min_bw(bw_calc, is_coef_involved)
    -

    Arguments

    -
    bw_calc
    +

    Arguments +

    +
    +
    bw_calc

    (list)
    from h_df_bw_calc().

    @@ -127,9 +158,11 @@

    Arguments -

    Value

    +

    Value +

    The minimum of the degrees of freedom assigned to each involved @@ -137,22 +170,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_df_to_tibble.html b/v0.3.11/reference/h_df_to_tibble.html index 73c42bd8d..9cb6f1d32 100644 --- a/v0.3.11/reference/h_df_to_tibble.html +++ b/v0.3.11/reference/h_df_to_tibble.html @@ -1,5 +1,25 @@ - -Coerce a Data Frame to a tibble — h_df_to_tibble • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -113,24 +142,30 @@
    -

    Usage

    +

    Usage +

    h_df_to_tibble(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (data.frame)
    what to coerce.

    -
    + +
    -

    Value

    +

    Value +

    The data as a tibble, potentially with a .rownames column.

    -

    Details

    +

    Details +

    This is only a thin wrapper around tibble::as_tibble(), except giving a useful error message and it checks for rownames and adds them as a new column .rownames if they are not just a numeric sequence as @@ -138,22 +173,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.11/reference/h_drop_covariance_terms.html b/v0.3.11/reference/h_drop_covariance_terms.html index f6faa6cd6..d6d0efbfd 100644 --- a/v0.3.11/reference/h_drop_covariance_terms.html +++ b/v0.3.11/reference/h_drop_covariance_terms.html @@ -1,5 +1,25 @@ - -Drop Formula Terms used for Covariance Structure Definition — h_drop_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,46 +141,56 @@
    -

    Usage

    +

    Usage +

    h_drop_covariance_terms(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula from which covariance terms should be dropped.

    -
    + +
    -

    Value

    +

    Value +

    The formula without accepted covariance terms.

    -

    Details

    +

    Details +

    terms is used and it will preserve the environment attribute. This ensures the returned formula and the input formula have the same environment.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_extract_covariance_terms.html b/v0.3.11/reference/h_extract_covariance_terms.html index 23d80fe20..1b6dd84a9 100644 --- a/v0.3.11/reference/h_extract_covariance_terms.html +++ b/v0.3.11/reference/h_extract_covariance_terms.html @@ -1,5 +1,25 @@ - -Extract Formula Terms used for Covariance Structure Definition — h_extract_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,41 +141,50 @@
    -

    Usage

    +

    Usage +

    h_extract_covariance_terms(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula from which covariance terms should be extracted.

    -
    + +
    -

    Value

    +

    Value +

    A list of covariance structure expressions found in f.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_factor_ref.html b/v0.3.11/reference/h_factor_ref.html index 06111aa97..c90bacdca 100644 --- a/v0.3.11/reference/h_factor_ref.html +++ b/v0.3.11/reference/h_factor_ref.html @@ -1,5 +1,25 @@ - -Convert Character to Factor Following Reference — h_factor_ref • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_factor_ref(x, ref, var_name = vname(x))
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character or factor)
    input.

    @@ -130,31 +161,37 @@

    Arguments -

    Details

    +

    Details +

    Use ref to convert x into factor with the same levels. This is needed even if x and ref are both character because in model.matrix if x only has one level there could be errors.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_get_contrast.html b/v0.3.11/reference/h_get_contrast.html index c3d2804e6..f6f314c74 100644 --- a/v0.3.11/reference/h_get_contrast.html +++ b/v0.3.11/reference/h_get_contrast.html @@ -1,5 +1,25 @@ - -Obtain Contrast for Specified Effect — h_get_contrast • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    h_get_contrast(
       object,
       effect,
    @@ -123,8 +152,10 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the fitted MMRM.

    @@ -139,31 +170,37 @@

    Arguments -

    Value

    +

    Value +

    A matrix of the contrast.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_get_cov_default.html b/v0.3.11/reference/h_get_cov_default.html index 86c323403..b224c466c 100644 --- a/v0.3.11/reference/h_get_cov_default.html +++ b/v0.3.11/reference/h_get_cov_default.html @@ -1,7 +1,27 @@ - -Obtain Default Covariance Method — h_get_cov_default • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,20 +144,25 @@
    -

    Usage

    +

    Usage +

    h_get_cov_default(
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within")
     )
    -

    Arguments

    -
    method
    +

    Arguments +

    +
    +
    method

    (string)
    degrees of freedom method.

    -
    + +
    -

    Details

    +

    Details +

    The default covariance method is different for different degrees of freedom method. For "Satterthwaite" or "Between-Within", "Asymptotic" is returned. For "Kenward-Roger" only, "Kenward-Roger" is returned. @@ -137,22 +170,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.11/reference/h_get_empirical.html b/v0.3.11/reference/h_get_empirical.html index b762a46de..4f887558a 100644 --- a/v0.3.11/reference/h_get_empirical.html +++ b/v0.3.11/reference/h_get_empirical.html @@ -1,9 +1,29 @@ - -Obtain Empirical/Jackknife/Bias-Reduced Covariance — h_get_empirical • mmrm +Obtain Empirical/Jackknife/Bias-Reduced Covariance — h_get_empirical • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -119,13 +147,16 @@
    -

    Usage

    +

    Usage +

    h_get_empirical(tmb_data, theta, beta, beta_vcov, type)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    @@ -145,32 +176,41 @@

    Arguments -

    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • cov: matrix empirical covariance.

    • +

      Named list with elements:

      +
        +
      • cov: matrix empirical covariance.

      • df_mat: matrix to calculate Satterthwaite degree of freedom.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_get_kr_comp.html b/v0.3.11/reference/h_get_kr_comp.html index 175968145..16acc2843 100644 --- a/v0.3.11/reference/h_get_kr_comp.html +++ b/v0.3.11/reference/h_get_kr_comp.html @@ -1,7 +1,27 @@ - -Obtain Kenward-Roger Adjustment Components — h_get_kr_comp • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,30 +144,39 @@
    -

    Usage

    +

    Usage +

    h_get_kr_comp(tmb_data, theta)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    theta

    (numeric)
    theta estimate.

    -
    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • P: matrix of \(P\) component.

    • +

      Named list with elements:

      +
        +
      • P: matrix of \(P\) component.

      • Q: matrix of \(Q\) component.

      • R: matrix of \(R\) component.

      • -
    + +
    -

    Details

    +

    Details +

    the function returns a named list, \(P\), \(Q\) and \(R\), which corresponds to the paper in 1997. The matrices are stacked in columns so that \(P\), \(Q\) and \(R\) has the same column number(number of beta parameters). The number of rows, is dependent on @@ -151,22 +188,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.11/reference/h_get_optimizers.html b/v0.3.11/reference/h_get_optimizers.html index d0dd364b1..5db81c544 100644 --- a/v0.3.11/reference/h_get_optimizers.html +++ b/v0.3.11/reference/h_get_optimizers.html @@ -1,5 +1,25 @@ - -Obtain Optimizer according to Optimizer String Value — h_get_optimizers • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    h_get_optimizers(
       optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"),
       optimizer_fun = h_optimizer_fun(optimizer),
    @@ -123,8 +152,10 @@ 

    Usage

    -

    Arguments

    -
    optimizer
    +

    Arguments +

    +
    +
    optimizer

    (character)
    names of built-in optimizers to try, subset of "L-BFGS-B", "BFGS", "CG" and "nlminb".

    @@ -141,46 +172,59 @@

    Arguments -

    Value

    +

    Value +

    Named list of optimizers created by h_partial_fun_args().

    -

    Details

    -

    If you want to use only the built-in optimizers:

    • optimizer is a shortcut to create a list of built-in optimizer functions +

      Details +

      +

      If you want to use only the built-in optimizers:

      +
        +
      • optimizer is a shortcut to create a list of built-in optimizer functions passed to optimizer_fun.

      • Allowed are "L-BFGS-B", "BFGS", "CG" (using stats::optim() with corresponding method) and "nlminb" (using stats::nlminb()).

      • Other arguments should go into optimizer_args.

      • -

      If you want to use your own optimizer function:

      • Make sure that there are three arguments: parameter (start value), objective function +

      +

      If you want to use your own optimizer function:

      +
        +
      • Make sure that there are three arguments: parameter (start value), objective function and gradient function are sequentially in the function arguments.

      • If there are other named arguments in front of these, make sure they are correctly specified through optimizer_args.

      • If the hessian can be used, please make sure its argument name is hessian and please add attribute use_hessian = TRUE to the function, using attr(fun, "use_hessian) <- TRUE.

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_get_prediction.html b/v0.3.11/reference/h_get_prediction.html index 69b74acae..14ec100a1 100644 --- a/v0.3.11/reference/h_get_prediction.html +++ b/v0.3.11/reference/h_get_prediction.html @@ -1,5 +1,25 @@ - -Get Prediction — h_get_prediction • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_get_prediction(tmb_data, theta, beta, beta_vcov)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    object.

    @@ -134,37 +165,47 @@

    Arguments -

    Value

    +

    Value +

    -

    List with:

    • prediction: Matrix with columns fit, conf_var, and var.

    • +

      List with:

      +
        +
      • prediction: Matrix with columns fit, conf_var, and var.

      • covariance: List with subject specific covariance matrices.

      • index: List of zero-based subject indices.

      • -
    + +
    -

    Details

    +

    Details +

    See predict function in predict.cpp which is called internally.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_get_prediction_variance.html b/v0.3.11/reference/h_get_prediction_variance.html index 013200150..3b0517137 100644 --- a/v0.3.11/reference/h_get_prediction_variance.html +++ b/v0.3.11/reference/h_get_prediction_variance.html @@ -1,5 +1,25 @@ - -Get Prediction Variance — h_get_prediction_variance • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_get_prediction_variance(object, nsim, tmb_data)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    @@ -130,25 +161,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.11/reference/h_get_sim_per_subj.html b/v0.3.11/reference/h_get_sim_per_subj.html index 89ada97c6..2f80a356f 100644 --- a/v0.3.11/reference/h_get_sim_per_subj.html +++ b/v0.3.11/reference/h_get_sim_per_subj.html @@ -1,5 +1,25 @@ - -Get simulated values by patient. — h_get_sim_per_subj • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_get_sim_per_subj(predict_res, nsub, nsim)
    -

    Arguments

    -
    predict_res
    +

    Arguments +

    +
    +
    predict_res

    (list)
    from h_get_prediction().

    @@ -130,25 +161,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.11/reference/h_get_theta_from_cov.html b/v0.3.11/reference/h_get_theta_from_cov.html index db3c1a2fc..81b1efd25 100644 --- a/v0.3.11/reference/h_get_theta_from_cov.html +++ b/v0.3.11/reference/h_get_theta_from_cov.html @@ -1,5 +1,25 @@ - -Obtain Theta from Covariance Matrix — h_get_theta_from_cov • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,39 +141,48 @@
    -

    Usage

    +

    Usage +

    h_get_theta_from_cov(covariance)
    -

    Arguments

    -
    covariance
    +

    Arguments +

    +
    +
    covariance

    (matrix) of covariance matrix values.

    -
    + +
    -

    Details

    +

    Details +

    If the covariance matrix has NA in some of the elements, they will be replaced by 0 (non-diagonal) and 1 (diagonal). This ensures that the matrix is positive definite.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_gradient.html b/v0.3.11/reference/h_gradient.html index 346ea7953..7c60893dc 100644 --- a/v0.3.11/reference/h_gradient.html +++ b/v0.3.11/reference/h_gradient.html @@ -1,7 +1,27 @@ - -Computation of a Gradient Given Jacobian and Contrast Vector — h_gradient • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,13 +144,16 @@
    -

    Usage

    +

    Usage +

    h_gradient(jac_list, contrast)
    -

    Arguments

    -
    jac_list
    +

    Arguments +

    +
    +
    jac_list

    (list)
    Jacobian list produced e.g. by h_jac_list().

    @@ -131,9 +162,11 @@

    Arguments -

    Value

    +

    Value +

    Numeric vector which contains the quadratic forms of each element of @@ -141,22 +174,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_jac_list.html b/v0.3.11/reference/h_jac_list.html index 1aef21444..9220ee1ab 100644 --- a/v0.3.11/reference/h_jac_list.html +++ b/v0.3.11/reference/h_jac_list.html @@ -1,5 +1,25 @@ - -Obtain List of Jacobian Matrix Entries for Covariance Matrix — h_jac_list • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_jac_list(tmb_data, theta_est, beta_vcov)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    @@ -130,9 +161,11 @@

    Arguments -

    Value

    +

    Value +

    List with one element per variance parameter containing a matrix @@ -141,22 +174,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_kr_df.html b/v0.3.11/reference/h_kr_df.html index 11a9c1178..ced0d47e2 100644 --- a/v0.3.11/reference/h_kr_df.html +++ b/v0.3.11/reference/h_kr_df.html @@ -1,7 +1,27 @@ - -Obtain the Adjusted Kenward-Roger degrees of freedom — h_kr_df • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,13 +144,16 @@
    -

    Usage

    +

    Usage +

    h_kr_df(v0, l, w, p)
    -

    Arguments

    -
    v0
    +

    Arguments +

    +
    +
    v0

    (matrix)
    unadjusted covariance matrix.

    @@ -137,32 +168,41 @@

    Argumentsh_get_kr_comp().

    -

    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • m: numeric degrees of freedom.

    • +

      Named list with elements:

      +
        +
      • m: numeric degrees of freedom.

      • lambda: numeric F statistic scale parameter.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_md_denom_df.html b/v0.3.11/reference/h_md_denom_df.html index 1b8cbabc8..f54d736fe 100644 --- a/v0.3.11/reference/h_md_denom_df.html +++ b/v0.3.11/reference/h_md_denom_df.html @@ -1,5 +1,25 @@ - -Calculating Denominator Degrees of Freedom for the Multi-Dimensional Case — h_md_denom_df • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,47 +141,57 @@
    -

    Usage

    +

    Usage +

    h_md_denom_df(t_stat_df)
    -

    Arguments

    -
    t_stat_df
    +

    Arguments +

    +
    +
    t_stat_df

    (numeric)
    n t-statistic derived degrees of freedom.

    -
    + +
    -

    Value

    +

    Value +

    Usually the calculation is returning 2 * E / (E - n) where E is the sum of t / (t - 2) over all t_stat_df values t.

    -

    Note

    +

    Note +

    If the input values are two similar to each other then just the average of them is returned. If any of the inputs is not larger than 2 then 2 is returned.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_mmrm_tmb_assert_start.html b/v0.3.11/reference/h_mmrm_tmb_assert_start.html index dd6eb9515..d4363a784 100644 --- a/v0.3.11/reference/h_mmrm_tmb_assert_start.html +++ b/v0.3.11/reference/h_mmrm_tmb_assert_start.html @@ -1,5 +1,25 @@ - -Asserting Sane Start Values for TMB Fit — h_mmrm_tmb_assert_start • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,40 +141,49 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_assert_start(tmb_object)
    -

    Arguments

    -
    tmb_object
    +

    Arguments +

    +
    +
    tmb_object

    (list)
    created with TMB::MakeADFun().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used for assertions.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_mmrm_tmb_check_conv.html b/v0.3.11/reference/h_mmrm_tmb_check_conv.html index b6d235ec4..037e85553 100644 --- a/v0.3.11/reference/h_mmrm_tmb_check_conv.html +++ b/v0.3.11/reference/h_mmrm_tmb_check_conv.html @@ -1,5 +1,25 @@ - -Checking the TMB Optimization Result — h_mmrm_tmb_check_conv • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,22 +141,27 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_check_conv(tmb_opt, mmrm_tmb)
    -

    Arguments

    -
    tmb_opt
    +

    Arguments +

    +
    +
    tmb_opt

    (list)
    optimization result.

    mmrm_tmb

    (mmrm_tmb)
    result from h_mmrm_tmb_fit().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used to generate warnings in case that the model @@ -136,22 +169,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_mmrm_tmb_data.html b/v0.3.11/reference/h_mmrm_tmb_data.html index 26d77dd71..981b2c971 100644 --- a/v0.3.11/reference/h_mmrm_tmb_data.html +++ b/v0.3.11/reference/h_mmrm_tmb_data.html @@ -1,5 +1,25 @@ - -Data for TMB Fit — h_mmrm_tmb_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_data(
       formula_parts,
       data,
    @@ -127,8 +156,10 @@ 

    Usage

    -

    Arguments

    -
    formula_parts
    +

    Arguments +

    +
    +
    formula_parts

    (mmrm_tmb_formula_parts)
    list with formula parts from h_mmrm_tmb_formula_parts().

    @@ -162,12 +193,16 @@

    Arguments -

    Value

    +

    Value +

    -

    List of class mmrm_tmb_data with elements:

    • full_frame: data.frame with n rows containing all variables needed in the model.

    • +

      List of class mmrm_tmb_data with elements:

      +
        +
      • full_frame: data.frame with n rows containing all variables needed in the model.

      • data: data.frame of input dataset.

      • x_matrix: matrix with n rows and p columns specifying the overall design matrix.

      • x_cols_aliased: logical with potentially more than p elements indicating which @@ -187,9 +222,11 @@

        Value

        reml: int specifying whether REML estimation is used (1), otherwise ML (0).

      • subject_groups: factor specifying the grouping for each subject.

      • n_groups: int with the number of total groups

      • -
    + +
    -

    Details

    +

    Details +

    Note that the subject_var must not be factor but can also be character. If it is character, then it will be converted to factor internally. Here the levels will be the unique values, sorted alphabetically and numerically if there @@ -198,22 +235,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.11/reference/h_mmrm_tmb_extract_cov.html b/v0.3.11/reference/h_mmrm_tmb_extract_cov.html index 4c2f2dda8..5e7fea830 100644 --- a/v0.3.11/reference/h_mmrm_tmb_extract_cov.html +++ b/v0.3.11/reference/h_mmrm_tmb_extract_cov.html @@ -1,7 +1,27 @@ - -Extract covariance matrix from TMB report and input data — h_mmrm_tmb_extract_cov • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,13 +144,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_extract_cov(tmb_report, tmb_data, visit_var, is_spatial)
    -

    Arguments

    -
    tmb_report
    +

    Arguments +

    +
    +
    tmb_report

    (list)
    report created with TMB::MakeADFun() report function.

    @@ -137,9 +168,11 @@

    Arguments -

    Value

    +

    Value +

    Return a simple covariance matrix if there is no grouping, or a named @@ -148,22 +181,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_mmrm_tmb_fit.html b/v0.3.11/reference/h_mmrm_tmb_fit.html index d12785698..54b52e266 100644 --- a/v0.3.11/reference/h_mmrm_tmb_fit.html +++ b/v0.3.11/reference/h_mmrm_tmb_fit.html @@ -1,7 +1,27 @@ - -Build TMB Fit Result List — h_mmrm_tmb_fit • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,13 +144,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_fit(tmb_object, tmb_opt, formula_parts, tmb_data)
    -

    Arguments

    -
    tmb_object
    +

    Arguments +

    +
    +
    tmb_object

    (list)
    created with TMB::MakeADFun().

    @@ -138,12 +169,16 @@

    Argumentsh_mmrm_tmb_data().

    -

    + +
    -

    Value

    +

    Value +

    -

    List of class mmrm_tmb with:

    • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

    • +

      List of class mmrm_tmb with:

      +
        +
      • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

      • beta_est: vector of coefficient estimates.

      • beta_vcov: Variance-covariance matrix for coefficient estimates.

      • beta_vcov_inv_L: Lower triangular matrix L of the inverse variance-covariance matrix decomposition.

      • @@ -158,31 +193,37 @@

        Value

        opt_details: list with optimization details including convergence code.

      • tmb_object: original TMB object created with TMB::MakeADFun().

      • tmb_data: input.

      • -
    + +
    -

    Details

    +

    Details +

    Instead of inverting or decomposing beta_vcov, it can be more efficient to use its robust Cholesky decomposition LDL^T, therefore we return the corresponding two components L and D as well since they have been available on the C++ side already.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_mmrm_tmb_formula_parts.html b/v0.3.11/reference/h_mmrm_tmb_formula_parts.html index f177cce5f..3998de610 100644 --- a/v0.3.11/reference/h_mmrm_tmb_formula_parts.html +++ b/v0.3.11/reference/h_mmrm_tmb_formula_parts.html @@ -1,5 +1,25 @@ - -Processing the Formula for TMB Fit — h_mmrm_tmb_formula_parts • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_formula_parts(
       formula,
       covariance = as.cov_struct(formula, warn_partial = FALSE)
    @@ -121,8 +150,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    Original formula.

    @@ -130,12 +161,16 @@

    Arguments -

    Value

    +

    Value +

    -

    List of class mmrm_tmb_formula_parts with elements:

    • formula: the original input.

    • +

      List of class mmrm_tmb_formula_parts with elements:

      +
        +
      • formula: the original input.

      • model_formula: formula with the covariance term is removed.

      • model_formula: formula with the covariance term removed.

      • full_formula: same as model_formula but includes the covariance @@ -147,25 +182,30 @@

        Value

        subject_var: string with the subject variable name.

      • group_var: string with the group variable name. If no group specified, this element is NULL.

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_mmrm_tmb_parameters.html b/v0.3.11/reference/h_mmrm_tmb_parameters.html index ce8df37da..501134f88 100644 --- a/v0.3.11/reference/h_mmrm_tmb_parameters.html +++ b/v0.3.11/reference/h_mmrm_tmb_parameters.html @@ -1,5 +1,25 @@ - -Start Parameters for TMB Fit — h_mmrm_tmb_parameters • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_parameters(formula_parts, tmb_data, start, n_groups = 1L)
    -

    Arguments

    -
    formula_parts
    +

    Arguments +

    +
    +
    formula_parts

    (mmrm_tmb_formula_parts)
    produced by h_mmrm_tmb_formula_parts().

    @@ -136,9 +167,11 @@

    Arguments -

    Value

    +

    Value +

    List with element theta containing the start values for the variance @@ -146,22 +179,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_newdata_add_pred.html b/v0.3.11/reference/h_newdata_add_pred.html index 53c9cc3bd..eec0b94ce 100644 --- a/v0.3.11/reference/h_newdata_add_pred.html +++ b/v0.3.11/reference/h_newdata_add_pred.html @@ -1,5 +1,25 @@ - -Add Prediction Results to New Data — h_newdata_add_pred • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_newdata_add_pred(x, newdata, se_fit, interval, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fit.

    @@ -139,9 +170,11 @@

    Argumentspredict.mmrm_tmb().

    -

    + +
    -

    Value

    +

    Value +

    The newdata as a tibble with additional columns .fitted, @@ -152,22 +185,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_optimizer_fun.html b/v0.3.11/reference/h_optimizer_fun.html index 95806018a..6188cb941 100644 --- a/v0.3.11/reference/h_optimizer_fun.html +++ b/v0.3.11/reference/h_optimizer_fun.html @@ -1,5 +1,25 @@ - -Obtain Optimizer Function with Character — h_optimizer_fun • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,40 +141,49 @@
    -

    Usage

    +

    Usage +

    h_optimizer_fun(optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"))
    -

    Arguments

    -
    optimizer
    +

    Arguments +

    +
    +
    optimizer

    (character)
    vector of optimizers.

    -
    + +
    -

    Value

    +

    Value +

    A (list)
    of optimizer functions generated from h_partial_fun_args().

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_partial_fun_args.html b/v0.3.11/reference/h_partial_fun_args.html index dc98ef637..09c50a95f 100644 --- a/v0.3.11/reference/h_partial_fun_args.html +++ b/v0.3.11/reference/h_partial_fun_args.html @@ -1,5 +1,25 @@ - -Create Partial Functions — h_partial_fun_args • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_partial_fun_args(fun, ..., additional_attr = list())
    -

    Arguments

    -
    fun
    +

    Arguments +

    +
    +
    fun

    (function)
    to be wrapped.

    @@ -130,16 +161,19 @@

    Arguments -

    Value

    +

    Value +

    Object with S3 class "partial", a function with args attribute (and possibly more attributes from additional_attr).

    -

    Details

    +

    Details +

    This function add args attribute to the original function, and add an extra class partial to the function. args is the argument for the function, and elements in ... will override the existing @@ -147,22 +181,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.11/reference/h_print_aic_list.html b/v0.3.11/reference/h_print_aic_list.html index b7abc3337..dabb196e9 100644 --- a/v0.3.11/reference/h_print_aic_list.html +++ b/v0.3.11/reference/h_print_aic_list.html @@ -1,5 +1,25 @@ - -Printing AIC and other Model Fit Criteria — h_print_aic_list • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,38 +141,46 @@
    -

    Usage

    +

    Usage +

    h_print_aic_list(aic_list, digits = 1)
    -

    Arguments

    -
    aic_list
    +

    Arguments +

    +
    +
    aic_list

    (list)
    list as part of from summary.mmrm().

    digits

    (number)
    number of decimal places used with round().

    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_print_call.html b/v0.3.11/reference/h_print_call.html index 2c5a58872..34ee86828 100644 --- a/v0.3.11/reference/h_print_call.html +++ b/v0.3.11/reference/h_print_call.html @@ -1,5 +1,25 @@ - -Printing MMRM Function Call — h_print_call • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_print_call(call, n_obs, n_subjects, n_timepoints)
    -

    Arguments

    -
    call
    +

    Arguments +

    +
    +
    call

    (call)
    original mmrm() function call.

    @@ -134,25 +165,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.11/reference/h_print_cov.html b/v0.3.11/reference/h_print_cov.html index e67885e13..68a14d4ec 100644 --- a/v0.3.11/reference/h_print_cov.html +++ b/v0.3.11/reference/h_print_cov.html @@ -1,5 +1,25 @@ - -Printing MMRM Covariance Type — h_print_cov • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_print_cov(cov_type, n_theta, n_groups)
    -

    Arguments

    -
    cov_type
    +

    Arguments +

    +
    +
    cov_type

    (string)
    covariance structure abbreviation.

    @@ -130,25 +161,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.11/reference/h_quad_form.html b/v0.3.11/reference/h_quad_form.html index e42350189..6d95312c5 100644 --- a/v0.3.11/reference/h_quad_form.html +++ b/v0.3.11/reference/h_quad_form.html @@ -1,7 +1,27 @@ - -Quadratic Form Calculations — h_quad_form • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,15 +144,18 @@
    -

    Usage

    +

    Usage +

    h_quad_form_vec(vec, center)
     
     h_quad_form_mat(mat, center)
    -

    Arguments

    -
    vec
    +

    Arguments +

    +
    +
    vec

    (numeric)
    interpreted as a row vector.

    @@ -138,34 +169,42 @@

    Arguments -

    Functions

    +

    Functions +

    -
    • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) +

        +
      • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) as a numeric (not a matrix).

      • h_quad_form_mat(): calculates the quadratic form mat %*% center %*% t(mat) as a matrix, the result is square and has dimensions identical to the number of rows in mat.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_reconcile_cov_struct.html b/v0.3.11/reference/h_reconcile_cov_struct.html index 3ab02a827..c2afce210 100644 --- a/v0.3.11/reference/h_reconcile_cov_struct.html +++ b/v0.3.11/reference/h_reconcile_cov_struct.html @@ -1,5 +1,25 @@ - -Reconcile Possible Covariance Structure Inputs — h_reconcile_cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_reconcile_cov_struct(formula = NULL, covariance = NULL)
    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -129,9 +160,11 @@

    Argumentsas.cov_struct(). If no value is provided, a structure is derived from the provided formula.

    -

    + +
    -

    Value

    +

    Value +

    The value covariance if it's provided or a covariance structure @@ -140,22 +173,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_record_all_output.html b/v0.3.11/reference/h_record_all_output.html index 438882c8d..7036dc4db 100644 --- a/v0.3.11/reference/h_record_all_output.html +++ b/v0.3.11/reference/h_record_all_output.html @@ -1,9 +1,29 @@ - - + + + + + +Capture all Output — h_record_all_output • mmrm +Capture all Output — h_record_all_output • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -119,13 +147,16 @@
    -

    Usage

    +

    Usage +

    h_record_all_output(expr, remove = list(), divergence = list())
    -

    Arguments

    -
    expr
    +

    Arguments +

    +
    +
    expr

    (expression)
    to be executed.

    @@ -140,35 +171,44 @@

    Arguments -

    Value

    +

    Value +

    -

    A list containing

    • result: The object returned by expr or list() if an error was thrown.

    • +

      A list containing

      +
        +
      • result: The object returned by expr or list() if an error was thrown.

      • warnings: NULL or a character vector if warnings were thrown.

      • errors: NULL or a string if an error was thrown.

      • messages: NULL or a character vector if messages were produced.

      • divergence: NULL or a character vector if divergence messages were caught.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_register_s3.html b/v0.3.11/reference/h_register_s3.html index aaafab97e..60aec3ee8 100644 --- a/v0.3.11/reference/h_register_s3.html +++ b/v0.3.11/reference/h_register_s3.html @@ -1,9 +1,29 @@ - -Register S3 Method -Register S3 method to a generic. — h_register_s3 • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -119,13 +147,16 @@
    -

    Usage

    +

    Usage +

    h_register_s3(pkg, generic, class, envir = parent.frame())
    -

    Arguments

    -
    pkg
    +

    Arguments +

    +
    +
    pkg

    (string) name of the package name.

    @@ -140,29 +171,35 @@

    Arguments -

    Details

    +

    Details +

    This function is adapted from emmeans:::register_s3_method().

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_residuals_normalized.html b/v0.3.11/reference/h_residuals_normalized.html index b01120637..8f667eddc 100644 --- a/v0.3.11/reference/h_residuals_normalized.html +++ b/v0.3.11/reference/h_residuals_normalized.html @@ -1,5 +1,25 @@ - -Calculate normalized residuals — h_residuals_normalized • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,40 +141,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_normalized(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_residuals_pearson.html b/v0.3.11/reference/h_residuals_pearson.html index c364a581d..e8ae05bf7 100644 --- a/v0.3.11/reference/h_residuals_pearson.html +++ b/v0.3.11/reference/h_residuals_pearson.html @@ -1,5 +1,25 @@ - -Calculate Pearson Residuals — h_residuals_pearson • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,40 +141,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_pearson(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_residuals_response.html b/v0.3.11/reference/h_residuals_response.html index f5e597c68..bc0aedae7 100644 --- a/v0.3.11/reference/h_residuals_response.html +++ b/v0.3.11/reference/h_residuals_response.html @@ -1,5 +1,25 @@ - -Calculate response residuals. — h_residuals_response • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,40 +141,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_response(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_split_control.html b/v0.3.11/reference/h_split_control.html index 062d08a10..5cf225150 100644 --- a/v0.3.11/reference/h_split_control.html +++ b/v0.3.11/reference/h_split_control.html @@ -1,7 +1,27 @@ - -Split Control List — h_split_control • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,44 +144,53 @@
    -

    Usage

    +

    Usage +

    h_split_control(control, ...)
    -

    Arguments

    -
    control
    +

    Arguments +

    +
    +
    control

    (mmrm_control)
    object.

    ...

    additional parameters to update the control object.

    -
    + +
    -

    Value

    +

    Value +

    A list of mmrm_control entries.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_summarize_all_fits.html b/v0.3.11/reference/h_summarize_all_fits.html index 28d57635b..ddf200245 100644 --- a/v0.3.11/reference/h_summarize_all_fits.html +++ b/v0.3.11/reference/h_summarize_all_fits.html @@ -1,5 +1,25 @@ - -Summarizing List of Fits — h_summarize_all_fits • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,40 +141,49 @@
    -

    Usage

    +

    Usage +

    h_summarize_all_fits(all_fits)
    -

    Arguments

    -
    all_fits
    +

    Arguments +

    +
    +
    all_fits

    (list of mmrm_fit or try-error)
    list of fits.

    -
    + +
    -

    Value

    +

    Value +

    List with warnings, messages, log_liks and converged results.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_tbl_confint_terms.html b/v0.3.11/reference/h_tbl_confint_terms.html index 997fb27a2..81fbebcd9 100644 --- a/v0.3.11/reference/h_tbl_confint_terms.html +++ b/v0.3.11/reference/h_tbl_confint_terms.html @@ -1,5 +1,25 @@ - -Extract tibble with Confidence Intervals and Term Names — h_tbl_confint_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,44 +141,53 @@
    -

    Usage

    +

    Usage +

    h_tbl_confint_terms(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fit object.

    ...

    passed to stats::confint(), hence not used at the moment.

    -
    + +
    -

    Value

    +

    Value +

    A tibble with term, conf.low, conf.high columns.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_test_1d.html b/v0.3.11/reference/h_test_1d.html index f2185f4bf..622f6c77b 100644 --- a/v0.3.11/reference/h_test_1d.html +++ b/v0.3.11/reference/h_test_1d.html @@ -1,7 +1,27 @@ - -Creating T-Statistic Test Results For One-Dimensional Contrast — h_test_1d • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,13 +144,16 @@
    -

    Usage

    +

    Usage +

    h_test_1d(object, contrast, df)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -135,31 +166,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val (2-sided p-value).

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_test_md.html b/v0.3.11/reference/h_test_md.html index 92bc6317d..4fc9bd4de 100644 --- a/v0.3.11/reference/h_test_md.html +++ b/v0.3.11/reference/h_test_md.html @@ -1,7 +1,27 @@ - -Creating F-Statistic Test Results For Multi-Dimensional Contrast — h_test_md • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,13 +144,16 @@
    -

    Usage

    +

    Usage +

    h_test_md(object, contrast, df, f_stat_factor = 1)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -137,31 +168,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_tr.html b/v0.3.11/reference/h_tr.html index db2c153c4..3bd723958 100644 --- a/v0.3.11/reference/h_tr.html +++ b/v0.3.11/reference/h_tr.html @@ -1,5 +1,25 @@ - -Trace of a Matrix — h_tr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,40 +141,49 @@
    -

    Usage

    +

    Usage +

    h_tr(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (matrix)
    square matrix input.

    -
    + +
    -

    Value

    +

    Value +

    The trace of the square matrix.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_valid_formula.html b/v0.3.11/reference/h_valid_formula.html index f37482405..a9c78ba46 100644 --- a/v0.3.11/reference/h_valid_formula.html +++ b/v0.3.11/reference/h_valid_formula.html @@ -1,5 +1,25 @@ - -Validate mmrm Formula — h_valid_formula • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,39 +141,48 @@
    -

    Usage

    +

    Usage +

    h_valid_formula(formula)
    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    to check.

    -
    + +
    -

    Details

    +

    Details +

    In mmrm models, . is not allowed as it introduces ambiguity of covariates to be used, so it is not allowed to be in formula.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_var_adj.html b/v0.3.11/reference/h_var_adj.html index a080c2cbb..9164046e0 100644 --- a/v0.3.11/reference/h_var_adj.html +++ b/v0.3.11/reference/h_var_adj.html @@ -1,9 +1,29 @@ - -Obtain the Adjusted Covariance Matrix — h_var_adj • mmrm +Obtain the Adjusted Covariance Matrix — h_var_adj • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -119,13 +147,16 @@
    -

    Usage

    +

    Usage +

    h_var_adj(v, w, p, q, r, linear = FALSE)
    -

    Arguments

    -
    v
    +

    Arguments +

    +
    +
    v

    (matrix)
    unadjusted covariance matrix.

    @@ -148,31 +179,37 @@

    Arguments -

    Value

    +

    Value +

    The matrix of adjusted covariance matrix.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_warn_na_action.html b/v0.3.11/reference/h_warn_na_action.html index ba9c3fc63..12c3ef12e 100644 --- a/v0.3.11/reference/h_warn_na_action.html +++ b/v0.3.11/reference/h_warn_na_action.html @@ -1,5 +1,25 @@ - -Warn on na.action — h_warn_na_action • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,27 +141,32 @@
    -

    Usage

    +

    Usage +

    h_warn_na_action()
    - + +
    -
    + + - - + + diff --git a/v0.3.11/reference/h_within_or_between.html b/v0.3.11/reference/h_within_or_between.html index c1ed1b57f..b5e7f9783 100644 --- a/v0.3.11/reference/h_within_or_between.html +++ b/v0.3.11/reference/h_within_or_between.html @@ -1,7 +1,27 @@ - -Determine Within or Between for each Design Matrix Column — h_within_or_between • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,22 +144,27 @@
    -

    Usage

    +

    Usage +

    h_within_or_between(x_matrix, subject_ids)
    -

    Arguments

    -
    x_matrix
    +

    Arguments +

    +
    +
    x_matrix

    (matrix)
    the design matrix with column names.

    subject_ids

    (factor)
    the subject IDs.

    -
    + +
    -

    Value

    +

    Value +

    Character vector with "intercept", "within" or "between" for each @@ -139,22 +172,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/index.html b/v0.3.11/reference/index.html index 6b6075f7e..182314139 100644 --- a/v0.3.11/reference/index.html +++ b/v0.3.11/reference/index.html @@ -1,5 +1,23 @@ - -Function reference • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +44,8 @@ + - + + - + @@ -107,210 +133,280 @@
    -

    Package

    +

    Package +

    -
    +
    +
    -
    +
    +
    mmrm-package
    -
    mmrm Package
    -
    -

    Functions

    +
    +mmrm Package
    + +
    +
    +

    Functions +

    -
    +
    +
    -
    +
    +
    mmrm()
    Fit an MMRM
    -
    +
    +
    +
    fit_mmrm()
    Low-Level Fitting Function for MMRM
    -
    +
    +
    +
    mmrm_control()
    Control Parameters for Fitting an MMRM
    -
    +
    +
    +
    fit_single_optimizer()
    Fitting an MMRM with Single Optimizer
    -
    +
    +
    +
    refit_multiple_optimizers()
    Refitting MMRM with Multiple Optimizers
    -
    +
    +
    +
    df_1d()
    Calculation of Degrees of Freedom for One-Dimensional Contrast
    -
    +
    +
    +
    df_md()
    Calculation of Degrees of Freedom for Multi-Dimensional Contrast
    -
    +
    +
    +
    component()
    Component Access for mmrm_tmb Objects
    -
    -

    Start Values

    + +
    +
    +

    Start Values +

    -
    +
    +
    -
    +
    +
    std_start()
    Standard Starting Value
    -
    +
    +
    +
    emp_start()
    Empirical Starting Value
    -
    -

    Methods

    + +
    +
    +

    Methods +

    -
    +
    +
    -

    Covariance Structures

    + +
    +
    +

    Covariance Structures +

    -
    +
    +
    -
    +
    +
    cov_struct()
    Define a Covariance Structure
    -
    +
    +
    +
    as.cov_struct()
    Coerce into a Covariance Structure Definition
    -
    +
    +
    +
    format(<cov_struct>)
    Format Covariance Structure Object
    -
    +
    +
    +
    print(<cov_struct>)
    Print a Covariance Structure Object
    -
    +
    +
    +
    cov_types()
    Covariance Types
    -
    -

    Estimate Marginal Means

    + +
    +
    +

    Estimate Marginal Means +

    -
    +
    +
    -
    +
    +
    emmeans_support
    -
    Support for emmeans
    -
    -

    Datasets

    +
    Support for emmeans +
    + +
    +
    +

    Datasets +

    -
    +
    +
    -
    +
    +
    fev_data
    Example Data on FEV1
    -
    +
    +
    +
    bcva_data
    Example Data on BCVA
    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.11/reference/is_infix.html b/v0.3.11/reference/is_infix.html index 73af8a7c1..fd5dbb23c 100644 --- a/v0.3.11/reference/is_infix.html +++ b/v0.3.11/reference/is_infix.html @@ -1,5 +1,25 @@ - -Test Whether a Symbol is an Infix Operator — is_infix • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,49 +141,62 @@
    -

    Usage

    +

    Usage +

    is_infix(name)
    -

    Arguments

    -
    name
    +

    Arguments +

    +
    +
    name

    (symbol or name or string)
    a possible reference to an infix operator to check.

    -
    + +
    -

    Value

    +

    Value +

    A logical indicating whether the name is the name of an infix operator.

    -

    is_infix(as.name("|"))
    +

    +
    +
    is_infix(as.name("|"))
     is_infix("|")
    -is_infix("c")

    +is_infix("c")
    +

    +
    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/mmrm-package.html b/v0.3.11/reference/mmrm-package.html index a131336ac..7a080a2bc 100644 --- a/v0.3.11/reference/mmrm-package.html +++ b/v0.3.11/reference/mmrm-package.html @@ -1,5 +1,25 @@ - -mmrm Package — mmrm-package • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -114,15 +143,23 @@
    -

    See also

    -
    -

    Author

    +

    Author +

    Maintainer: Daniel Sabanes Bove daniel.sabanes_bove@roche.com

    -

    Authors:

    + +
    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/mmrm.html b/v0.3.11/reference/mmrm.html index 681a102ed..a2d6b6945 100644 --- a/v0.3.11/reference/mmrm.html +++ b/v0.3.11/reference/mmrm.html @@ -1,7 +1,27 @@ - -Fit an MMRM — mmrm • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,7 +144,8 @@
    -

    Usage

    +

    Usage +

    mmrm(
       formula,
       data,
    @@ -129,8 +158,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -163,15 +194,18 @@

    Argumentsmmrm_control().

    -

    + +
    -

    Value

    +

    Value +

    An mmrm object.

    -

    Details

    +

    Details +

    The formula typically looks like: FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID) so specifies response and covariates as usual, and exactly one special term @@ -197,15 +231,19 @@

    Detailsmmrm.

    -

    Note

    +

    Note +

    The mmrm object is also an mmrm_fit and an mmrm_tmb object, therefore corresponding methods also work (see mmrm_tmb_methods).

    -

    Additional contents depend on the choice of the adjustment method:

    • If Satterthwaite adjustment is used, the Jacobian information jac_list +

      Additional contents depend on the choice of the adjustment method:

      +
        +
      • If Satterthwaite adjustment is used, the Jacobian information jac_list is included.

      • If Kenward-Roger adjustment is used, kr_comp contains necessary components and beta_vcov_adj includes the adjusted coefficients covariance matrix.

      • -

      Use of the package emmeans is supported, see emmeans_support.

      +
    +

    Use of the package emmeans is supported, see emmeans_support.

    NA values are always omitted regardless of na.action setting.

    When the number of visit levels is large, it usually requires large memory to create the covariance matrix. By default, the maximum allowed visit levels is 100, and if there are more @@ -216,7 +254,8 @@

    Note

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -240,22 +279,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.11/reference/mmrm_control.html b/v0.3.11/reference/mmrm_control.html index 285aad3a5..0b78964e0 100644 --- a/v0.3.11/reference/mmrm_control.html +++ b/v0.3.11/reference/mmrm_control.html @@ -1,9 +1,29 @@ - - + + + + + +Control Parameters for Fitting an MMRM — mmrm_control • mmrm +Control Parameters for Fitting an MMRM — mmrm_control • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -119,7 +147,8 @@
    -

    Usage

    +

    Usage +

    mmrm_control(
       n_cores = 1L,
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within"),
    @@ -133,8 +162,10 @@ 

    Usage

    -

    Arguments

    -
    n_cores
    +

    Arguments +

    +
    +
    n_cores

    (count)
    number of cores to be used.

    @@ -168,15 +199,18 @@

    Argumentsh_get_optimizers().

    -

    + +
    -

    Value

    +

    Value +

    List of class mmrm_control with the control parameters.

    -

    Details

    +

    Details +

    For example, if the data only has observations at visits VIS1, VIS3 and VIS4, by default they are treated to be equally spaced, the distance from VIS1 to VIS3, and from VIS3 to VIS4, are identical. However, you can manually convert this visit into a factor, with @@ -184,14 +218,45 @@

    DetailsVIS1 to VIS3 will be double, as VIS2 is a valid visit. However, please be cautious because this can lead to convergence failure when using an unstructured covariance matrix and there are no observations -at the missing visits.

    + +
    -

    Examples

    +

    Examples +

    mmrm_control(
       optimizer_fun = stats::optim,
       optimizer_args = list(method = "L-BFGS-B")
    @@ -327,22 +394,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.11/reference/mmrm_methods.html b/v0.3.11/reference/mmrm_methods.html index b59bc8362..783cfa70e 100644 --- a/v0.3.11/reference/mmrm_methods.html +++ b/v0.3.11/reference/mmrm_methods.html @@ -1,5 +1,25 @@ - -Methods for mmrm Objects — mmrm_methods • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm
     summary(object, ...)
     
    @@ -130,52 +159,69 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the fitted MMRM including Jacobian and call etc.

    ...

    not used.

    -
    + +
    -

    Value

    +

    Value +

    Depends on the method, see Details and Functions.

    -

    Details

    -

    While printing the summary of (mmrm)
    object, the following will be displayed:

    1. Formula. The formula used in the model.

    2. +

      Details +

      +

      While printing the summary of (mmrm)
      object, the following will be displayed:

      +
        +
      1. Formula. The formula used in the model.

      2. Data. The data used for analysis, including number of subjects, number of valid observations.

      3. Covariance. The covariance structure and number of variance parameters.

      4. Method. Restricted maximum likelihood(REML) or maximum likelihood(ML).

      5. Model selection criteria. AIC, BIC, log likelihood and deviance.

      6. Coefficients. Coefficients of the covariates.

      7. -
      8. Covariance estimate. The covariance estimate(for each group).

        1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available +

        2. +

          Covariance estimate. The covariance estimate(for each group).

          +
            +
          1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available in data will be displayed.

          2. If the covariance structure is spatial, the covariance matrix of two time points with unit distance will be displayed.

          3. -
        3. -

        confint is used to obtain the confidence intervals for the coefficients. +

      + +
    +

    confint is used to obtain the confidence intervals for the coefficients. Please note that this is different from the confidence interval of difference of least square means from emmeans.

    -

    Functions

    +

    Functions +

    -
    • summary(mmrm): summarizes the MMRM fit results.

    • +
        +
      • summary(mmrm): summarizes the MMRM fit results.

      • print(summary.mmrm): prints the MMRM fit summary.

      • confint(mmrm): obtain the confidence intervals for the coefficients.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_tmb_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- mmrm(formula, fev_data)
     # Summary:
    @@ -246,22 +292,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.11/reference/mmrm_tidiers.html b/v0.3.11/reference/mmrm_tidiers.html index a73f49f4e..bf555641f 100644 --- a/v0.3.11/reference/mmrm_tidiers.html +++ b/v0.3.11/reference/mmrm_tidiers.html @@ -1,9 +1,29 @@ - - + + + + + +Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm +Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -119,7 +147,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm
     tidy(x, conf.int = FALSE, conf.level = 0.95, ...)
     
    @@ -138,8 +167,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fitted model.

    @@ -171,21 +202,27 @@

    Argumentsresiduals.mmrm_tmb().

    -

    + +
    -

    Functions

    +

    Functions +

    -
    • tidy(mmrm): derives tidy tibble from an mmrm object.

    • +
        +
      • tidy(mmrm): derives tidy tibble from an mmrm object.

      • glance(mmrm): derives glance tibble from an mmrm object.

      • augment(mmrm): derives augment tibble from an mmrm object.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tmb_methods for additional methods.

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -277,22 +314,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.11/reference/mmrm_tmb_methods.html b/v0.3.11/reference/mmrm_tmb_methods.html index 255c6a626..ec6341c0e 100644 --- a/v0.3.11/reference/mmrm_tmb_methods.html +++ b/v0.3.11/reference/mmrm_tmb_methods.html @@ -1,5 +1,25 @@ - -Methods for mmrm_tmb Objects — mmrm_tmb_methods • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm_tmb
     coef(object, complete = TRUE, ...)
     
    @@ -186,8 +215,10 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM object.

    @@ -273,15 +304,18 @@

    Arguments -

    + +
    -

    Value

    +

    Value +

    Depends on the method, see Functions.

    -

    Details

    +

    Details +

    include argument controls the variables the returned model frame will include. Possible options are "response_var", "subject_var", "visit_var" and "group_var", representing the response variable, subject variable, visit variable or group variable. @@ -289,9 +323,11 @@

    Detailsmodel.matrix.

    -

    Functions

    +

    Functions +

    -
    • coef(mmrm_tmb): obtains the estimated coefficients.

    • +
        +
      • coef(mmrm_tmb): obtains the estimated coefficients.

      • fitted(mmrm_tmb): obtains the fitted values.

      • predict(mmrm_tmb): predict conditional means for new data; optionally with standard errors and confidence or prediction intervals. @@ -325,11 +361,14 @@

        Functions -

        References

        +

        References +

        -
        • Hurvich CM, Tsai C (1989). +

          • Gałecki A, Burzykowski T (2013). +

          +
            +
          • Gałecki A, Burzykowski T (2013). “Linear mixed-effects model.” In Linear mixed-effects models using R, 245--273. Springer.

          • -
    + +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- fit_mmrm(formula, fev_data, weights = rep(1, nrow(fev_data)))
     # Estimated coefficients:
    @@ -3864,22 +3908,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.11/reference/parsnip_add_mmrm.html b/v0.3.11/reference/parsnip_add_mmrm.html index 8f3fb04ae..a73ab3160 100644 --- a/v0.3.11/reference/parsnip_add_mmrm.html +++ b/v0.3.11/reference/parsnip_add_mmrm.html @@ -1,5 +1,25 @@ - -Register mmrm For Use With tidymodels — parsnip_add_mmrm • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -113,45 +142,55 @@
    -

    Usage

    +

    Usage +

    parsnip_add_mmrm(quietly = FALSE)
    -

    Arguments

    -
    quietly
    +

    Arguments +

    +
    +
    quietly

    logical: should progress and error messages be suppressed?

    -
    + +
    -

    Value

    +

    Value +

    A logical value indicating whether registration was successful.

    -

    Details

    +

    Details +

    We can use parsnip::show_model_info("linear_reg") to check the registration with parsnip and thus the wider tidymodels ecosystem.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/position_symbol.html b/v0.3.11/reference/position_symbol.html index d84072d86..a4eee8c33 100644 --- a/v0.3.11/reference/position_symbol.html +++ b/v0.3.11/reference/position_symbol.html @@ -1,9 +1,29 @@ - - + + + + + +Search For the Position of a Symbol — position_symbol • mmrm +Search For the Position of a Symbol — position_symbol • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -119,13 +147,16 @@
    -

    Usage

    +

    Usage +

    position_symbol(x, sym, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (list of language)
    a list of language objects in which to search for a specific symbol.

    @@ -138,9 +169,11 @@

    ArgumentsPosition().

    -

    + +
    -

    Value

    +

    Value +

    The position of the symbol if found, or the nomatch value @@ -148,22 +181,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/print.cov_struct.html b/v0.3.11/reference/print.cov_struct.html index ce76031cc..b486b1de2 100644 --- a/v0.3.11/reference/print.cov_struct.html +++ b/v0.3.11/reference/print.cov_struct.html @@ -1,5 +1,25 @@ - -Print a Covariance Structure Object — print.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,45 +141,54 @@
    -

    Usage

    +

    Usage +

    # S3 method for cov_struct
     print(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    ...

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    x invisibly.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/reexports.html b/v0.3.11/reference/reexports.html index f666b2134..ab26d2b9b 100644 --- a/v0.3.11/reference/reexports.html +++ b/v0.3.11/reference/reexports.html @@ -1,19 +1,39 @@ - - + + + + + +Objects exported from other packages — reexports • mmrm +Objects exported from other packages — reexports • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -38,7 +60,8 @@ + - + + - + @@ -125,30 +153,36 @@

    These objects are imported from other packages. Follow the links below to see their documentation.

    -
    generics
    +
    +
    generics

    augment, glance, tidy

    -
    + + - + +
    -
    + + - - + + diff --git a/v0.3.11/reference/refit_multiple_optimizers.html b/v0.3.11/reference/refit_multiple_optimizers.html index 7a5882eff..12481d571 100644 --- a/v0.3.11/reference/refit_multiple_optimizers.html +++ b/v0.3.11/reference/refit_multiple_optimizers.html @@ -1,5 +1,25 @@ - -Refitting MMRM with Multiple Optimizers — refit_multiple_optimizers • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    refit_multiple_optimizers(fit, ..., control = mmrm_control(...))
    -

    Arguments

    -
    fit
    +

    Arguments +

    +
    +
    fit

    (mmrm_fit)
    original model fit from fit_single_optimizer().

    @@ -130,20 +161,24 @@

    Arguments -

    Value

    +

    Value +

    The best (in terms of log likelihood) fit which converged.

    -

    Note

    +

    Note +

    For Windows, no parallel computations are currently implemented.

    -

    Examples

    +

    Examples +

    fit <- fit_single_optimizer(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data,
    @@ -154,22 +189,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.11/reference/register_on_load.html b/v0.3.11/reference/register_on_load.html index 409d98e6e..ab9297aa7 100644 --- a/v0.3.11/reference/register_on_load.html +++ b/v0.3.11/reference/register_on_load.html @@ -1,5 +1,25 @@ - -Helper Function for Registering Functionality With Suggests Packages — register_on_load • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    register_on_load(
       pkg,
       ver = c(NA_character_, NA_character_),
    @@ -123,8 +152,10 @@ 

    Usage

    -

    Arguments

    -
    pkg
    +

    Arguments +

    +
    +
    pkg

    (string)
    package name.

    @@ -145,9 +176,11 @@

    Arguments -

    Value

    +

    Value +

    A logical (invisibly) indicating whether registration was successful. @@ -155,22 +188,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/std_start.html b/v0.3.11/reference/std_start.html index 16d8a1a18..38f4f860b 100644 --- a/v0.3.11/reference/std_start.html +++ b/v0.3.11/reference/std_start.html @@ -1,5 +1,25 @@ - -Standard Starting Value — std_start • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    std_start(cov_type, n_visits, n_groups, ...)
    -

    Arguments

    -
    cov_type
    +

    Arguments +

    +
    +
    cov_type

    (string)
    name of the covariance structure.

    @@ -134,15 +165,18 @@

    Arguments -

    Value

    +

    Value +

    A numeric vector of starting values.

    -

    Details

    +

    Details +

    std_start will try to provide variance parameter from identity matrix. However, for ar1 and ar1h the corresponding values are not ideal because the \(\rho\) is usually a positive number thus using 0 as starting value can lead to @@ -150,22 +184,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.11/reference/tmb_cov_type.html b/v0.3.11/reference/tmb_cov_type.html index 35866e858..e24e0792a 100644 --- a/v0.3.11/reference/tmb_cov_type.html +++ b/v0.3.11/reference/tmb_cov_type.html @@ -1,5 +1,25 @@ - -Produce A Covariance Identifier Passing to TMB — tmb_cov_type • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,40 +141,49 @@
    -

    Usage

    +

    Usage +

    tmb_cov_type(cov)
    -

    Arguments

    -
    cov
    +

    Arguments +

    +
    +
    cov

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    A string used for method dispatch when passed to TMB.

    + +
    -
    + + - - + + diff --git a/v0.3.11/reference/validate_cov_struct.html b/v0.3.11/reference/validate_cov_struct.html index 86aa3ebce..784443588 100644 --- a/v0.3.11/reference/validate_cov_struct.html +++ b/v0.3.11/reference/validate_cov_struct.html @@ -1,5 +1,25 @@ - -Validate Covariance Structure Data — validate_cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,40 +141,49 @@
    -

    Usage

    +

    Usage +

    validate_cov_struct(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    x if successful, or an error is thrown otherwise.

    + +
    -
    + + - - + + diff --git a/v0.3.12/404.html b/v0.3.12/404.html index 53e7e3670..43d181779 100644 --- a/v0.3.12/404.html +++ b/v0.3.12/404.html @@ -1,5 +1,4 @@ - - + @@ -82,11 +81,10 @@ Changelog +v0.2.2 + + - + + - + @@ -111,46 +137,66 @@

    Thank you for your interest in contributing to this repo! Your contribution is highly valued. Please go through this document for guidance on how to contribute.

    -

    Programming conventions

    +

    Programming conventions +

    Please follow the programming conventions to ensure a consistent programming style across the package.

    Generally we follow the tidyverse style guide. Some specific conventions that deviate from this are explained below.

    -

    Functions

    -
    1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
    2. +

      Functions +

      +
        +
      1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
      2. Functions starting with h_ are helper functions and they should not be exported.
      3. Functions should be well documented using roxygen2 (even when they are not exported).
      4. Functions must be unit tested (even when they are not exported).
      5. -
    + +
    -

    Imports

    +

    Imports +

    In package mmrm, we follow the following convention in package imports.

    -
    1. When only a few functions from another package are needed: -
      1. In DESCRIPTION, add that package into Imports.
      2. +
          +
        1. When only a few functions from another package are needed: +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we add a importFrom with a single function from the package. -
            1. The function imported can be any random function within the package.
            2. -
          3. +
              +
            1. The function imported can be any random function within the package.
            2. +
            +
          4. Always use package::function style wherever you need to use the function.
          5. Example: stats.
          6. -
        2. +
        +
      3. When many functions from another package are needed: -
        1. In DESCRIPTION, add that package into Imports.
        2. +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we use a import to import every function.
          3. Use the functions directly without prefix.
          4. Example: checkmate.
          5. -
          -
    + + + +
    -

    Comments

    -
    • Comments should always follow sentence style.
    • +

      Comments +

      +
        +
      • Comments should always follow sentence style.
      • Comments should be as minimal as possible: Generally the code and variable names should be clear enough to not need any comments. Only use them when needed and explain the “Why” and not the “What”.
      • -
    + +
    -

    Documentation

    -
    • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

    • +

      Documentation +

      +
        +
      • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

      • Exported objects must have a lifecycle badge to clarify the maturity.

        -
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • -
      • +
          +
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • +
        +
      • Use Title Style for the title of the documentation.

      • Always include a @description part with at least one sentence describing the object.

      • @@ -162,38 +208,55 @@

        Documentationwebsite.

      • In vignettes, you cannot directly reference help pages but only pkgdown web pages. Note that this includes only exported objects. To make it look similar to the help page references, please here also use function() style.

      • mmrm_review_methods.Rmd is a large vignette and we precompute this vignette to make the GitHub actions faster. Run the script vignettes/precompile.R to regenerate the precomputed vignette and subsequently update it in GitHub. Before every release we need to run this again. Please note you need to install the package and then compile the vignette because efficiency is better after installation to provide a fair comparison.

      • -
    + +
    -

    Github conventions

    +

    Github conventions +

    When using GitHub to collaborate, the following conventions are needed:

    -
    1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. -
      • If you are going to work on this issue, please assign yourself.
      • -
    2. +
        +
      1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. +
          +
        • If you are going to work on this issue, please assign yourself.
        • +
        +
      2. Please create a branch in the mmrm repository, instead of creating forks, unless you are not yet a team member. -
        • Branches should be associated with a GitHub issue and linked to an issue id.
        • +
            +
          • Branches should be associated with a GitHub issue and linked to an issue id.
          • The name of a branch should be of the form: <issue_id>_<short_discription>.
          • -
          +
        +
      3. Add changes to the branch and push it to GitHub. -
        • Please use clear commit messages.
        • +
            +
          • Please use clear commit messages.
          • Please keep your changes focused on the issue. If there are independent changes, please separate it into another PR linking to another issue.
          • -
          +
        +
      4. Please create a Pull Request when you think your code changes are ready: -
        • Functions are well documented.
        • +
            +
          • Functions are well documented.
          • Functions have corresponding unit tests.
          • Changes pass all the GitHub action checks.
          • The checklist in the corresponding issue is completed.
          • -
          +
        +
      5. Address all the comments you receive. -
        • at least one approval is needed to merge.
        • -
      6. -
    +
      +
    • at least one approval is needed to merge.
    • +
    + + +
    -

    Contribution tips

    +

    Contribution tips +

    -

    Development environment Set-up

    +

    Development environment Set-up +

    The development this mmrm package is based on the latest R version and C++ compilers. The package dependencies are the most recent versions from CRAN. We recommend that your working environment is set up in the same way. Additionally, there are some tools we recommend you to install:

    -
    1. +
        +
      1. RTools if you work on a Windows operating system. Alternatively you can use docker to separate the operating system and the development system.
      2. GitKraken is a very useful user interface for git including visualization of git commit graphs, file history, etc.
      3. @@ -201,43 +264,82 @@

        Development environment Set-uplintr will allow you to perform static code analysis.
      4. pre-commit is a Python module that allows you to identify issues before you commit locally.
      5. -

    + +
    -

    Issue labels

    +

    Issue labels +

    The issues are categorized with several labels:

    - +
    Label name
    ++++ + + - + + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + -
    Label name Description
    SPx
    SPx SP (story points) indicate complexity, and the larger the subsequent number, the more time consuming the issue is expected to be
    priority
    priority Issues with this label should be completed with higher priority
    good first issue
    good first issue Good choices for new team members
    blocked
    blocked Blocked by other issues
    bug
    bug Something isn’t working
    devops
    devops Development and Operation
    discussion
    discussion Discussion needed
    documentation
    documentation Improvement of documentation is needed
    duplicate
    duplicate The issue already exists
    enhancement
    enhancement New feature or request
    help wanted
    help wanted Extra attention is needed
    invalid
    invalid This doesn’t seem right
    question
    question Further information needed

    Please choose an issue based on your interest, issue complexity, and priority.

    + + + +

    Please choose an issue based on your interest, issue complexity, and priority.

    -

    Add new unit tests

    +

    Add new unit tests +

    To add a new unit test, you need to first identify the test scope. Does the test fit in the scope of existing tests? If so, please modify the existing test files under tests/testthat/ folder or src/ folder, depending on whether the code to be tested is R or C++. Otherwise please create a new test file, with a name prefix of “test-”.

    In each test case, use the following structure:

    @@ -250,19 +352,25 @@ 

    Add new unit tests -

    Add integration tests

    +

    Add integration tests +

    Integration tests compare the results of SAS and R and assures the quality of our code. To add an integration test, you need to do the following:

    -
    1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
    2. +
        +
      1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
      2. Save the results in .txt format in the design/SAS/ folder.
      3. Decide the key outputs that are needed for comparison.
      4. Add a unit test verifying that the R implementation of the same model has the same results (conversion may be needed).
      5. -
    + +
    -

    Get started with C++

    +

    Get started with C++ +

    If you have no experience with C++, it is totally fine: TMB has provided us with many high-level functionalities that is very similar to R. Here we only list the most important things that you need to go through before you begin C++ programming.

    -
    1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
    2. +
        +
      1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
      2. Types. C++ is a strong type programming language and all objects need to be declared with type. Sometimes you can combine the declaration and definition. -
        1. +
            +
          1. int i = 1; This works, as we declare i as int and define it to be 1.
          2. i = 1; This fails, because i is not declared yet.
          3. @@ -270,53 +378,70 @@

            Get started with C++
          4. in R, if (TRUE) { a = '123' }; print(a) is legal.
          5. +
              +
            1. in R, if (TRUE) { a = '123' }; print(a) is legal.
            2. in C++, if (1) {string a = '123'}; std::stdout << a << std::endl; is illegal, because object a is terminated already.
            3. in C++, string a; if (1) {a = '123'}; std::stdout << a << std::endl; is legal, a is declared prior to if statement.
            4. -
            +

          +
        2. Polymorphism. Unlike in R, where function arguments have no explicitly defined types, in C++ the type of each argument of a function must be pre-specified. -
          1. +
              +
            1. Template is a special function that works with generic argument type. We could imagine a single function that could work on arguments of arbitrary type, and template functions make this possible through separation of function logic from the argument declaration. In this way we can use template functions and avoid the need to replicate the whole code for each type.
            2. -
          2. -

          With these points in mind, you are about ready to go.

          +
        +
      3. +
      +

      With these points in mind, you are about ready to go.

    -

    Get started with TMB

    +

    Get started with TMB +

    In mmrm we are not including any latent variables and so the Laplace approximation aspect of TMB is not used. We only use the automatic differentiation part of TMB. For detailed documentation of TMB, visit the TMB reference.

    One important feature of TMB are the R style matrix/array calculations. This is important because we mainly use this part to conduct our calculations. See matrix_arrays.cpp for examples.

    -

    Add a new covariance structure

    +

    Add a new covariance structure +

    To add a new covariance structure, you need to do the following:

    -
    1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
    2. +
        +
      1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
      2. Implement the covariance structure on the C++ side and the corresponding R interface.
      3. Add unit tests to make sure the new covariance structure is working as expected.
      4. Add integration tests under design/SAS/ folder to make sure SAS and R produce similar results (within tolerance).
      5. -
    + +
    -

    Add additional data

    +

    Add additional data +

    To add additional data to mmrm, please follow the next steps:

    -
    1. Make sure the data is needed.
    2. +
        +
      1. Make sure the data is needed.
      2. Document the data in R/data.R.
      3. Use save to create an rda data only containing this dataset. Here the function usethis::use_data can also be helpful.
      4. -
    + +
    -

    Communications within team

    +

    Communications within team +

    There are several communication channels, please use appropriate ones.

    -

    GitHub

    +

    GitHub +

    GitHub issues and pull requests are where implementations are discussed and reviewed. Feature requests, bugs, enhancements, technical implementations can be discussed here. When you have ideas that needs to be documented, it is better to have them in GitHub.

    -

    Slack

    +

    Slack +

    Slack is a messaging tool and we have the mmrm channel under the rinpharma space. You can put anything in the slack channel, e.g., you have completed a issue and are waiting for review, or you have some questions and don’t want to wait until the next stand-up meeting.

    To join the slack channel, please make sure you have a slack account, and send the email address to any team member.

    -

    Stand-up meetings

    +

    Stand-up meetings +

    We have stand-up meetings currently three times a week. The purpose of stand-up meetings is for team members to discuss the current work progress and raise any issue/questions for team discussion if needed.

    You don’t need to join all three meetings.

    @@ -324,7 +449,8 @@

    Stand-up meetings

    + + + + - - + + diff --git a/v0.3.12/PULL_REQUEST_TEMPLATE.html b/v0.3.12/PULL_REQUEST_TEMPLATE.html index 27a04314e..3c17f8154 100644 --- a/v0.3.12/PULL_REQUEST_TEMPLATE.html +++ b/v0.3.12/PULL_REQUEST_TEMPLATE.html @@ -1,5 +1,23 @@ - -Description • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +44,8 @@ + - + + - + @@ -112,7 +138,8 @@ - + +
    -
    + + - - + + diff --git a/v0.3.12/articles/algorithm.html b/v0.3.12/articles/algorithm.html index bf3bcd742..80a54f105 100644 --- a/v0.3.12/articles/algorithm.html +++ b/v0.3.12/articles/algorithm.html @@ -1,5 +1,4 @@ - - + @@ -84,11 +83,10 @@ Changelog +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + - + + - + @@ -110,60 +136,86 @@

    Introduction

    -
    Package Introduction
    +
    +
    Package Introduction
    -
    Mixed Models for Repeated Measures
    + +
    Mixed Models for Repeated Measures
    -
    Comparison with other software
    + +
    Comparison with other software
    -
    + +
    +

    Covariance Structures

    -
    Covariance Structures
    +
    +
    Covariance Structures
    -
    + + + + + + + + + + + + + + + + +
    -
    + + - - + + diff --git a/v0.3.12/articles/introduction.html b/v0.3.12/articles/introduction.html index 3279805d8..fdf398892 100644 --- a/v0.3.12/articles/introduction.html +++ b/v0.3.12/articles/introduction.html @@ -1,5 +1,4 @@ - - + @@ -84,11 +83,10 @@ Changelog +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + - + + - + @@ -109,7 +135,8 @@

    Authors

    -
    • +
        +
      • Daniel Sabanes Bove. Author, maintainer.

      • @@ -181,7 +208,8 @@

        Authors

        AstraZeneca plc. Copyright holder, funder.

        -
    + +

    Citation

    @@ -200,7 +228,8 @@

    Citation

    }
    + +
    -
    + + - - + + diff --git a/v0.3.12/index.html b/v0.3.12/index.html index 5d699658f..a5c2309d4 100644 --- a/v0.3.12/index.html +++ b/v0.3.12/index.html @@ -1,5 +1,4 @@ - - + @@ -84,11 +83,10 @@ Changelog +v0.2.2 + + - + + - + @@ -108,64 +134,102 @@
    -

    mmrm 0.3.12

    CRAN release: 2024-06-26

    +

    mmrm 0.3.12 +

    +

    CRAN release: 2024-06-26

    -

    New Features

    -
    • Add parameter conditional for predict method to control whether the prediction is conditional on the observation or not.
    • -
    +

    New Features +

    +
      +
    • Add parameter conditional for predict method to control whether the prediction is conditional on the observation or not.
    • +
    +
    -

    Bug Fixes

    -
    • Previously if the left hand side of a model formula is an expression, predict and simulate will fail. This is fixed now.
    • -
    +

    Bug Fixes +

    +
      +
    • Previously if the left hand side of a model formula is an expression, predict and simulate will fail. This is fixed now.
    • +
    +
    -

    mmrm 0.3.11

    CRAN release: 2024-03-05

    +

    mmrm 0.3.11 +

    +

    CRAN release: 2024-03-05

    -

    Bug Fixes

    -
    • Previously if a secondary optimizer fails mmrm will fail. This is fixed now.
    • +

      Bug Fixes +

      +
        +
      • Previously if a secondary optimizer fails mmrm will fail. This is fixed now.
      • Previously character covariate variables will make Anova fail. This is fixed now.
      • -
    + +
    -

    mmrm 0.3.10

    CRAN release: 2024-01-26

    +

    mmrm 0.3.10 +

    +

    CRAN release: 2024-01-26

    -

    Miscellaneous

    -
    • Fix internal test skipping functions for MacOS R.
    • -
    +

    Miscellaneous +

    +
      +
    • Fix internal test skipping functions for MacOS R.
    • +
    +
    -

    mmrm 0.3.9

    CRAN release: 2024-01-25

    +

    mmrm 0.3.9 +

    +

    CRAN release: 2024-01-25

    -

    Miscellaneous

    -
    • Fix internal test skipping functions for R versions older than 4.3.
    • -
    +

    Miscellaneous +

    +
      +
    • Fix internal test skipping functions for R versions older than 4.3.
    • +
    +
    -

    mmrm 0.3.8

    CRAN release: 2024-01-24

    +

    mmrm 0.3.8 +

    +

    CRAN release: 2024-01-24

    -

    New Features

    -
    • +

      New Features +

      +
        +
      • Anova is implemented for mmrm models and available upon loading the car package. It supports type II and III hypothesis testing.
      • The argument start for mmrm_control() is updated to allow better choices of initial values.
      • confint on mmrm models will give t-based confidence intervals now, instead of the normal approximation.
      • -
    + +
    -

    Bug Fixes

    -
    • Previously if the first optimizer failed, the best successful fit among the remaining optimizers was not returned correctly. This is fixed now.
    • -
    +

    Bug Fixes +

    +
      +
    • Previously if the first optimizer failed, the best successful fit among the remaining optimizers was not returned correctly. This is fixed now.
    • +
    +
    -

    Miscellaneous

    -
    • In documentation of mmrm_control(), the allowed vcov definition is corrected to “Empirical-Jackknife” (CR3), and “Empirical-Bias-Reduced” (CR2).
    • +

      Miscellaneous +

      +
        +
      • In documentation of mmrm_control(), the allowed vcov definition is corrected to “Empirical-Jackknife” (CR3), and “Empirical-Bias-Reduced” (CR2).
      • Fixed a compiler warning related to missing format specification.
      • If an empty contrast matrix is provided to df_md, it will return statistics with NA values.
      • -
    + +
    -

    mmrm 0.3.7

    CRAN release: 2023-12-08

    +

    mmrm 0.3.7 +

    +

    CRAN release: 2023-12-08

    -

    New Features

    -
    • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
    • +

      New Features +

      +
        +
      • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
      • Add empirical, empirical Jackknife and empirical bias-reduced adjusted coefficients covariance estimates, which can be specified via the new vcov argument of mmrm().
      • Add residual and between-within degrees of freedom methods.
      • Add Kenward-Roger support for spatial covariance structures.
      • @@ -176,61 +240,87 @@

        New FeaturesAdd tidy(), glance() and augment() methods to tidy the fit results into summary tables.
      • Add tidymodels framework support via a parsnip interface.
      • Add argument covariance to mmrm() to allow for easier programmatic access to specifying the model’s covariance structure and to expose covariance customization through the tidymodels interface.
      • -

    + +
    -

    Bug Fixes

    -
    • Previously mmrm() follows the global option na.action and if it is set other than "na.omit" an assertion would fail. This is now fixed and hence NA values are always removed prior to model fitting, independent of the global na.action option.
    • +

      Bug Fixes +

      +
        +
      • Previously mmrm() follows the global option na.action and if it is set other than "na.omit" an assertion would fail. This is now fixed and hence NA values are always removed prior to model fitting, independent of the global na.action option.
      • Previously a model.frame() call on an mmrm object with transformed terms, or new data, e.g. model.frame(mmrm(Y ~ log(X) + ar1(VISIT|ID), data = new_data), would fail. This is now fixed.
      • Previously mmrm() always required a data argument. Now fitting mmrm can also use environment variables instead of requiring data argument. (Note that fit_mmrm is not affected.)
      • Previously emmeans() failed when using transformed terms or not including the visit variable in the model formula. This is now fixed.
      • Previously mmrm() might provide non-finite values in the Jacobian calculations, leading to errors in the Satterthwaite degrees of freedom calculations. This will raise an error now and thus alert the user that the model fit was not successful.
      • -
    + +
    -

    Miscellaneous

    -
    • Use automatic differentiation to calculate Satterthwaite adjusted degrees of freedom, resulting in 10-fold speed-up of the Satterthwaite calculations after the initial model fit.
    • +

      Miscellaneous +

      +
        +
      • Use automatic differentiation to calculate Satterthwaite adjusted degrees of freedom, resulting in 10-fold speed-up of the Satterthwaite calculations after the initial model fit.
      • Add an interactive confirmation step if the number of visit levels is too large for non-spatial covariance structures. Use options(mmrm.max_visits = ) to specify the maximum number of visits allowed in non-interactive mode.
      • Removed free_cores() in favor of parallelly::availableCores(omit = 1).
      • The model.frame() method has been updated: The full argument is deprecated and the include argument can be used instead; by default all relevant variables are returned. Furthermore, it returns a data.frame the size of the number of observations utilized in the model for all combinations of the include argument when na.action= "na.omit".
      • Overall, seven vignettes have been added to the package. All vignettes have a slightly different look now to reduce the size of the overall R package on CRAN.
      • The used optimizer is now available via component(., "optimizer") instead of previously attr(., "optimizer").
      • -
    + +
    -

    mmrm 0.2.2

    CRAN release: 2022-12-20

    +

    mmrm 0.2.2 +

    +

    CRAN release: 2022-12-20

    -

    New Features

    -
    • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
    • +

      New Features +

      +
        +
      • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
      • Update the mmrm arguments to allow users more fine-grained control, e.g. mmrm(..., start = start, optimizer = c("BFGS", "nlminb")) to set the starting values for the variance estimates and to choose the available optimizers. These arguments will be passed to the new function mmrm_control.
      • Add new argument drop_visit_levels to allow users to keep all levels in visits, even when they are not observed in the data. Dropping unobserved levels was done silently previously, and now a message will be given. See ?mmrm_control for more details.
      • -
    + +
    -

    Bug Fixes

    -
    • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
    • +

      Bug Fixes +

      +
        +
      • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
      • Previously in mmrm calls, the weights object in the environment where the formula is defined was replaced by the weights used internally. Now this behavior is removed and your variable weights e.g. in the global environment will no longer be replaced.
      • -
    + +
    -

    Miscellaneous

    -
    • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
    • +

      Miscellaneous +

      +
        +
      • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
      • Deprecated optimizer = "automatic" in favor of not specifying the optimizer. By default, all remaining optimizers will be tried if the first optimizer fails to reach convergence.
      • -
    + +
    -

    mmrm 0.1.5

    CRAN release: 2022-10-18

    -
    • First CRAN version of the package.
    • +

      mmrm 0.1.5 +

      +

      CRAN release: 2022-10-18

      +
        +
      • First CRAN version of the package.
      • The package fits mixed models for repeated measures (MMRM) based on the marginal linear model without random effects.
      • The motivation for this package is to have a fast, reliable (in terms of convergence behavior) and feature complete implementation of MMRM in R.
      • -
      -

      New Features

      -
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • +
      +
      +

      New Features +

      +
        +
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • Fast C++ implementation of Maximum Likelihood (ML) and Restricted Maximum Likelihood (REML) estimation.
      • Currently Satterthwaite adjusted degrees of freedom calculation is supported.
      • Interface to the emmeans package for computing estimated marginal means (also called least-square means) for the coefficients.
      • Multiple optimizers are run to reach convergence in as many cases as possible.
      • Flexible formula based model specification and support for standard S3 methods such as summary, logLik, etc.
      • -
      +
    +
    + + + + - - + + diff --git a/v0.3.12/reference/Anova.mmrm.html b/v0.3.12/reference/Anova.mmrm.html index 285d5d0b6..51063967e 100644 --- a/v0.3.12/reference/Anova.mmrm.html +++ b/v0.3.12/reference/Anova.mmrm.html @@ -1,5 +1,25 @@ - -Conduct type II/III hypothesis testing on the MMRM fit results. — Anova.mmrm • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    Anova.mmrm(
       mod,
       type = c("II", "III", "2", "3"),
    @@ -123,8 +152,10 @@ 

    Usage

    -

    Arguments

    -
    mod
    +

    Arguments +

    +
    +
    mod

    (mmrm)
    the fitted MMRM.

    @@ -139,16 +170,19 @@

    Arguments -

    Details

    +

    Details +

    Anova will return anova object with one row per variable and columns Num Df(numerator degrees of freedom), Denom Df(denominator degrees of freedom), F Statistic and Pr(>=F).

    + + + + - - + + diff --git a/v0.3.12/reference/COV_TYPES.html b/v0.3.12/reference/COV_TYPES.html index 591ab8490..5a42b8dfe 100644 --- a/v0.3.12/reference/COV_TYPES.html +++ b/v0.3.12/reference/COV_TYPES.html @@ -1,5 +1,25 @@ - -Covariance Type Database — COV_TYPES • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,14 +141,17 @@
    -

    Usage

    +

    Usage +

    COV_TYPES
    -

    Format

    +

    Format +

    A data frame with 5 variables and one record per covariance type:

    -
    name
    +
    +
    name

    The long-form name of the covariance structure type

    abbr
    @@ -139,10 +170,12 @@

    Format<

    A logical value indicating whether the covariance structure is spatial.

    -

    + + + +
    -
    + + - - + + diff --git a/v0.3.12/reference/as.cov_struct.html b/v0.3.12/reference/as.cov_struct.html index 5949e8b39..b7a42e776 100644 --- a/v0.3.12/reference/as.cov_struct.html +++ b/v0.3.12/reference/as.cov_struct.html @@ -1,5 +1,25 @@ - -Coerce into a Covariance Structure Definition — as.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    as.cov_struct(x, ...)
     
     # S3 method for formula
    @@ -121,8 +150,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    an object from which to derive a covariance structure. See object specific sections for details.

    @@ -135,44 +166,66 @@

    Arguments -

    Value

    +

    Value +

    A cov_struct() object.

    -

    Details

    +

    Details +

    A covariance structure can be parsed from a model definition formula or call. Generally, covariance structures defined using non-standard evaluation take the following form:

    -

    type( (visit, )* visit | (group /)? subject )

    +

    +
    +
    type( (visit, )* visit | (group /)? subject )
    +

    +

    For example, formulas may include terms such as

    -

    us(time | subject)
    +

    +
    +
    us(time | subject)
     cp(time | group / subject)
    -sp_exp(coord1, coord2 | group / subject)

    +sp_exp(coord1, coord2 | group / subject)
    +

    +

    Note that only sp_exp (spatial) covariance structures may provide multiple coordinates, which identify the Euclidean distance between the time points.

    -

    Methods (by class)

    +

    Methods (by class) +

    -
    • as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be +

        +
      • +

        as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be covariance structure definitions and must follow the form:

        -

        y ~ xs + type( (visit, )* visit | (group /)? subject )

        +

        +
        +
        y ~ xs + type( (visit, )* visit | (group /)? subject )
        +

        +

        Any component on the right hand side of a formula is considered when -searching for a covariance definition.

      • -
    +searching for a covariance definition.

    + + +
    -

    See also

    +

    See also +

    Other covariance types: cov_struct(), covariance_types

    -

    Examples

    +

    Examples +

    # provide a covariance structure as a right-sided formula
     as.cov_struct(~ csh(visit | group / subject))
     #> <covariance structure>
    @@ -192,7 +245,8 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.12/reference/bcva_data.html b/v0.3.12/reference/bcva_data.html index e8c1176da..34b4e0f33 100644 --- a/v0.3.12/reference/bcva_data.html +++ b/v0.3.12/reference/bcva_data.html @@ -1,5 +1,25 @@ - -Example Data on BCVA — bcva_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,33 +141,41 @@
    -

    Usage

    +

    Usage +

    bcva_data
    -

    Format

    -

    A tibble with 10,000 rows and 7 variables:

    • USUBJID: subject ID.

    • +

      Format +

      +

      A tibble with 10,000 rows and 7 variables:

      +
        +
      • USUBJID: subject ID.

      • VISITN: visit number (numeric).

      • AVISIT: visit number (factor).

      • ARMCD: treatment, TRT or CTL.

      • RACE: 3-category race.

      • BCVA_BL: BCVA at baseline.

      • BCVA_CHG: Change in BCVA at study visits.

      • -
    + +
    -

    Source

    +

    Source +

    This is an artificial dataset.

    -

    Note

    +

    Note +

    Measurements of BCVA (best corrected visual acuity) is a measure of how how many letters a person can read off of an eye chart using corrective lenses or contacts. This a common endpoint in ophthalmology trials.

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/cached_mmrm_results.html b/v0.3.12/reference/cached_mmrm_results.html index 4a04331ba..3a93b106f 100644 --- a/v0.3.12/reference/cached_mmrm_results.html +++ b/v0.3.12/reference/cached_mmrm_results.html @@ -1,5 +1,25 @@ - -Cache Data for mmrm Model Comparison — cached_mmrm_results • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,25 +141,32 @@
    -

    Usage

    +

    Usage +

    cached_mmrm_results
    -

    Format

    -

    A list with following elements:

    • conv_time_fev: Convergence time on FEV data.

    • +

      Format +

      +

      A list with following elements:

      +
        +
      • conv_time_fev: Convergence time on FEV data.

      • conv_time_bcva: Convergence time on BCVA data.

      • rel_diff_ests_tbl_fev: Relative difference in estimates on FEV data.

      • rel_diff_ests_tbl_bcva: Relative difference in estimates on BCVA data.

      • conv_rate: Convergence rate on data with different missing levels.

      • df_missingness: Summary of missingness on simulated data.

      • -
    + +
    -

    Source

    +

    Source +

    This is created based on simulations on FEV data and BCVA data.

    -

    Note

    +

    Note +

    The cached data for comparison is used for the vignettes generation. Please make sure that this data is refreshed before each package release by running the script data-raw/mmrm_review.R. @@ -140,7 +175,8 @@

    Note

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/car_add_mmrm.html b/v0.3.12/reference/car_add_mmrm.html index 644a0b704..e0d0ffdb8 100644 --- a/v0.3.12/reference/car_add_mmrm.html +++ b/v0.3.12/reference/car_add_mmrm.html @@ -1,5 +1,25 @@ - -Register mmrm For Use With car::Anova — car_add_mmrm • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -113,25 +142,31 @@
    -

    Usage

    +

    Usage +

    car_add_mmrm(quietly = FALSE)
    -

    Arguments

    -
    quietly
    +

    Arguments +

    +
    +
    quietly

    logical: should progress and error messages be suppressed?

    -
    + +
    -

    Value

    +

    Value +

    A logical value indicating whether registration was successful.

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/check_package_version.html b/v0.3.12/reference/check_package_version.html index 6c6dfcffc..bed6ce865 100644 --- a/v0.3.12/reference/check_package_version.html +++ b/v0.3.12/reference/check_package_version.html @@ -1,5 +1,25 @@ - -Check Suggested Dependency Against Version Requirements — check_package_version • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    check_package_version(pkg, ver = c(NA_character_, NA_character_))
    -

    Arguments

    -
    pkg
    +

    Arguments +

    +
    +
    pkg

    (string)
    package name.

    @@ -129,9 +160,11 @@

    Arguments -

    Value

    +

    Value +

    A logical (invisibly) indicating whether the loaded package meets @@ -139,7 +172,8 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/component.html b/v0.3.12/reference/component.html index ca17e73f9..7be2f2600 100644 --- a/v0.3.12/reference/component.html +++ b/v0.3.12/reference/component.html @@ -1,5 +1,25 @@ - -Component Access for mmrm_tmb Objects — component • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    component(
       object,
       name = c("cov_type", "subject_var", "n_theta", "n_subjects", "n_timepoints", "n_obs",
    @@ -125,24 +154,31 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    name

    (character)
    the component(s) to be retrieved.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding component of the object, see details.

    -

    Details

    -

    Available component() names are as follows:

    • call: low-level function call which generated the model.

    • +

      Details +

      +

      Available component() names are as follows:

      +
    + +
    -

    See also

    +

    See also +

    In the lme4 package there is a similar function getME().

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -3083,7 +3122,8 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.12/reference/cov_struct.html b/v0.3.12/reference/cov_struct.html index 86c429a2b..b28e5f2cd 100644 --- a/v0.3.12/reference/cov_struct.html +++ b/v0.3.12/reference/cov_struct.html @@ -1,5 +1,25 @@ - -Define a Covariance Structure — cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    cov_struct(
       type = cov_types(),
       visits,
    @@ -124,8 +153,10 @@ 

    Usage

    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    the name of the covariance structure type to use. For available options, see cov_types(). If a type abbreviation is used that implies heterogeneity (e.g. cph) and no value is provided to @@ -151,22 +182,26 @@

    Arguments -

    Value

    +

    Value +

    A cov_struct object.

    -

    See also

    +

    See also +

    Other covariance types: as.cov_struct(), covariance_types

    -

    Examples

    +

    Examples +

    cov_struct("csh", "AVISITN", "USUBJID")
     #> <covariance structure>
     #> heterogeneous compound symmetry:
    @@ -183,7 +218,8 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.12/reference/cov_type_abbr.html b/v0.3.12/reference/cov_type_abbr.html index c94becd5c..c89b6a7f4 100644 --- a/v0.3.12/reference/cov_type_abbr.html +++ b/v0.3.12/reference/cov_type_abbr.html @@ -1,5 +1,25 @@ - -Retrieve Associated Abbreviated Covariance Structure Type Name — cov_type_abbr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,26 +141,32 @@
    -

    Usage

    +

    Usage +

    cov_type_abbr(type)
    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    either a full name or abbreviate covariance structure type name to collapse into an abbreviated type.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding abbreviated covariance type name.

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/cov_type_name.html b/v0.3.12/reference/cov_type_name.html index f2b339582..525859886 100644 --- a/v0.3.12/reference/cov_type_name.html +++ b/v0.3.12/reference/cov_type_name.html @@ -1,5 +1,25 @@ - -Retrieve Associated Full Covariance Structure Type Name — cov_type_name • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,26 +141,32 @@
    -

    Usage

    +

    Usage +

    cov_type_name(type)
    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    either a full name or abbreviate covariance structure type name to convert to a long-form type.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding abbreviated covariance type name.

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/covariance_types.html b/v0.3.12/reference/covariance_types.html index c6dfaaec0..d2e773b11 100644 --- a/v0.3.12/reference/covariance_types.html +++ b/v0.3.12/reference/covariance_types.html @@ -1,5 +1,25 @@ - -Covariance Types — covariance_types • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    cov_types(
       form = c("name", "abbr", "habbr"),
       filter = c("heterogeneous", "spatial")
    @@ -121,8 +150,10 @@ 

    Usage

    -

    Arguments

    -
    form
    +

    Arguments +

    +
    +
    form

    (character)
    covariance structure type name form. One or more of "name", "abbr" (abbreviation), or "habbr" (heterogeneous abbreviation).

    @@ -132,52 +163,137 @@

    Arguments or "spatial".

    -

    + +
    -

    Value

    +

    Value +

    A character vector of accepted covariance structure type names and abbreviations.

    -

    Note

    +

    Note +

    The ante-dependence covariance structure in this package refers to homogeneous ante-dependence, while the ante-dependence covariance structure from SAS PROC MIXED refers to heterogeneous ante-dependence and the homogeneous version is not available in SAS.

    For all non-spatial covariance structures, the time variable must -be coded as a factor.

    -

    Spatial Covariance structures:

    +be coded as a factor.

    +
    +

    Spatial Covariance structures: +

    -
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)

    where \(d_{ij}\) denotes the Euclidean distance between time points + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)
    +

    where \(d_{ij}\) denotes the Euclidean distance between time points \(i\) and \(j\).

    -

    Abbreviations for Covariance Structures

    +

    Abbreviations for Covariance Structures +

    -

    Common Covariance Structures:

    +

    Common Covariance Structures: +

    -
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)
    +

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, respectively, out of total \(m\) time points, \(1 \leq i, j \leq m\).

    -

    See also

    +

    See also +

    Other covariance types: as.cov_struct(), cov_struct()

    + + + + - - + + diff --git a/v0.3.12/reference/df_1d.html b/v0.3.12/reference/df_1d.html index 052abeb02..7a7296e60 100644 --- a/v0.3.12/reference/df_1d.html +++ b/v0.3.12/reference/df_1d.html @@ -1,9 +1,29 @@ - - + + + + + +Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm +Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -119,13 +147,16 @@
    -

    Usage

    +

    Usage +

    df_1d(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -134,16 +165,19 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -169,7 +203,8 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.12/reference/df_md.html b/v0.3.12/reference/df_md.html index 0dc4e6a9e..88b5bad39 100644 --- a/v0.3.12/reference/df_md.html +++ b/v0.3.12/reference/df_md.html @@ -1,11 +1,31 @@ - - + + + + + +Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm +Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -122,13 +150,16 @@
    -

    Usage

    +

    Usage +

    df_md(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -138,16 +169,19 @@

    Arguments -

    Value

    +

    Value +

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

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -170,7 +204,8 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.12/reference/drop_elements.html b/v0.3.12/reference/drop_elements.html index 0da379c87..a4167c756 100644 --- a/v0.3.12/reference/drop_elements.html +++ b/v0.3.12/reference/drop_elements.html @@ -1,5 +1,25 @@ - -Drop Items from an Indexible — drop_elements • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    drop_elements(x, n)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    Any object that can be consumed by seq_along() and indexed by a logical vector of the same length.

    @@ -127,16 +158,19 @@

    Arguments -

    Value

    +

    Value +

    A subset of x.

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/emit_tidymodels_register_msg.html b/v0.3.12/reference/emit_tidymodels_register_msg.html index 02d7bd395..960c47ed4 100644 --- a/v0.3.12/reference/emit_tidymodels_register_msg.html +++ b/v0.3.12/reference/emit_tidymodels_register_msg.html @@ -1,5 +1,25 @@ - -Format a Message to Emit When Tidymodels is Loaded — emit_tidymodels_register_msg • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,12 +141,14 @@
    -

    Usage

    +

    Usage +

    emit_tidymodels_register_msg()
    -

    Value

    +

    Value +

    A character message to emit. Either a ansi-formatted cli output if @@ -126,7 +156,8 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/emmeans_support.html b/v0.3.12/reference/emmeans_support.html index ea3b557e8..6c9fb5d23 100644 --- a/v0.3.12/reference/emmeans_support.html +++ b/v0.3.12/reference/emmeans_support.html @@ -1,17 +1,37 @@ - - + + + + + +Support for emmeans — emmeans_support • mmrm +Support for emmeans — emmeans_support • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -36,7 +58,8 @@ + - + + - +
    @@ -133,7 +162,8 @@
    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -165,7 +195,8 @@ 

    Examples#> Results are averaged over the levels of: RACE, SEX

    -
    + +
    + + - - + + diff --git a/v0.3.12/reference/emp_start.html b/v0.3.12/reference/emp_start.html index 2de498978..f4319cc6b 100644 --- a/v0.3.12/reference/emp_start.html +++ b/v0.3.12/reference/emp_start.html @@ -1,5 +1,25 @@ - -Empirical Starting Value — emp_start • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    emp_start(data, model_formula, visit_var, subject_var, subject_groups, ...)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (data.frame)
    data used for model fitting.

    @@ -142,29 +173,34 @@

    Arguments -

    Value

    +

    Value +

    A numeric vector of starting values.

    -

    Details

    +

    Details +

    This emp_start only works for unstructured covariance structure. It uses linear regression to first obtain the coefficients and use the residuals to obtain the empirical variance-covariance, and it is then used to obtain the starting values.

    -

    Note

    +

    Note +

    data is used instead of full_frame because full_frame is already transformed if model contains transformations, e.g. log(FEV1) ~ exp(FEV1_BL) will drop FEV1 and FEV1_BL but add log(FEV1) and exp(FEV1_BL) in full_frame.

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/fev_data.html b/v0.3.12/reference/fev_data.html index 52f574cd2..7602e7804 100644 --- a/v0.3.12/reference/fev_data.html +++ b/v0.3.12/reference/fev_data.html @@ -1,5 +1,25 @@ - -Example Data on FEV1 — fev_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,17 @@
    -

    Usage

    +

    Usage +

    fev_data
    -

    Format

    -

    A tibble with 800 rows and 7 variables:

    • USUBJID: subject ID.

    • +

      Format +

      +

      A tibble with 800 rows and 7 variables:

      +
        +
      • USUBJID: subject ID.

      • AVISIT: visit number.

      • ARMCD: treatment, TRT or PBO.

      • RACE: 3-category race.

      • @@ -129,20 +161,24 @@

        Format<
      • WEIGHT: weighting variable.

      • VISITN: integer order of the visit.

      • VISITN2: coordinates of the visit for distance calculation.

      • -

    + +
    -

    Source

    +

    Source +

    This is an artificial dataset.

    -

    Note

    +

    Note +

    Measurements of FEV1 (forced expired volume in one second) is a measure of how quickly the lungs can be emptied. Low levels of FEV1 may indicate chronic obstructive pulmonary disease (COPD).

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/fill_names.html b/v0.3.12/reference/fill_names.html index 114b25a1e..fc7c230ed 100644 --- a/v0.3.12/reference/fill_names.html +++ b/v0.3.12/reference/fill_names.html @@ -1,5 +1,25 @@ - -Complete character Vector Names From Values — fill_names • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,26 +141,32 @@
    -

    Usage

    +

    Usage +

    fill_names(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character or list)
    value whose names should be completed from element values.

    -
    + +
    -

    Value

    +

    Value +

    A named vector or list.

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/fit_mmrm.html b/v0.3.12/reference/fit_mmrm.html index c9af4ade6..8fb359a96 100644 --- a/v0.3.12/reference/fit_mmrm.html +++ b/v0.3.12/reference/fit_mmrm.html @@ -1,11 +1,31 @@ - - + + + + + +Low-Level Fitting Function for MMRM — fit_mmrm • mmrm +Low-Level Fitting Function for MMRM — fit_mmrm • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -122,7 +150,8 @@
    -

    Usage

    +

    Usage +

    fit_mmrm(
       formula,
       data,
    @@ -136,8 +165,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    model formula with exactly one special term specifying the visits within subjects, see details.

    @@ -176,16 +207,19 @@

    Argumentsmmrm_control().

    -

    + +
    -

    Value

    +

    Value +

    List of class mmrm_tmb, see h_mmrm_tmb_fit() for details. In addition, it contains elements call and optimizer.

    -

    Details

    +

    Details +

    The formula typically looks like:

    FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)

    which specifies response and covariates as usual, and exactly one special term @@ -195,7 +229,8 @@

    Details
    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     data <- fev_data
     system.time(result <- fit_mmrm(formula, data, rep(1, nrow(fev_data))))
    @@ -204,7 +239,8 @@ 

    Examples

    + +

    + + - - + + diff --git a/v0.3.12/reference/fit_single_optimizer.html b/v0.3.12/reference/fit_single_optimizer.html index 85c59c368..ddfb4b6d8 100644 --- a/v0.3.12/reference/fit_single_optimizer.html +++ b/v0.3.12/reference/fit_single_optimizer.html @@ -1,9 +1,29 @@ - - + + + + + +Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm +Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -119,7 +147,8 @@
    -

    Usage

    +

    Usage +

    fit_single_optimizer(
       formula,
       data,
    @@ -134,8 +163,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -175,9 +206,11 @@

    Arguments -

    Value

    +

    Value +

    The mmrm_fit object, with additional attributes containing warnings, @@ -185,7 +218,8 @@

    Value

    mmrm_tmb
    contents.

    -

    Details

    +

    Details +

    fit_single_optimizer will fit the mmrm model using the control provided. If there are multiple optimizers provided in control, only the first optimizer will be used. @@ -194,7 +228,8 @@

    Details
    -

    Examples

    +

    Examples +

    mod_fit <- fit_single_optimizer(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data,
    @@ -206,7 +241,8 @@ 

    Examples

    + +

    + +
    - - + + diff --git a/v0.3.12/reference/flat_expr.html b/v0.3.12/reference/flat_expr.html index 4763e0176..dcbda0edb 100644 --- a/v0.3.12/reference/flat_expr.html +++ b/v0.3.12/reference/flat_expr.html @@ -1,11 +1,31 @@ - - + + + + + +Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm +Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -122,46 +150,68 @@
    -

    Usage

    +

    Usage +

    flatten_call(call)
     
     flatten_expr(expr)
    -

    Arguments

    -
    call, expr
    +

    Arguments +

    +
    +
    call, expr

    (language)
    a language object to flatten.

    -
    + +
    -

    Value

    +

    Value +

    A list of atomic values, symbols, infix operator names and subexpressions.

    -

    Details

    +

    Details +

    Where 1 + 2 | 3 in R's syntax tree is (|, (+, 1, 2), 3), flattening it into its visual order produces (1, +, 2, |, 3), which makes for more fluent interpretation of non-standard grammar rules used in formulas.

    -

    Functions

    +

    Functions +

    -
    • flatten_call(): Flatten a call into a list of names and argument expressions.

      +
        +
      • +

        flatten_call(): Flatten a call into a list of names and argument expressions.

        The call name and all arguments are flattened into the same list, meaning a call of the form sp_exp(a, b, c | d / e) produces a list of the form (sp_exp, a, b, c, |, d, /, e).

        -

        flatten_call(quote(sp_exp(a, b, c | d / e)))

      • -
      • flatten_expr(): Flatten nested expressions

        -

        flatten_expr(quote(1 + 2 + 3 | 4))

      • -
    +

    +
    +
    flatten_call(quote(sp_exp(a, b, c | d / e)))
    +

    +
    + +
  • +

    flatten_expr(): Flatten nested expressions

    +

    +
    +
    flatten_expr(quote(1 + 2 + 3 | 4))
    +

    +
    +
  • + + + +
    -
    + + - - + + diff --git a/v0.3.12/reference/format.cov_struct.html b/v0.3.12/reference/format.cov_struct.html index fb65946f9..03a4cf3ae 100644 --- a/v0.3.12/reference/format.cov_struct.html +++ b/v0.3.12/reference/format.cov_struct.html @@ -1,5 +1,25 @@ - -Format Covariance Structure Object — format.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,30 +141,36 @@
    -

    Usage

    +

    Usage +

    # S3 method for cov_struct
     format(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    ...

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string for x.

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/format_symbols.html b/v0.3.12/reference/format_symbols.html index 49f2f376f..c284c235f 100644 --- a/v0.3.12/reference/format_symbols.html +++ b/v0.3.12/reference/format_symbols.html @@ -1,7 +1,27 @@ - -Format Symbol Objects — format_symbols • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,25 +144,31 @@
    -

    Usage

    +

    Usage +

    format_symbols(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character) A vector of variable names.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string of comma-separated variables.

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/formula_rhs.html b/v0.3.12/reference/formula_rhs.html index aaaa1f8bc..ee38fb8cf 100644 --- a/v0.3.12/reference/formula_rhs.html +++ b/v0.3.12/reference/formula_rhs.html @@ -1,5 +1,25 @@ - -Extract Right-Hand-Side (rhs) from Formula — formula_rhs • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,32 +141,42 @@
    -

    Usage

    +

    Usage +

    formula_rhs(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula.

    -
    + +
    -

    Value

    +

    Value +

    A formula without a response, derived from the right-hand-side of the formula, f.

    -

    formula_rhs(a ~ b + c)
    -formula_rhs(~ b + c)

    +

    +
    +
    formula_rhs(a ~ b + c)
    +formula_rhs(~ b + c)
    +

    +
    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_add_covariance_terms.html b/v0.3.12/reference/h_add_covariance_terms.html index a85e9f5a7..fe82ae58f 100644 --- a/v0.3.12/reference/h_add_covariance_terms.html +++ b/v0.3.12/reference/h_add_covariance_terms.html @@ -1,5 +1,25 @@ - -Add Individual Covariance Variables As Terms to Formula — h_add_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_add_covariance_terms(f, covariance)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula to which covariance structure terms should be added.

    @@ -128,22 +159,26 @@

    Arguments -

    Value

    +

    Value +

    A new formula with included covariance terms.

    -

    Details

    +

    Details +

    stats::update() is used to append the covariance structure and the environment attribute will not be changed. This ensures the returned formula and the input formula have the same environment.

    + + + + - - + + diff --git a/v0.3.12/reference/h_add_terms.html b/v0.3.12/reference/h_add_terms.html index 3f6ca1349..325285056 100644 --- a/v0.3.12/reference/h_add_terms.html +++ b/v0.3.12/reference/h_add_terms.html @@ -1,5 +1,25 @@ - -Add Formula Terms with Character — h_add_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_add_terms(f, adds, drop_response = FALSE)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula to be updated.

    @@ -130,22 +161,26 @@

    Arguments -

    Value

    +

    Value +

    A new formula with elements in drops removed.

    -

    Details

    +

    Details +

    Elements in adds will be added from the formula, while the environment of the formula is unchanged. If adds is NULL or character(0), the formula is unchanged.

    + + + + - - + + diff --git a/v0.3.12/reference/h_coef_table.html b/v0.3.12/reference/h_coef_table.html index 80f81179e..1b90da438 100644 --- a/v0.3.12/reference/h_coef_table.html +++ b/v0.3.12/reference/h_coef_table.html @@ -1,5 +1,25 @@ - -Coefficients Table for MMRM Fit — h_coef_table • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,18 +141,23 @@
    -

    Usage

    +

    Usage +

    h_coef_table(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    model fit.

    -
    + +
    -

    Value

    +

    Value +

    Matrix with one row per coefficient and columns @@ -132,7 +165,8 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_confirm_large_levels.html b/v0.3.12/reference/h_confirm_large_levels.html index 8e95dc5ff..38b54de57 100644 --- a/v0.3.12/reference/h_confirm_large_levels.html +++ b/v0.3.12/reference/h_confirm_large_levels.html @@ -1,7 +1,27 @@ - -Ask for Confirmation on Large Visit Levels — h_confirm_large_levels • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,25 +144,31 @@
    -

    Usage

    +

    Usage +

    h_confirm_large_levels(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (numeric)
    number of visit levels.

    -
    + +
    -

    Value

    +

    Value +

    Logical value TRUE.

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_construct_model_frame_inputs.html b/v0.3.12/reference/h_construct_model_frame_inputs.html index ee21b4f03..eac4f8d22 100644 --- a/v0.3.12/reference/h_construct_model_frame_inputs.html +++ b/v0.3.12/reference/h_construct_model_frame_inputs.html @@ -1,13 +1,33 @@ - - + + + + + +Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm +Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -32,7 +54,8 @@ + - + + - + @@ -125,7 +153,8 @@
    -

    Usage

    +

    Usage +

    h_construct_model_frame_inputs(
       formula,
       data,
    @@ -136,8 +165,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (mmrm)
    mmrm fit object.

    @@ -153,21 +184,27 @@

    Arguments -

    Value

    +

    Value +

    -

    named list with four elements:

    • "formula": the formula including the columns requested in the include= argument.

    • +

      named list with four elements:

      +
        +
      • "formula": the formula including the columns requested in the include= argument.

      • "formula_full": the formula including all columns

      • "data": a data frame including all columns where factor and character columns have been processed with h_factor_ref().

      • "is_full": a logical scalar indicating if the formula and full formula are identical

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_default_value.html b/v0.3.12/reference/h_default_value.html index 4b836b575..a4b49d3d1 100644 --- a/v0.3.12/reference/h_default_value.html +++ b/v0.3.12/reference/h_default_value.html @@ -1,7 +1,27 @@ - -Default Value on NULL Return default value when first argument is NULL. — h_default_value • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,27 +144,33 @@
    -

    Usage

    +

    Usage +

    h_default_value(x, y)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    Object.

    y

    Object.

    -
    + +
    -

    Details

    +

    Details +

    If x is NULL, returns y. Otherwise return x.

    + + + + - - + + diff --git a/v0.3.12/reference/h_df_1d_bw.html b/v0.3.12/reference/h_df_1d_bw.html index cf1bf502b..be9d9cc64 100644 --- a/v0.3.12/reference/h_df_1d_bw.html +++ b/v0.3.12/reference/h_df_1d_bw.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom for One-Dimensional Contrast — h_df_1d_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_bw(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,16 +159,19 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_df_1d_kr.html b/v0.3.12/reference/h_df_1d_kr.html index 622efbbd8..6a327856e 100644 --- a/v0.3.12/reference/h_df_1d_kr.html +++ b/v0.3.12/reference/h_df_1d_kr.html @@ -1,7 +1,27 @@ - -Calculation of Kenward-Roger Degrees of Freedom for One-Dimensional Contrast — h_df_1d_kr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,13 +144,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_kr(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -131,16 +162,19 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_df_1d_res.html b/v0.3.12/reference/h_df_1d_res.html index 590f10a9a..1df51549c 100644 --- a/v0.3.12/reference/h_df_1d_res.html +++ b/v0.3.12/reference/h_df_1d_res.html @@ -1,7 +1,27 @@ - -Calculation of Residual Degrees of Freedom for One-Dimensional Contrast — h_df_1d_res • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,13 +144,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_res(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -131,16 +162,19 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_df_1d_sat.html b/v0.3.12/reference/h_df_1d_sat.html index 5065b0f4c..78d82c169 100644 --- a/v0.3.12/reference/h_df_1d_sat.html +++ b/v0.3.12/reference/h_df_1d_sat.html @@ -1,7 +1,27 @@ - -Calculation of Satterthwaite Degrees of Freedom for One-Dimensional Contrast — h_df_1d_sat • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,13 +144,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_sat(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -131,16 +162,19 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_df_bw_calc.html b/v0.3.12/reference/h_df_bw_calc.html index cba6fded1..b7e98a0da 100644 --- a/v0.3.12/reference/h_df_bw_calc.html +++ b/v0.3.12/reference/h_df_bw_calc.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom — h_df_bw_calc • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,27 +141,36 @@
    -

    Usage

    +

    Usage +

    h_df_bw_calc(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    -

    List with:

    + + + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_df_md_bw.html b/v0.3.12/reference/h_df_md_bw.html index 41ab3c0bc..5f1564333 100644 --- a/v0.3.12/reference/h_df_md_bw.html +++ b/v0.3.12/reference/h_df_md_bw.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_bw(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -129,16 +160,19 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_df_md_from_1d.html b/v0.3.12/reference/h_df_md_from_1d.html index 42c8f1208..62735d257 100644 --- a/v0.3.12/reference/h_df_md_from_1d.html +++ b/v0.3.12/reference/h_df_md_from_1d.html @@ -1,5 +1,25 @@ - -Creating F-Statistic Results from One-Dimensional Contrast — h_df_md_from_1d • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,22 +141,27 @@
    -

    Usage

    +

    Usage +

    h_df_md_from_1d(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    model fit.

    contrast

    (numeric)
    one-dimensional contrast.

    -
    + +
    -

    Value

    +

    Value +

    The one-dimensional degrees of freedom are calculated and then @@ -136,7 +169,8 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_df_md_kr.html b/v0.3.12/reference/h_df_md_kr.html index bbfd152c2..b1410f745 100644 --- a/v0.3.12/reference/h_df_md_kr.html +++ b/v0.3.12/reference/h_df_md_kr.html @@ -1,5 +1,25 @@ - -Calculation of Kenward-Roger Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_kr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_kr(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -129,16 +160,19 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_df_md_res.html b/v0.3.12/reference/h_df_md_res.html index b3ca8151b..4bc0e7d8f 100644 --- a/v0.3.12/reference/h_df_md_res.html +++ b/v0.3.12/reference/h_df_md_res.html @@ -1,5 +1,25 @@ - -Calculation of Residual Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_res • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_res(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -129,16 +160,19 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_df_md_sat.html b/v0.3.12/reference/h_df_md_sat.html index b7c675043..71fd6fee1 100644 --- a/v0.3.12/reference/h_df_md_sat.html +++ b/v0.3.12/reference/h_df_md_sat.html @@ -1,5 +1,25 @@ - -Calculation of Satterthwaite Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_sat • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_sat(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -129,16 +160,19 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_df_min_bw.html b/v0.3.12/reference/h_df_min_bw.html index 6cff34004..a33fddcf7 100644 --- a/v0.3.12/reference/h_df_min_bw.html +++ b/v0.3.12/reference/h_df_min_bw.html @@ -1,5 +1,25 @@ - -Assign Minimum Degrees of Freedom Given Involved Coefficients — h_df_min_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_df_min_bw(bw_calc, is_coef_involved)
    -

    Arguments

    -
    bw_calc
    +

    Arguments +

    +
    +
    bw_calc

    (list)
    from h_df_bw_calc().

    @@ -127,9 +158,11 @@

    Arguments -

    Value

    +

    Value +

    The minimum of the degrees of freedom assigned to each involved @@ -137,7 +170,8 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_df_to_tibble.html b/v0.3.12/reference/h_df_to_tibble.html index 7d59b6872..2e75433be 100644 --- a/v0.3.12/reference/h_df_to_tibble.html +++ b/v0.3.12/reference/h_df_to_tibble.html @@ -1,5 +1,25 @@ - -Coerce a Data Frame to a tibble — h_df_to_tibble • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -113,24 +142,30 @@
    -

    Usage

    +

    Usage +

    h_df_to_tibble(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (data.frame)
    what to coerce.

    -
    + +
    -

    Value

    +

    Value +

    The data as a tibble, potentially with a .rownames column.

    -

    Details

    +

    Details +

    This is only a thin wrapper around tibble::as_tibble(), except giving a useful error message and it checks for rownames and adds them as a new column .rownames if they are not just a numeric sequence as @@ -138,7 +173,8 @@

    Details

    + + + + - - + + diff --git a/v0.3.12/reference/h_drop_covariance_terms.html b/v0.3.12/reference/h_drop_covariance_terms.html index e3ab7ded4..731867b53 100644 --- a/v0.3.12/reference/h_drop_covariance_terms.html +++ b/v0.3.12/reference/h_drop_covariance_terms.html @@ -1,5 +1,25 @@ - -Drop Formula Terms used for Covariance Structure Definition — h_drop_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,31 +141,38 @@
    -

    Usage

    +

    Usage +

    h_drop_covariance_terms(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula from which covariance terms should be dropped.

    -
    + +
    -

    Value

    +

    Value +

    The formula without accepted covariance terms.

    -

    Details

    +

    Details +

    terms is used and it will preserve the environment attribute. This ensures the returned formula and the input formula have the same environment.

    + + + + - - + + diff --git a/v0.3.12/reference/h_extract_covariance_terms.html b/v0.3.12/reference/h_extract_covariance_terms.html index 71aca3958..940c11022 100644 --- a/v0.3.12/reference/h_extract_covariance_terms.html +++ b/v0.3.12/reference/h_extract_covariance_terms.html @@ -1,5 +1,25 @@ - -Extract Formula Terms used for Covariance Structure Definition — h_extract_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,26 +141,32 @@
    -

    Usage

    +

    Usage +

    h_extract_covariance_terms(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula from which covariance terms should be extracted.

    -
    + +
    -

    Value

    +

    Value +

    A list of covariance structure expressions found in f.

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_factor_ref.html b/v0.3.12/reference/h_factor_ref.html index d8a9d1f94..a2ef6fd44 100644 --- a/v0.3.12/reference/h_factor_ref.html +++ b/v0.3.12/reference/h_factor_ref.html @@ -1,5 +1,25 @@ - -Convert Character to Factor Following Reference — h_factor_ref • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_factor_ref(x, ref, var_name = vname(x))
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character or factor)
    input.

    @@ -130,22 +161,26 @@

    Arguments -

    Value

    +

    Value +

    Factor vector with updated levels.

    -

    Details

    +

    Details +

    Use ref to convert x into factor with the same levels. This is needed even if x and ref are both character because in model.matrix if x only has one level there could be errors.

    + + + + - - + + diff --git a/v0.3.12/reference/h_factor_ref_data.html b/v0.3.12/reference/h_factor_ref_data.html index 28d727098..4204c17dc 100644 --- a/v0.3.12/reference/h_factor_ref_data.html +++ b/v0.3.12/reference/h_factor_ref_data.html @@ -1,5 +1,25 @@ - -Convert Character to Factor Following Reference MMRM Fit. — h_factor_ref_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,34 +141,41 @@
    -

    Usage

    +

    Usage +

    h_factor_ref_data(object, data)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM object.

    data

    (data.frame)
    input data.

    -
    + +
    -

    Value

    +

    Value +

    Data frame with updated levels in specified columns.

    -

    Details

    +

    Details +

    Use fitted mmrm object to convert input data frame whose factors are of the same levels as the reference fitted object.

    + + + + - - + + diff --git a/v0.3.12/reference/h_get_contrast.html b/v0.3.12/reference/h_get_contrast.html index 2e414170a..afe8ef207 100644 --- a/v0.3.12/reference/h_get_contrast.html +++ b/v0.3.12/reference/h_get_contrast.html @@ -1,5 +1,25 @@ - -Obtain Contrast for Specified Effect — h_get_contrast • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    h_get_contrast(
       object,
       effect,
    @@ -123,8 +152,10 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the fitted MMRM.

    @@ -139,16 +170,19 @@

    Arguments -

    Value

    +

    Value +

    A matrix of the contrast.

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_get_cov_default.html b/v0.3.12/reference/h_get_cov_default.html index ee07ff66e..ebf0bbf0f 100644 --- a/v0.3.12/reference/h_get_cov_default.html +++ b/v0.3.12/reference/h_get_cov_default.html @@ -1,7 +1,27 @@ - -Obtain Default Covariance Method — h_get_cov_default • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,26 +144,32 @@
    -

    Usage

    +

    Usage +

    h_get_cov_default(
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within")
     )
    -

    Arguments

    -
    method
    +

    Arguments +

    +
    +
    method

    (string)
    degrees of freedom method.

    -
    + +
    -

    Value

    +

    Value +

    String of the default covariance method.

    -

    Details

    +

    Details +

    The default covariance method is different for different degrees of freedom method. For "Satterthwaite" or "Between-Within", "Asymptotic" is returned. For "Kenward-Roger" only, "Kenward-Roger" is returned. @@ -143,7 +177,8 @@

    Details

    + + + + - - + + diff --git a/v0.3.12/reference/h_get_empirical.html b/v0.3.12/reference/h_get_empirical.html index bf3ba839d..daa454269 100644 --- a/v0.3.12/reference/h_get_empirical.html +++ b/v0.3.12/reference/h_get_empirical.html @@ -1,9 +1,29 @@ - -Obtain Empirical/Jackknife/Bias-Reduced Covariance — h_get_empirical • mmrm +Obtain Empirical/Jackknife/Bias-Reduced Covariance — h_get_empirical • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -119,13 +147,16 @@
    -

    Usage

    +

    Usage +

    h_get_empirical(tmb_data, theta, beta, beta_vcov, type)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    @@ -145,17 +176,23 @@

    Arguments -

    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • cov: matrix empirical covariance.

    • +

      Named list with elements:

      +
        +
      • cov: matrix empirical covariance.

      • df_mat: matrix to calculate Satterthwaite degree of freedom.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_get_kr_comp.html b/v0.3.12/reference/h_get_kr_comp.html index 4148ed74a..10b055017 100644 --- a/v0.3.12/reference/h_get_kr_comp.html +++ b/v0.3.12/reference/h_get_kr_comp.html @@ -1,7 +1,27 @@ - -Obtain Kenward-Roger Adjustment Components — h_get_kr_comp • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,30 +144,39 @@
    -

    Usage

    +

    Usage +

    h_get_kr_comp(tmb_data, theta)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    theta

    (numeric)
    theta estimate.

    -
    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • P: matrix of \(P\) component.

    • +

      Named list with elements:

      +
        +
      • P: matrix of \(P\) component.

      • Q: matrix of \(Q\) component.

      • R: matrix of \(R\) component.

      • -
    + +
    -

    Details

    +

    Details +

    the function returns a named list, \(P\), \(Q\) and \(R\), which corresponds to the paper in 1997. The matrices are stacked in columns so that \(P\), \(Q\) and \(R\) has the same column number(number of beta parameters). The number of rows, is dependent on @@ -151,7 +188,8 @@

    Details

    + + + + - - + + diff --git a/v0.3.12/reference/h_get_optimizers.html b/v0.3.12/reference/h_get_optimizers.html index c214fb76f..bc88e7a19 100644 --- a/v0.3.12/reference/h_get_optimizers.html +++ b/v0.3.12/reference/h_get_optimizers.html @@ -1,5 +1,25 @@ - -Obtain Optimizer according to Optimizer String Value — h_get_optimizers • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    h_get_optimizers(
       optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"),
       optimizer_fun = h_optimizer_fun(optimizer),
    @@ -123,8 +152,10 @@ 

    Usage

    -

    Arguments

    -
    optimizer
    +

    Arguments +

    +
    +
    optimizer

    (character)
    names of built-in optimizers to try, subset of "L-BFGS-B", "BFGS", "CG" and "nlminb".

    @@ -141,31 +172,41 @@

    Arguments -

    Value

    +

    Value +

    Named list of optimizers created by h_partial_fun_args().

    -

    Details

    -

    If you want to use only the built-in optimizers:

    • optimizer is a shortcut to create a list of built-in optimizer functions +

      Details +

      +

      If you want to use only the built-in optimizers:

      +
        +
      • optimizer is a shortcut to create a list of built-in optimizer functions passed to optimizer_fun.

      • Allowed are "L-BFGS-B", "BFGS", "CG" (using stats::optim() with corresponding method) and "nlminb" (using stats::nlminb()).

      • Other arguments should go into optimizer_args.

      • -

      If you want to use your own optimizer function:

      • Make sure that there are three arguments: parameter (start value), objective function +

      +

      If you want to use your own optimizer function:

      +
        +
      • Make sure that there are three arguments: parameter (start value), objective function and gradient function are sequentially in the function arguments.

      • If there are other named arguments in front of these, make sure they are correctly specified through optimizer_args.

      • If the hessian can be used, please make sure its argument name is hessian and please add attribute use_hessian = TRUE to the function, using attr(fun, "use_hessian) <- TRUE.

      • -
    + +
    + + + + - - + + diff --git a/v0.3.12/reference/h_get_prediction.html b/v0.3.12/reference/h_get_prediction.html index b7c119f77..cd7ee0f73 100644 --- a/v0.3.12/reference/h_get_prediction.html +++ b/v0.3.12/reference/h_get_prediction.html @@ -1,5 +1,25 @@ - -Get Prediction — h_get_prediction • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_get_prediction(tmb_data, theta, beta, beta_vcov)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    object.

    @@ -134,22 +165,29 @@

    Arguments -

    Value

    +

    Value +

    -

    List with:

    • prediction: Matrix with columns fit, conf_var, and var.

    • +

      List with:

      +
        +
      • prediction: Matrix with columns fit, conf_var, and var.

      • covariance: List with subject specific covariance matrices.

      • index: List of zero-based subject indices.

      • -
    + +
    -

    Details

    +

    Details +

    See predict function in predict.cpp which is called internally.

    + + + + - - + + diff --git a/v0.3.12/reference/h_get_prediction_variance.html b/v0.3.12/reference/h_get_prediction_variance.html index 33b97edcd..2bee3ffab 100644 --- a/v0.3.12/reference/h_get_prediction_variance.html +++ b/v0.3.12/reference/h_get_prediction_variance.html @@ -1,5 +1,25 @@ - -Get Prediction Variance — h_get_prediction_variance • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_get_prediction_variance(object, nsim, tmb_data)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    @@ -130,10 +161,12 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.12/reference/h_get_sim_per_subj.html b/v0.3.12/reference/h_get_sim_per_subj.html index 2ddd63882..a0f4c6922 100644 --- a/v0.3.12/reference/h_get_sim_per_subj.html +++ b/v0.3.12/reference/h_get_sim_per_subj.html @@ -1,5 +1,25 @@ - -Get simulated values by patient. — h_get_sim_per_subj • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_get_sim_per_subj(predict_res, nsub, nsim)
    -

    Arguments

    -
    predict_res
    +

    Arguments +

    +
    +
    predict_res

    (list)
    from h_get_prediction().

    @@ -130,10 +161,12 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.12/reference/h_get_theta_from_cov.html b/v0.3.12/reference/h_get_theta_from_cov.html index fe046cace..28aaa5148 100644 --- a/v0.3.12/reference/h_get_theta_from_cov.html +++ b/v0.3.12/reference/h_get_theta_from_cov.html @@ -1,5 +1,25 @@ - -Obtain Theta from Covariance Matrix — h_get_theta_from_cov • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,30 +141,37 @@
    -

    Usage

    +

    Usage +

    h_get_theta_from_cov(covariance)
    -

    Arguments

    -
    covariance
    +

    Arguments +

    +
    +
    covariance

    (matrix) of covariance matrix values.

    -
    + +
    -

    Value

    +

    Value +

    Numeric vector of the theta values.

    -

    Details

    +

    Details +

    If the covariance matrix has NA in some of the elements, they will be replaced by 0 (non-diagonal) and 1 (diagonal). This ensures that the matrix is positive definite.

    + + + + - - + + diff --git a/v0.3.12/reference/h_gradient.html b/v0.3.12/reference/h_gradient.html index 2d525c841..64b4de704 100644 --- a/v0.3.12/reference/h_gradient.html +++ b/v0.3.12/reference/h_gradient.html @@ -1,7 +1,27 @@ - -Computation of a Gradient Given Jacobian and Contrast Vector — h_gradient • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,13 +144,16 @@
    -

    Usage

    +

    Usage +

    h_gradient(jac_list, contrast)
    -

    Arguments

    -
    jac_list
    +

    Arguments +

    +
    +
    jac_list

    (list)
    Jacobian list produced e.g. by h_jac_list().

    @@ -131,9 +162,11 @@

    Arguments -

    Value

    +

    Value +

    Numeric vector which contains the quadratic forms of each element of @@ -141,7 +174,8 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_jac_list.html b/v0.3.12/reference/h_jac_list.html index 73a6cc34b..eaefcf011 100644 --- a/v0.3.12/reference/h_jac_list.html +++ b/v0.3.12/reference/h_jac_list.html @@ -1,5 +1,25 @@ - -Obtain List of Jacobian Matrix Entries for Covariance Matrix — h_jac_list • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_jac_list(tmb_data, theta_est, beta_vcov)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    @@ -130,9 +161,11 @@

    Arguments -

    Value

    +

    Value +

    List with one element per variance parameter containing a matrix @@ -141,7 +174,8 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_kr_df.html b/v0.3.12/reference/h_kr_df.html index 1c371c211..425b56c7e 100644 --- a/v0.3.12/reference/h_kr_df.html +++ b/v0.3.12/reference/h_kr_df.html @@ -1,7 +1,27 @@ - -Obtain the Adjusted Kenward-Roger degrees of freedom — h_kr_df • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,13 +144,16 @@
    -

    Usage

    +

    Usage +

    h_kr_df(v0, l, w, p)
    -

    Arguments

    -
    v0
    +

    Arguments +

    +
    +
    v0

    (matrix)
    unadjusted covariance matrix.

    @@ -137,17 +168,23 @@

    Argumentsh_get_kr_comp().

    -

    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • m: numeric degrees of freedom.

    • +

      Named list with elements:

      +
        +
      • m: numeric degrees of freedom.

      • lambda: numeric F statistic scale parameter.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_md_denom_df.html b/v0.3.12/reference/h_md_denom_df.html index a40d2536b..b92bdd904 100644 --- a/v0.3.12/reference/h_md_denom_df.html +++ b/v0.3.12/reference/h_md_denom_df.html @@ -1,5 +1,25 @@ - -Calculating Denominator Degrees of Freedom for the Multi-Dimensional Case — h_md_denom_df • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,32 +141,39 @@
    -

    Usage

    +

    Usage +

    h_md_denom_df(t_stat_df)
    -

    Arguments

    -
    t_stat_df
    +

    Arguments +

    +
    +
    t_stat_df

    (numeric)
    n t-statistic derived degrees of freedom.

    -
    + +
    -

    Value

    +

    Value +

    Usually the calculation is returning 2 * E / (E - n) where E is the sum of t / (t - 2) over all t_stat_df values t.

    -

    Note

    +

    Note +

    If the input values are two similar to each other then just the average of them is returned. If any of the inputs is not larger than 2 then 2 is returned.

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_mmrm_tmb_assert_start.html b/v0.3.12/reference/h_mmrm_tmb_assert_start.html index aff2632b9..9bdba7f22 100644 --- a/v0.3.12/reference/h_mmrm_tmb_assert_start.html +++ b/v0.3.12/reference/h_mmrm_tmb_assert_start.html @@ -1,5 +1,25 @@ - -Asserting Sane Start Values for TMB Fit — h_mmrm_tmb_assert_start • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,25 +141,31 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_assert_start(tmb_object)
    -

    Arguments

    -
    tmb_object
    +

    Arguments +

    +
    +
    tmb_object

    (list)
    created with TMB::MakeADFun().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used for assertions.

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_mmrm_tmb_check_conv.html b/v0.3.12/reference/h_mmrm_tmb_check_conv.html index f268ef72e..7501faf54 100644 --- a/v0.3.12/reference/h_mmrm_tmb_check_conv.html +++ b/v0.3.12/reference/h_mmrm_tmb_check_conv.html @@ -1,5 +1,25 @@ - -Checking the TMB Optimization Result — h_mmrm_tmb_check_conv • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,22 +141,27 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_check_conv(tmb_opt, mmrm_tmb)
    -

    Arguments

    -
    tmb_opt
    +

    Arguments +

    +
    +
    tmb_opt

    (list)
    optimization result.

    mmrm_tmb

    (mmrm_tmb)
    result from h_mmrm_tmb_fit().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used to generate warnings in case that the model @@ -136,7 +169,8 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_mmrm_tmb_data.html b/v0.3.12/reference/h_mmrm_tmb_data.html index 1e5986523..7eb489ee9 100644 --- a/v0.3.12/reference/h_mmrm_tmb_data.html +++ b/v0.3.12/reference/h_mmrm_tmb_data.html @@ -1,5 +1,25 @@ - -Data for TMB Fit — h_mmrm_tmb_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_data(
       formula_parts,
       data,
    @@ -127,8 +156,10 @@ 

    Usage

    -

    Arguments

    -
    formula_parts
    +

    Arguments +

    +
    +
    formula_parts

    (mmrm_tmb_formula_parts)
    list with formula parts from h_mmrm_tmb_formula_parts().

    @@ -162,12 +193,16 @@

    Arguments -

    Value

    +

    Value +

    -

    List of class mmrm_tmb_data with elements:

    • full_frame: data.frame with n rows containing all variables needed in the model.

    • +

      List of class mmrm_tmb_data with elements:

      +
        +
      • full_frame: data.frame with n rows containing all variables needed in the model.

      • data: data.frame of input dataset.

      • x_matrix: matrix with n rows and p columns specifying the overall design matrix.

      • x_cols_aliased: logical with potentially more than p elements indicating which @@ -187,9 +222,11 @@

        Value

        reml: int specifying whether REML estimation is used (1), otherwise ML (0).

      • subject_groups: factor specifying the grouping for each subject.

      • n_groups: int with the number of total groups

      • -
    + +
    -

    Details

    +

    Details +

    Note that the subject_var must not be factor but can also be character. If it is character, then it will be converted to factor internally. Here the levels will be the unique values, sorted alphabetically and numerically if there @@ -198,7 +235,8 @@

    Details

    + + + + - - + + diff --git a/v0.3.12/reference/h_mmrm_tmb_extract_cov.html b/v0.3.12/reference/h_mmrm_tmb_extract_cov.html index c424483c1..b7de20e92 100644 --- a/v0.3.12/reference/h_mmrm_tmb_extract_cov.html +++ b/v0.3.12/reference/h_mmrm_tmb_extract_cov.html @@ -1,7 +1,27 @@ - -Extract covariance matrix from TMB report and input data — h_mmrm_tmb_extract_cov • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,13 +144,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_extract_cov(tmb_report, tmb_data, visit_var, is_spatial)
    -

    Arguments

    -
    tmb_report
    +

    Arguments +

    +
    +
    tmb_report

    (list)
    report created with TMB::MakeADFun() report function.

    @@ -137,9 +168,11 @@

    Arguments -

    Value

    +

    Value +

    Return a simple covariance matrix if there is no grouping, or a named @@ -148,7 +181,8 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_mmrm_tmb_fit.html b/v0.3.12/reference/h_mmrm_tmb_fit.html index 0389ef1f9..b6eed138d 100644 --- a/v0.3.12/reference/h_mmrm_tmb_fit.html +++ b/v0.3.12/reference/h_mmrm_tmb_fit.html @@ -1,7 +1,27 @@ - -Build TMB Fit Result List — h_mmrm_tmb_fit • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,13 +144,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_fit(tmb_object, tmb_opt, formula_parts, tmb_data)
    -

    Arguments

    -
    tmb_object
    +

    Arguments +

    +
    +
    tmb_object

    (list)
    created with TMB::MakeADFun().

    @@ -138,12 +169,16 @@

    Argumentsh_mmrm_tmb_data().

    -

    + +
    -

    Value

    +

    Value +

    -

    List of class mmrm_tmb with:

    • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

    • +

      List of class mmrm_tmb with:

      +
        +
      • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

      • beta_est: vector of coefficient estimates.

      • beta_vcov: Variance-covariance matrix for coefficient estimates.

      • beta_vcov_inv_L: Lower triangular matrix L of the inverse variance-covariance matrix decomposition.

      • @@ -158,16 +193,19 @@

        Value

        opt_details: list with optimization details including convergence code.

      • tmb_object: original TMB object created with TMB::MakeADFun().

      • tmb_data: input.

      • -
    + +
    -

    Details

    +

    Details +

    Instead of inverting or decomposing beta_vcov, it can be more efficient to use its robust Cholesky decomposition LDL^T, therefore we return the corresponding two components L and D as well since they have been available on the C++ side already.

    + + + + - - + + diff --git a/v0.3.12/reference/h_mmrm_tmb_formula_parts.html b/v0.3.12/reference/h_mmrm_tmb_formula_parts.html index a1c45f454..c408b605a 100644 --- a/v0.3.12/reference/h_mmrm_tmb_formula_parts.html +++ b/v0.3.12/reference/h_mmrm_tmb_formula_parts.html @@ -1,5 +1,25 @@ - -Processing the Formula for TMB Fit — h_mmrm_tmb_formula_parts • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_formula_parts(
       formula,
       covariance = as.cov_struct(formula, warn_partial = FALSE)
    @@ -121,8 +150,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    Original formula.

    @@ -130,12 +161,16 @@

    Arguments -

    Value

    +

    Value +

    -

    List of class mmrm_tmb_formula_parts with elements:

    • formula: the original input.

    • +

      List of class mmrm_tmb_formula_parts with elements:

      +
        +
      • formula: the original input.

      • model_formula: formula with the covariance term is removed.

      • model_formula: formula with the covariance term removed.

      • full_formula: same as model_formula but includes the covariance @@ -148,10 +183,12 @@

        Value

        group_var: string with the group variable name. If no group specified, this element is NULL.

      • model_var: character with the variables names of the formula, except subject_var.

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_mmrm_tmb_parameters.html b/v0.3.12/reference/h_mmrm_tmb_parameters.html index 57a439ad2..f363cff36 100644 --- a/v0.3.12/reference/h_mmrm_tmb_parameters.html +++ b/v0.3.12/reference/h_mmrm_tmb_parameters.html @@ -1,5 +1,25 @@ - -Start Parameters for TMB Fit — h_mmrm_tmb_parameters • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_parameters(formula_parts, tmb_data, start, n_groups = 1L)
    -

    Arguments

    -
    formula_parts
    +

    Arguments +

    +
    +
    formula_parts

    (mmrm_tmb_formula_parts)
    produced by h_mmrm_tmb_formula_parts().

    @@ -136,9 +167,11 @@

    Arguments -

    Value

    +

    Value +

    List with element theta containing the start values for the variance @@ -146,7 +179,8 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_newdata_add_pred.html b/v0.3.12/reference/h_newdata_add_pred.html index 08474d295..e9d9d384f 100644 --- a/v0.3.12/reference/h_newdata_add_pred.html +++ b/v0.3.12/reference/h_newdata_add_pred.html @@ -1,5 +1,25 @@ - -Add Prediction Results to New Data — h_newdata_add_pred • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_newdata_add_pred(x, newdata, se_fit, interval, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fit.

    @@ -139,9 +170,11 @@

    Argumentspredict.mmrm_tmb().

    -

    + +
    -

    Value

    +

    Value +

    The newdata as a tibble with additional columns .fitted, @@ -152,7 +185,8 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_optimizer_fun.html b/v0.3.12/reference/h_optimizer_fun.html index e99e32656..9911980d0 100644 --- a/v0.3.12/reference/h_optimizer_fun.html +++ b/v0.3.12/reference/h_optimizer_fun.html @@ -1,5 +1,25 @@ - -Obtain Optimizer Function with Character — h_optimizer_fun • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,25 +141,31 @@
    -

    Usage

    +

    Usage +

    h_optimizer_fun(optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"))
    -

    Arguments

    -
    optimizer
    +

    Arguments +

    +
    +
    optimizer

    (character)
    vector of optimizers.

    -
    + +
    -

    Value

    +

    Value +

    A (list)
    of optimizer functions generated from h_partial_fun_args().

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_partial_fun_args.html b/v0.3.12/reference/h_partial_fun_args.html index 7b13925a7..2acfd3b74 100644 --- a/v0.3.12/reference/h_partial_fun_args.html +++ b/v0.3.12/reference/h_partial_fun_args.html @@ -1,5 +1,25 @@ - -Create Partial Functions — h_partial_fun_args • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_partial_fun_args(fun, ..., additional_attr = list())
    -

    Arguments

    -
    fun
    +

    Arguments +

    +
    +
    fun

    (function)
    to be wrapped.

    @@ -130,16 +161,19 @@

    Arguments -

    Value

    +

    Value +

    Object with S3 class "partial", a function with args attribute (and possibly more attributes from additional_attr).

    -

    Details

    +

    Details +

    This function add args attribute to the original function, and add an extra class partial to the function. args is the argument for the function, and elements in ... will override the existing @@ -147,7 +181,8 @@

    Details

    + + + + - - + + diff --git a/v0.3.12/reference/h_print_aic_list.html b/v0.3.12/reference/h_print_aic_list.html index 41350cfad..1bdaec764 100644 --- a/v0.3.12/reference/h_print_aic_list.html +++ b/v0.3.12/reference/h_print_aic_list.html @@ -1,5 +1,25 @@ - -Printing AIC and other Model Fit Criteria — h_print_aic_list • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,23 +141,28 @@
    -

    Usage

    +

    Usage +

    h_print_aic_list(aic_list, digits = 1)
    -

    Arguments

    -
    aic_list
    +

    Arguments +

    +
    +
    aic_list

    (list)
    list as part of from summary.mmrm().

    digits

    (number)
    number of decimal places used with round().

    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_print_call.html b/v0.3.12/reference/h_print_call.html index 6b8f5fe46..80bd0a61b 100644 --- a/v0.3.12/reference/h_print_call.html +++ b/v0.3.12/reference/h_print_call.html @@ -1,5 +1,25 @@ - -Printing MMRM Function Call — h_print_call • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_print_call(call, n_obs, n_subjects, n_timepoints)
    -

    Arguments

    -
    call
    +

    Arguments +

    +
    +
    call

    (call)
    original mmrm() function call.

    @@ -134,10 +165,12 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.12/reference/h_print_cov.html b/v0.3.12/reference/h_print_cov.html index 0114d0171..02b2fa30b 100644 --- a/v0.3.12/reference/h_print_cov.html +++ b/v0.3.12/reference/h_print_cov.html @@ -1,5 +1,25 @@ - -Printing MMRM Covariance Type — h_print_cov • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_print_cov(cov_type, n_theta, n_groups)
    -

    Arguments

    -
    cov_type
    +

    Arguments +

    +
    +
    cov_type

    (string)
    covariance structure abbreviation.

    @@ -130,10 +161,12 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.12/reference/h_quad_form.html b/v0.3.12/reference/h_quad_form.html index 40e7296b6..385476295 100644 --- a/v0.3.12/reference/h_quad_form.html +++ b/v0.3.12/reference/h_quad_form.html @@ -1,7 +1,27 @@ - -Quadratic Form Calculations — h_quad_form • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,15 +144,18 @@
    -

    Usage

    +

    Usage +

    h_quad_form_vec(vec, center)
     
     h_quad_form_mat(mat, center)
    -

    Arguments

    -
    vec
    +

    Arguments +

    +
    +
    vec

    (numeric)
    interpreted as a row vector.

    @@ -138,19 +169,24 @@

    Arguments -

    Functions

    +

    Functions +

    -
    • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) +

        +
      • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) as a numeric (not a matrix).

      • h_quad_form_mat(): calculates the quadratic form mat %*% center %*% t(mat) as a matrix, the result is square and has dimensions identical to the number of rows in mat.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_reconcile_cov_struct.html b/v0.3.12/reference/h_reconcile_cov_struct.html index 981a49d7e..342db6af6 100644 --- a/v0.3.12/reference/h_reconcile_cov_struct.html +++ b/v0.3.12/reference/h_reconcile_cov_struct.html @@ -1,5 +1,25 @@ - -Reconcile Possible Covariance Structure Inputs — h_reconcile_cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    h_reconcile_cov_struct(formula = NULL, covariance = NULL)
    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -129,9 +160,11 @@

    Argumentsas.cov_struct(). If no value is provided, a structure is derived from the provided formula.

    -

    + +
    -

    Value

    +

    Value +

    The value covariance if it's provided or a covariance structure @@ -140,7 +173,8 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_record_all_output.html b/v0.3.12/reference/h_record_all_output.html index 2512bae43..18e974eb5 100644 --- a/v0.3.12/reference/h_record_all_output.html +++ b/v0.3.12/reference/h_record_all_output.html @@ -1,9 +1,29 @@ - - + + + + + +Capture all Output — h_record_all_output • mmrm +Capture all Output — h_record_all_output • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -119,13 +147,16 @@
    -

    Usage

    +

    Usage +

    h_record_all_output(expr, remove = list(), divergence = list())
    -

    Arguments

    -
    expr
    +

    Arguments +

    +
    +
    expr

    (expression)
    to be executed.

    @@ -140,20 +171,26 @@

    Arguments -

    Value

    +

    Value +

    -

    A list containing

    • result: The object returned by expr or list() if an error was thrown.

    • +

      A list containing

      +
        +
      • result: The object returned by expr or list() if an error was thrown.

      • warnings: NULL or a character vector if warnings were thrown.

      • errors: NULL or a string if an error was thrown.

      • messages: NULL or a character vector if messages were produced.

      • divergence: NULL or a character vector if divergence messages were caught.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_register_s3.html b/v0.3.12/reference/h_register_s3.html index 98dd85bdf..984bf8c0d 100644 --- a/v0.3.12/reference/h_register_s3.html +++ b/v0.3.12/reference/h_register_s3.html @@ -1,7 +1,27 @@ - -Register S3 Method Register S3 method to a generic. — h_register_s3 • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,13 +144,16 @@
    -

    Usage

    +

    Usage +

    h_register_s3(pkg, generic, class, envir = parent.frame())
    -

    Arguments

    -
    pkg
    +

    Arguments +

    +
    +
    pkg

    (string) name of the package name.

    @@ -137,14 +168,17 @@

    Arguments -

    Details

    +

    Details +

    This function is adapted from emmeans:::register_s3_method().

    + + + + - - + + diff --git a/v0.3.12/reference/h_residuals_normalized.html b/v0.3.12/reference/h_residuals_normalized.html index 0c3494f21..a4a0f7d1d 100644 --- a/v0.3.12/reference/h_residuals_normalized.html +++ b/v0.3.12/reference/h_residuals_normalized.html @@ -1,5 +1,25 @@ - -Calculate normalized residuals — h_residuals_normalized • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,25 +141,31 @@
    -

    Usage

    +

    Usage +

    h_residuals_normalized(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_residuals_pearson.html b/v0.3.12/reference/h_residuals_pearson.html index a98258907..00307ca98 100644 --- a/v0.3.12/reference/h_residuals_pearson.html +++ b/v0.3.12/reference/h_residuals_pearson.html @@ -1,5 +1,25 @@ - -Calculate Pearson Residuals — h_residuals_pearson • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,25 +141,31 @@
    -

    Usage

    +

    Usage +

    h_residuals_pearson(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals.

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_residuals_response.html b/v0.3.12/reference/h_residuals_response.html index eb1d124bd..c6b711096 100644 --- a/v0.3.12/reference/h_residuals_response.html +++ b/v0.3.12/reference/h_residuals_response.html @@ -1,5 +1,25 @@ - -Calculate response residuals. — h_residuals_response • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,25 +141,31 @@
    -

    Usage

    +

    Usage +

    h_residuals_response(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_split_control.html b/v0.3.12/reference/h_split_control.html index 7b033ef2d..dfb7ce080 100644 --- a/v0.3.12/reference/h_split_control.html +++ b/v0.3.12/reference/h_split_control.html @@ -1,7 +1,27 @@ - -Split Control List — h_split_control • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,29 +144,35 @@
    -

    Usage

    +

    Usage +

    h_split_control(control, ...)
    -

    Arguments

    -
    control
    +

    Arguments +

    +
    +
    control

    (mmrm_control)
    object.

    ...

    additional parameters to update the control object.

    -
    + +
    -

    Value

    +

    Value +

    A list of mmrm_control entries.

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_summarize_all_fits.html b/v0.3.12/reference/h_summarize_all_fits.html index 849b4fb2c..4cede7c35 100644 --- a/v0.3.12/reference/h_summarize_all_fits.html +++ b/v0.3.12/reference/h_summarize_all_fits.html @@ -1,5 +1,25 @@ - -Summarizing List of Fits — h_summarize_all_fits • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,25 +141,31 @@
    -

    Usage

    +

    Usage +

    h_summarize_all_fits(all_fits)
    -

    Arguments

    -
    all_fits
    +

    Arguments +

    +
    +
    all_fits

    (list of mmrm_fit or try-error)
    list of fits.

    -
    + +
    -

    Value

    +

    Value +

    List with warnings, messages, log_liks and converged results.

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_tbl_confint_terms.html b/v0.3.12/reference/h_tbl_confint_terms.html index 1137d48e7..2b7e10b9b 100644 --- a/v0.3.12/reference/h_tbl_confint_terms.html +++ b/v0.3.12/reference/h_tbl_confint_terms.html @@ -1,5 +1,25 @@ - -Extract tibble with Confidence Intervals and Term Names — h_tbl_confint_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,29 +141,35 @@
    -

    Usage

    +

    Usage +

    h_tbl_confint_terms(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fit object.

    ...

    passed to stats::confint(), hence not used at the moment.

    -
    + +
    -

    Value

    +

    Value +

    A tibble with term, conf.low, conf.high columns.

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_test_1d.html b/v0.3.12/reference/h_test_1d.html index e7fa28c6c..5d01c3e57 100644 --- a/v0.3.12/reference/h_test_1d.html +++ b/v0.3.12/reference/h_test_1d.html @@ -1,7 +1,27 @@ - -Creating T-Statistic Test Results For One-Dimensional Contrast — h_test_1d • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,13 +144,16 @@
    -

    Usage

    +

    Usage +

    h_test_1d(object, contrast, df)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -135,16 +166,19 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val (2-sided p-value).

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_test_md.html b/v0.3.12/reference/h_test_md.html index a51146888..56c4f88fe 100644 --- a/v0.3.12/reference/h_test_md.html +++ b/v0.3.12/reference/h_test_md.html @@ -1,7 +1,27 @@ - -Creating F-Statistic Test Results For Multi-Dimensional Contrast — h_test_md • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,13 +144,16 @@
    -

    Usage

    +

    Usage +

    h_test_md(object, contrast, df, f_stat_factor = 1)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -137,16 +168,19 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_tr.html b/v0.3.12/reference/h_tr.html index 7fa62a1d6..e8e21f7f8 100644 --- a/v0.3.12/reference/h_tr.html +++ b/v0.3.12/reference/h_tr.html @@ -1,5 +1,25 @@ - -Trace of a Matrix — h_tr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,25 +141,31 @@
    -

    Usage

    +

    Usage +

    h_tr(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (matrix)
    square matrix input.

    -
    + +
    -

    Value

    +

    Value +

    The trace of the square matrix.

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_valid_formula.html b/v0.3.12/reference/h_valid_formula.html index ea5618fc5..56057d54c 100644 --- a/v0.3.12/reference/h_valid_formula.html +++ b/v0.3.12/reference/h_valid_formula.html @@ -1,5 +1,25 @@ - -Validate mmrm Formula — h_valid_formula • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,24 +141,30 @@
    -

    Usage

    +

    Usage +

    h_valid_formula(formula)
    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    to check.

    -
    + +
    -

    Details

    +

    Details +

    In mmrm models, . is not allowed as it introduces ambiguity of covariates to be used, so it is not allowed to be in formula.

    + + + + - - + + diff --git a/v0.3.12/reference/h_var_adj.html b/v0.3.12/reference/h_var_adj.html index 65d6acf42..259aa4578 100644 --- a/v0.3.12/reference/h_var_adj.html +++ b/v0.3.12/reference/h_var_adj.html @@ -1,9 +1,29 @@ - -Obtain the Adjusted Covariance Matrix — h_var_adj • mmrm +Obtain the Adjusted Covariance Matrix — h_var_adj • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -119,13 +147,16 @@
    -

    Usage

    +

    Usage +

    h_var_adj(v, w, p, q, r, linear = FALSE)
    -

    Arguments

    -
    v
    +

    Arguments +

    +
    +
    v

    (matrix)
    unadjusted covariance matrix.

    @@ -148,16 +179,19 @@

    Arguments -

    Value

    +

    Value +

    The matrix of adjusted covariance matrix.

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/h_warn_na_action.html b/v0.3.12/reference/h_warn_na_action.html index 5e5b6062a..30c9b9fe5 100644 --- a/v0.3.12/reference/h_warn_na_action.html +++ b/v0.3.12/reference/h_warn_na_action.html @@ -1,5 +1,25 @@ - -Warn on na.action — h_warn_na_action • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,12 +141,14 @@
    -

    Usage

    +

    Usage +

    h_warn_na_action()
    - + + + + - - + + diff --git a/v0.3.12/reference/h_within_or_between.html b/v0.3.12/reference/h_within_or_between.html index 5d4f9e123..8f5ea513b 100644 --- a/v0.3.12/reference/h_within_or_between.html +++ b/v0.3.12/reference/h_within_or_between.html @@ -1,7 +1,27 @@ - -Determine Within or Between for each Design Matrix Column — h_within_or_between • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,22 +144,27 @@
    -

    Usage

    +

    Usage +

    h_within_or_between(x_matrix, subject_ids)
    -

    Arguments

    -
    x_matrix
    +

    Arguments +

    +
    +
    x_matrix

    (matrix)
    the design matrix with column names.

    subject_ids

    (factor)
    the subject IDs.

    -
    + +
    -

    Value

    +

    Value +

    Character vector with "intercept", "within" or "between" for each @@ -139,7 +172,8 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/index.html b/v0.3.12/reference/index.html index 95741daed..1106f050d 100644 --- a/v0.3.12/reference/index.html +++ b/v0.3.12/reference/index.html @@ -1,5 +1,23 @@ - -Function reference • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +44,8 @@ + - + + - + @@ -107,195 +133,262 @@
    -

    Package

    +

    Package +

    -
    +
    +
    -
    +
    +
    mmrm-package
    -
    mmrm Package
    -
    -

    Functions

    +
    +mmrm Package
    + +
    +
    +

    Functions +

    -
    +
    +
    -
    +
    +
    mmrm()
    Fit an MMRM
    -
    +
    +
    +
    fit_mmrm()
    Low-Level Fitting Function for MMRM
    -
    +
    +
    +
    mmrm_control()
    Control Parameters for Fitting an MMRM
    -
    +
    +
    +
    fit_single_optimizer()
    Fitting an MMRM with Single Optimizer
    -
    +
    +
    +
    refit_multiple_optimizers()
    Refitting MMRM with Multiple Optimizers
    -
    +
    +
    +
    df_1d()
    Calculation of Degrees of Freedom for One-Dimensional Contrast
    -
    +
    +
    +
    df_md()
    Calculation of Degrees of Freedom for Multi-Dimensional Contrast
    -
    +
    +
    +
    component()
    Component Access for mmrm_tmb Objects
    -
    -

    Start Values

    + +
    +
    +

    Start Values +

    -
    +
    +
    -
    +
    +
    std_start()
    Standard Starting Value
    -
    +
    +
    +
    emp_start()
    Empirical Starting Value
    -
    -

    Methods

    + +
    +
    +

    Methods +

    -
    +
    +
    -

    Covariance Structures

    + +
    +
    +

    Covariance Structures +

    -
    +
    +
    -
    +
    +
    cov_struct()
    Define a Covariance Structure
    -
    +
    +
    +
    as.cov_struct()
    Coerce into a Covariance Structure Definition
    -
    +
    +
    +
    format(<cov_struct>)
    Format Covariance Structure Object
    -
    +
    +
    +
    print(<cov_struct>)
    Print a Covariance Structure Object
    -
    +
    +
    +
    cov_types()
    Covariance Types
    -
    -

    Estimate Marginal Means

    + +
    +
    +

    Estimate Marginal Means +

    -
    +
    +
    -
    +
    +
    emmeans_support
    -
    Support for emmeans
    -
    -

    Datasets

    +
    Support for emmeans +
    + +
    +
    +

    Datasets +

    -
    +
    +
    -
    +
    +
    fev_data
    Example Data on FEV1
    -
    +
    +
    +
    bcva_data
    Example Data on BCVA
    -
    + + + + + + - - + + diff --git a/v0.3.12/reference/is_infix.html b/v0.3.12/reference/is_infix.html index 71959423c..b24cc3dfb 100644 --- a/v0.3.12/reference/is_infix.html +++ b/v0.3.12/reference/is_infix.html @@ -1,5 +1,25 @@ - -Test Whether a Symbol is an Infix Operator — is_infix • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,34 +141,44 @@
    -

    Usage

    +

    Usage +

    is_infix(name)
    -

    Arguments

    -
    name
    +

    Arguments +

    +
    +
    name

    (symbol or name or string)
    a possible reference to an infix operator to check.

    -
    + +
    -

    Value

    +

    Value +

    A logical indicating whether the name is the name of an infix operator.

    -

    is_infix(as.name("|"))
    +

    +
    +
    is_infix(as.name("|"))
     is_infix("|")
    -is_infix("c")

    +is_infix("c")
    +

    +
    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/mmrm-package.html b/v0.3.12/reference/mmrm-package.html index 66d5dcaf3..1178f3ccd 100644 --- a/v0.3.12/reference/mmrm-package.html +++ b/v0.3.12/reference/mmrm-package.html @@ -1,5 +1,25 @@ - -mmrm Package — mmrm-package • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -114,15 +143,23 @@
    -

    See also

    -
    -

    Author

    +

    Author +

    Maintainer: Daniel Sabanes Bove daniel.sabanes_bove@rconis.com

    -

    Authors:

    + +
    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/mmrm.html b/v0.3.12/reference/mmrm.html index efbc4e853..24338fa5f 100644 --- a/v0.3.12/reference/mmrm.html +++ b/v0.3.12/reference/mmrm.html @@ -1,7 +1,27 @@ - -Fit an MMRM — mmrm • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -116,7 +144,8 @@
    -

    Usage

    +

    Usage +

    mmrm(
       formula,
       data,
    @@ -129,8 +158,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -163,15 +194,18 @@

    Argumentsmmrm_control().

    -

    + +
    -

    Value

    +

    Value +

    An mmrm object.

    -

    Details

    +

    Details +

    The formula typically looks like: FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID) so specifies response and covariates as usual, and exactly one special term @@ -197,15 +231,19 @@

    Detailsmmrm.

    -

    Note

    +

    Note +

    The mmrm object is also an mmrm_fit and an mmrm_tmb object, therefore corresponding methods also work (see mmrm_tmb_methods).

    -

    Additional contents depend on the choice of the adjustment method:

    • If Satterthwaite adjustment is used, the Jacobian information jac_list +

      Additional contents depend on the choice of the adjustment method:

      +
        +
      • If Satterthwaite adjustment is used, the Jacobian information jac_list is included.

      • If Kenward-Roger adjustment is used, kr_comp contains necessary components and beta_vcov_adj includes the adjusted coefficients covariance matrix.

      • -

      Use of the package emmeans is supported, see emmeans_support.

      +
    +

    Use of the package emmeans is supported, see emmeans_support.

    NA values are always omitted regardless of na.action setting.

    When the number of visit levels is large, it usually requires large memory to create the covariance matrix. By default, the maximum allowed visit levels is 100, and if there are more @@ -216,7 +254,8 @@

    Note

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -240,7 +279,8 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.12/reference/mmrm_control.html b/v0.3.12/reference/mmrm_control.html index 890931a9c..3562af644 100644 --- a/v0.3.12/reference/mmrm_control.html +++ b/v0.3.12/reference/mmrm_control.html @@ -1,9 +1,29 @@ - - + + + + + +Control Parameters for Fitting an MMRM — mmrm_control • mmrm +Control Parameters for Fitting an MMRM — mmrm_control • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -119,7 +147,8 @@
    -

    Usage

    +

    Usage +

    mmrm_control(
       n_cores = 1L,
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within"),
    @@ -133,8 +162,10 @@ 

    Usage

    -

    Arguments

    -
    n_cores
    +

    Arguments +

    +
    +
    n_cores

    (count)
    number of cores to be used.

    @@ -168,15 +199,18 @@

    Argumentsh_get_optimizers().

    -

    + +
    -

    Value

    +

    Value +

    List of class mmrm_control with the control parameters.

    -

    Details

    +

    Details +

    For example, if the data only has observations at visits VIS1, VIS3 and VIS4, by default they are treated to be equally spaced, the distance from VIS1 to VIS3, and from VIS3 to VIS4, are identical. However, you can manually convert this visit into a factor, with @@ -184,14 +218,45 @@

    DetailsVIS1 to VIS3 will be double, as VIS2 is a valid visit. However, please be cautious because this can lead to convergence failure when using an unstructured covariance matrix and there are no observations -at the missing visits.

    + +
    -

    Examples

    +

    Examples +

    mmrm_control(
       optimizer_fun = stats::optim,
       optimizer_args = list(method = "L-BFGS-B")
    @@ -327,7 +394,8 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.12/reference/mmrm_methods.html b/v0.3.12/reference/mmrm_methods.html index d400843e6..496e140e0 100644 --- a/v0.3.12/reference/mmrm_methods.html +++ b/v0.3.12/reference/mmrm_methods.html @@ -1,5 +1,25 @@ - -Methods for mmrm Objects — mmrm_methods • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm
     summary(object, ...)
     
    @@ -130,52 +159,69 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the fitted MMRM including Jacobian and call etc.

    ...

    not used.

    -
    + +
    -

    Value

    +

    Value +

    Depends on the method, see Details and Functions.

    -

    Details

    -

    While printing the summary of (mmrm)
    object, the following will be displayed:

    1. Formula. The formula used in the model.

    2. +

      Details +

      +

      While printing the summary of (mmrm)
      object, the following will be displayed:

      +
        +
      1. Formula. The formula used in the model.

      2. Data. The data used for analysis, including number of subjects, number of valid observations.

      3. Covariance. The covariance structure and number of variance parameters.

      4. Method. Restricted maximum likelihood(REML) or maximum likelihood(ML).

      5. Model selection criteria. AIC, BIC, log likelihood and deviance.

      6. Coefficients. Coefficients of the covariates.

      7. -
      8. Covariance estimate. The covariance estimate(for each group).

        1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available +

        2. +

          Covariance estimate. The covariance estimate(for each group).

          +
            +
          1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available in data will be displayed.

          2. If the covariance structure is spatial, the covariance matrix of two time points with unit distance will be displayed.

          3. -
        3. -

        confint is used to obtain the confidence intervals for the coefficients. +

      + +
    +

    confint is used to obtain the confidence intervals for the coefficients. Please note that this is different from the confidence interval of difference of least square means from emmeans.

    -

    Functions

    +

    Functions +

    -
    • summary(mmrm): summarizes the MMRM fit results.

    • +
        +
      • summary(mmrm): summarizes the MMRM fit results.

      • print(summary.mmrm): prints the MMRM fit summary.

      • confint(mmrm): obtain the confidence intervals for the coefficients.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_tmb_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- mmrm(formula, fev_data)
     # Summary:
    @@ -246,7 +292,8 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.12/reference/mmrm_tidiers.html b/v0.3.12/reference/mmrm_tidiers.html index d7382e1b8..51cb2ea6d 100644 --- a/v0.3.12/reference/mmrm_tidiers.html +++ b/v0.3.12/reference/mmrm_tidiers.html @@ -1,9 +1,29 @@ - - + + + + + +Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm +Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -119,7 +147,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm
     tidy(x, conf.int = FALSE, conf.level = 0.95, ...)
     
    @@ -138,8 +167,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fitted model.

    @@ -171,21 +202,27 @@

    Argumentsresiduals.mmrm_tmb().

    -

    + +
    -

    Functions

    +

    Functions +

    -
    • tidy(mmrm): derives tidy tibble from an mmrm object.

    • +
        +
      • tidy(mmrm): derives tidy tibble from an mmrm object.

      • glance(mmrm): derives glance tibble from an mmrm object.

      • augment(mmrm): derives augment tibble from an mmrm object.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tmb_methods for additional methods.

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -277,7 +314,8 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.12/reference/mmrm_tmb_methods.html b/v0.3.12/reference/mmrm_tmb_methods.html index f4c8d69be..1130e1594 100644 --- a/v0.3.12/reference/mmrm_tmb_methods.html +++ b/v0.3.12/reference/mmrm_tmb_methods.html @@ -1,5 +1,25 @@ - -Methods for mmrm_tmb Objects — mmrm_tmb_methods • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm_tmb
     coef(object, complete = TRUE, ...)
     
    @@ -187,8 +216,10 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM object.

    @@ -278,15 +309,18 @@

    Arguments -

    + +
    -

    Value

    +

    Value +

    Depends on the method, see Functions.

    -

    Details

    +

    Details +

    include argument controls the variables the returned model frame will include. Possible options are "response_var", "subject_var", "visit_var" and "group_var", representing the response variable, subject variable, visit variable or group variable. @@ -294,9 +328,11 @@

    Detailsmodel.matrix.

    -

    Functions

    +

    Functions +

    -
    • coef(mmrm_tmb): obtains the estimated coefficients.

    • +
        +
      • coef(mmrm_tmb): obtains the estimated coefficients.

      • fitted(mmrm_tmb): obtains the fitted values.

      • predict(mmrm_tmb): predict conditional means for new data; optionally with standard errors and confidence or prediction intervals. @@ -330,11 +366,14 @@

        Functions -

        References

        +

        References +

        -
        • Hurvich CM, Tsai C (1989). +

          • Gałecki A, Burzykowski T (2013). +

          +
            +
          • Gałecki A, Burzykowski T (2013). “Linear mixed-effects model.” In Linear mixed-effects models using R, 245--273. Springer.

          • -
    + +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- fit_mmrm(formula, fev_data, weights = rep(1, nrow(fev_data)))
     # Estimated coefficients:
    @@ -3869,7 +3913,8 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.12/reference/parsnip_add_mmrm.html b/v0.3.12/reference/parsnip_add_mmrm.html index bbe2170b5..64d735c4c 100644 --- a/v0.3.12/reference/parsnip_add_mmrm.html +++ b/v0.3.12/reference/parsnip_add_mmrm.html @@ -1,5 +1,25 @@ - -Register mmrm For Use With tidymodels — parsnip_add_mmrm • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -113,30 +142,37 @@
    -

    Usage

    +

    Usage +

    parsnip_add_mmrm(quietly = FALSE)
    -

    Arguments

    -
    quietly
    +

    Arguments +

    +
    +
    quietly

    logical: should progress and error messages be suppressed?

    -
    + +
    -

    Value

    +

    Value +

    A logical value indicating whether registration was successful.

    -

    Details

    +

    Details +

    We can use parsnip::show_model_info("linear_reg") to check the registration with parsnip and thus the wider tidymodels ecosystem.

    + + + + - - + + diff --git a/v0.3.12/reference/position_symbol.html b/v0.3.12/reference/position_symbol.html index 78469ee30..3a6c8f0a8 100644 --- a/v0.3.12/reference/position_symbol.html +++ b/v0.3.12/reference/position_symbol.html @@ -1,9 +1,29 @@ - - + + + + + +Search For the Position of a Symbol — position_symbol • mmrm +Search For the Position of a Symbol — position_symbol • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -119,13 +147,16 @@
    -

    Usage

    +

    Usage +

    position_symbol(x, sym, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (list of language)
    a list of language objects in which to search for a specific symbol.

    @@ -138,9 +169,11 @@

    ArgumentsPosition().

    -

    + +
    -

    Value

    +

    Value +

    The position of the symbol if found, or the nomatch value @@ -148,7 +181,8 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/print.cov_struct.html b/v0.3.12/reference/print.cov_struct.html index 5ee7d283d..86e362485 100644 --- a/v0.3.12/reference/print.cov_struct.html +++ b/v0.3.12/reference/print.cov_struct.html @@ -1,5 +1,25 @@ - -Print a Covariance Structure Object — print.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,30 +141,36 @@
    -

    Usage

    +

    Usage +

    # S3 method for cov_struct
     print(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    ...

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    x invisibly.

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/reexports.html b/v0.3.12/reference/reexports.html index 0beac00e5..45382fdc8 100644 --- a/v0.3.12/reference/reexports.html +++ b/v0.3.12/reference/reexports.html @@ -1,19 +1,39 @@ - - + + + + + +Objects exported from other packages — reexports • mmrm +Objects exported from other packages — reexports • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -38,7 +60,8 @@ + - + + - + @@ -125,15 +153,18 @@

    These objects are imported from other packages. Follow the links below to see their documentation.

    -
    generics
    +
    +
    generics

    augment, glance, tidy

    -
    + + - + +
    -
    + + - - + + diff --git a/v0.3.12/reference/refit_multiple_optimizers.html b/v0.3.12/reference/refit_multiple_optimizers.html index c7ac1243f..67769765d 100644 --- a/v0.3.12/reference/refit_multiple_optimizers.html +++ b/v0.3.12/reference/refit_multiple_optimizers.html @@ -1,5 +1,25 @@ - -Refitting MMRM with Multiple Optimizers — refit_multiple_optimizers • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    refit_multiple_optimizers(fit, ..., control = mmrm_control(...))
    -

    Arguments

    -
    fit
    +

    Arguments +

    +
    +
    fit

    (mmrm_fit)
    original model fit from fit_single_optimizer().

    @@ -130,20 +161,24 @@

    Arguments -

    Value

    +

    Value +

    The best (in terms of log likelihood) fit which converged.

    -

    Note

    +

    Note +

    For Windows, no parallel computations are currently implemented.

    -

    Examples

    +

    Examples +

    fit <- fit_single_optimizer(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data,
    @@ -154,7 +189,8 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.12/reference/register_on_load.html b/v0.3.12/reference/register_on_load.html index 5291e384d..591f1dca9 100644 --- a/v0.3.12/reference/register_on_load.html +++ b/v0.3.12/reference/register_on_load.html @@ -1,5 +1,25 @@ - -Helper Function for Registering Functionality With Suggests Packages — register_on_load • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,7 +141,8 @@
    -

    Usage

    +

    Usage +

    register_on_load(
       pkg,
       ver = c(NA_character_, NA_character_),
    @@ -123,8 +152,10 @@ 

    Usage

    -

    Arguments

    -
    pkg
    +

    Arguments +

    +
    +
    pkg

    (string)
    package name.

    @@ -145,9 +176,11 @@

    Arguments -

    Value

    +

    Value +

    A logical (invisibly) indicating whether registration was successful. @@ -155,7 +188,8 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/std_start.html b/v0.3.12/reference/std_start.html index 0aefc60a5..fecf83830 100644 --- a/v0.3.12/reference/std_start.html +++ b/v0.3.12/reference/std_start.html @@ -1,5 +1,25 @@ - -Standard Starting Value — std_start • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,13 +141,16 @@
    -

    Usage

    +

    Usage +

    std_start(cov_type, n_visits, n_groups, ...)
    -

    Arguments

    -
    cov_type
    +

    Arguments +

    +
    +
    cov_type

    (string)
    name of the covariance structure.

    @@ -134,15 +165,18 @@

    Arguments -

    Value

    +

    Value +

    A numeric vector of starting values.

    -

    Details

    +

    Details +

    std_start will try to provide variance parameter from identity matrix. However, for ar1 and ar1h the corresponding values are not ideal because the \(\rho\) is usually a positive number thus using 0 as starting value can lead to @@ -150,7 +184,8 @@

    Details

    + + + + - - + + diff --git a/v0.3.12/reference/tmb_cov_type.html b/v0.3.12/reference/tmb_cov_type.html index 5b4a3c122..f2b81bb9f 100644 --- a/v0.3.12/reference/tmb_cov_type.html +++ b/v0.3.12/reference/tmb_cov_type.html @@ -1,5 +1,25 @@ - -Produce A Covariance Identifier Passing to TMB — tmb_cov_type • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,25 +141,31 @@
    -

    Usage

    +

    Usage +

    tmb_cov_type(cov)
    -

    Arguments

    -
    cov
    +

    Arguments +

    +
    +
    cov

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    A string used for method dispatch when passed to TMB.

    + +
    -
    + + - - + + diff --git a/v0.3.12/reference/validate_cov_struct.html b/v0.3.12/reference/validate_cov_struct.html index 2ba6304c8..94731c693 100644 --- a/v0.3.12/reference/validate_cov_struct.html +++ b/v0.3.12/reference/validate_cov_struct.html @@ -1,5 +1,25 @@ - -Validate Covariance Structure Data — validate_cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -113,25 +141,31 @@
    -

    Usage

    +

    Usage +

    validate_cov_struct(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    x if successful, or an error is thrown otherwise.

    + +
    -
    + + - - + + diff --git a/v0.3.13/404.html b/v0.3.13/404.html index 45479b293..b61a6614d 100644 --- a/v0.3.13/404.html +++ b/v0.3.13/404.html @@ -1,5 +1,4 @@ - - + @@ -70,11 +69,10 @@ +v0.2.2 + + + + + + @@ -95,46 +119,66 @@

    Thank you for your interest in contributing to this repo! Your contribution is highly valued. Please go through this document for guidance on how to contribute.

    -

    Programming conventions

    +

    Programming conventions +

    Please follow the programming conventions to ensure a consistent programming style across the package.

    Generally we follow the tidyverse style guide. Some specific conventions that deviate from this are explained below.

    -

    Functions

    -
    1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
    2. +

      Functions +

      +
        +
      1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
      2. Functions starting with h_ are helper functions and they should not be exported.
      3. Functions should be well documented using roxygen2 (even when they are not exported).
      4. Functions must be unit tested (even when they are not exported).
      5. -
    + +
    -

    Imports

    +

    Imports +

    In package mmrm, we follow the following convention in package imports.

    -
    1. When only a few functions from another package are needed: -
      1. In DESCRIPTION, add that package into Imports.
      2. +
          +
        1. When only a few functions from another package are needed: +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we add a importFrom with a single function from the package. -
            1. The function imported can be any random function within the package.
            2. -
          3. +
              +
            1. The function imported can be any random function within the package.
            2. +
            +
          4. Always use package::function style wherever you need to use the function.
          5. Example: stats.
          6. -
        2. +
        +
      3. When many functions from another package are needed: -
        1. In DESCRIPTION, add that package into Imports.
        2. +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we use a import to import every function.
          3. Use the functions directly without prefix.
          4. Example: checkmate.
          5. -
          -
    + + + +
    -

    Comments

    -
    • Comments should always follow sentence style.
    • +

      Comments +

      +
        +
      • Comments should always follow sentence style.
      • Comments should be as minimal as possible: Generally the code and variable names should be clear enough to not need any comments. Only use them when needed and explain the “Why” and not the “What”.
      • -
    + +
    -

    Documentation

    -
    • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

    • +

      Documentation +

      +
        +
      • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

      • Exported objects must have a lifecycle badge to clarify the maturity.

        -
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • -
      • +
          +
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • +
        +
      • Use Title Style for the title of the documentation.

      • Always include a @description part with at least one sentence describing the object.

      • @@ -146,38 +190,55 @@

        Documentationwebsite.

      • In vignettes, you cannot directly reference help pages but only pkgdown web pages. Note that this includes only exported objects. To make it look similar to the help page references, please here also use function() style.

      • mmrm_review_methods.Rmd is a large vignette and we precompute this vignette to make the GitHub actions faster. Run the script vignettes/precompile.R to regenerate the precomputed vignette and subsequently update it in GitHub. Before every release we need to run this again. Please note you need to install the package and then compile the vignette because efficiency is better after installation to provide a fair comparison.

      • -
    + +
    -

    Github conventions

    +

    Github conventions +

    When using GitHub to collaborate, the following conventions are needed:

    -
    1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. -
      • If you are going to work on this issue, please assign yourself.
      • -
    2. +
        +
      1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. +
          +
        • If you are going to work on this issue, please assign yourself.
        • +
        +
      2. Please create a branch in the mmrm repository, instead of creating forks, unless you are not yet a team member. -
        • Branches should be associated with a GitHub issue and linked to an issue id.
        • +
            +
          • Branches should be associated with a GitHub issue and linked to an issue id.
          • The name of a branch should be of the form: <issue_id>_<short_discription>.
          • -
          +
        +
      3. Add changes to the branch and push it to GitHub. -
        • Please use clear commit messages.
        • +
            +
          • Please use clear commit messages.
          • Please keep your changes focused on the issue. If there are independent changes, please separate it into another PR linking to another issue.
          • -
          +
        +
      4. Please create a Pull Request when you think your code changes are ready: -
        • Functions are well documented.
        • +
            +
          • Functions are well documented.
          • Functions have corresponding unit tests.
          • Changes pass all the GitHub action checks.
          • The checklist in the corresponding issue is completed.
          • -
          +
        +
      5. Address all the comments you receive. -
        • at least one approval is needed to merge.
        • -
      6. -
    +
      +
    • at least one approval is needed to merge.
    • +
    + + +
    -

    Contribution tips

    +

    Contribution tips +

    -

    Development environment Set-up

    +

    Development environment Set-up +

    The development this mmrm package is based on the latest R version and C++ compilers. The package dependencies are the most recent versions from CRAN. We recommend that your working environment is set up in the same way. Additionally, there are some tools we recommend you to install:

    -
    1. +
        +
      1. RTools if you work on a Windows operating system. Alternatively you can use docker to separate the operating system and the development system.
      2. GitKraken is a very useful user interface for git including visualization of git commit graphs, file history, etc.
      3. @@ -185,43 +246,82 @@

        Development environment Set-uplintr will allow you to perform static code analysis.
      4. pre-commit is a Python module that allows you to identify issues before you commit locally.
      5. -

    + +
    -

    Issue labels

    +

    Issue labels +

    The issues are categorized with several labels:

    - +
    Label name
    ++++ + + - + + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + -
    Label name Description
    SPx
    SPx SP (story points) indicate complexity, and the larger the subsequent number, the more time consuming the issue is expected to be
    priority
    priority Issues with this label should be completed with higher priority
    good first issue
    good first issue Good choices for new team members
    blocked
    blocked Blocked by other issues
    bug
    bug Something isn’t working
    devops
    devops Development and Operation
    discussion
    discussion Discussion needed
    documentation
    documentation Improvement of documentation is needed
    duplicate
    duplicate The issue already exists
    enhancement
    enhancement New feature or request
    help wanted
    help wanted Extra attention is needed
    invalid
    invalid This doesn’t seem right
    question
    question Further information needed

    Please choose an issue based on your interest, issue complexity, and priority.

    + + + +

    Please choose an issue based on your interest, issue complexity, and priority.

    -

    Add new unit tests

    +

    Add new unit tests +

    To add a new unit test, you need to first identify the test scope. Does the test fit in the scope of existing tests? If so, please modify the existing test files under tests/testthat/ folder or src/ folder, depending on whether the code to be tested is R or C++. Otherwise please create a new test file, with a name prefix of “test-”.

    In each test case, use the following structure:

    @@ -234,19 +334,25 @@ 

    Add new unit tests -

    Add integration tests

    +

    Add integration tests +

    Integration tests compare the results of SAS and R and assures the quality of our code. To add an integration test, you need to do the following:

    -
    1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
    2. +
        +
      1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
      2. Save the results in .txt format in the design/SAS/ folder.
      3. Decide the key outputs that are needed for comparison.
      4. Add a unit test verifying that the R implementation of the same model has the same results (conversion may be needed).
      5. -
    + +
    -

    Get started with C++

    +

    Get started with C++ +

    If you have no experience with C++, it is totally fine: TMB has provided us with many high-level functionalities that is very similar to R. Here we only list the most important things that you need to go through before you begin C++ programming.

    -
    1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
    2. +
        +
      1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
      2. Types. C++ is a strong type programming language and all objects need to be declared with type. Sometimes you can combine the declaration and definition. -
        1. +
            +
          1. int i = 1; This works, as we declare i as int and define it to be 1.
          2. i = 1; This fails, because i is not declared yet.
          3. @@ -254,53 +360,70 @@

            Get started with C++
          4. in R, if (TRUE) { a = '123' }; print(a) is legal.
          5. +
              +
            1. in R, if (TRUE) { a = '123' }; print(a) is legal.
            2. in C++, if (1) {string a = '123'}; std::stdout << a << std::endl; is illegal, because object a is terminated already.
            3. in C++, string a; if (1) {a = '123'}; std::stdout << a << std::endl; is legal, a is declared prior to if statement.
            4. -
            +

          +
        2. Polymorphism. Unlike in R, where function arguments have no explicitly defined types, in C++ the type of each argument of a function must be pre-specified. -
          1. +
              +
            1. Template is a special function that works with generic argument type. We could imagine a single function that could work on arguments of arbitrary type, and template functions make this possible through separation of function logic from the argument declaration. In this way we can use template functions and avoid the need to replicate the whole code for each type.
            2. -
          2. -

          With these points in mind, you are about ready to go.

          +
        +
      3. +
      +

      With these points in mind, you are about ready to go.

    -

    Get started with TMB

    +

    Get started with TMB +

    In mmrm we are not including any latent variables and so the Laplace approximation aspect of TMB is not used. We only use the automatic differentiation part of TMB. For detailed documentation of TMB, visit the TMB reference.

    One important feature of TMB are the R style matrix/array calculations. This is important because we mainly use this part to conduct our calculations. See matrix_arrays.cpp for examples.

    -

    Add a new covariance structure

    +

    Add a new covariance structure +

    To add a new covariance structure, you need to do the following:

    -
    1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
    2. +
        +
      1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
      2. Implement the covariance structure on the C++ side and the corresponding R interface.
      3. Add unit tests to make sure the new covariance structure is working as expected.
      4. Add integration tests under design/SAS/ folder to make sure SAS and R produce similar results (within tolerance).
      5. -
    + +
    -

    Add additional data

    +

    Add additional data +

    To add additional data to mmrm, please follow the next steps:

    -
    1. Make sure the data is needed.
    2. +
        +
      1. Make sure the data is needed.
      2. Document the data in R/data.R.
      3. Use save to create an rda data only containing this dataset. Here the function usethis::use_data can also be helpful.
      4. -
    + +
    -

    Communications within team

    +

    Communications within team +

    There are several communication channels, please use appropriate ones.

    -

    GitHub

    +

    GitHub +

    GitHub issues and pull requests are where implementations are discussed and reviewed. Feature requests, bugs, enhancements, technical implementations can be discussed here. When you have ideas that needs to be documented, it is better to have them in GitHub.

    -

    Slack

    +

    Slack +

    Slack is a messaging tool and we have the mmrm channel under the rinpharma space. You can put anything in the slack channel, e.g., you have completed a issue and are waiting for review, or you have some questions and don’t want to wait until the next stand-up meeting.

    To join the slack channel, please make sure you have a slack account, and send the email address to any team member.

    -

    Stand-up meetings

    +

    Stand-up meetings +

    We have stand-up meetings currently three times a week. The purpose of stand-up meetings is for team members to discuss the current work progress and raise any issue/questions for team discussion if needed.

    You don’t need to join all three meetings.

    @@ -308,7 +431,8 @@

    Stand-up meetings

    + + - + + - + + diff --git a/v0.3.13/PULL_REQUEST_TEMPLATE.html b/v0.3.13/PULL_REQUEST_TEMPLATE.html index adf4b883c..ce61e852e 100644 --- a/v0.3.13/PULL_REQUEST_TEMPLATE.html +++ b/v0.3.13/PULL_REQUEST_TEMPLATE.html @@ -1,11 +1,25 @@ - -Description • mmrm + + + + + + + + + Skip to contents @@ -21,10 +35,12 @@ + + + + + @@ -96,7 +120,8 @@ - + +
    -
    - + + - + + diff --git a/v0.3.13/articles/algorithm.html b/v0.3.13/articles/algorithm.html index f333e3fd2..d9954b7a0 100644 --- a/v0.3.13/articles/algorithm.html +++ b/v0.3.13/articles/algorithm.html @@ -1,5 +1,4 @@ - - + @@ -69,11 +68,10 @@ +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + + + + + @@ -94,60 +118,86 @@

    Introduction

    -
    Package Introduction
    +
    +
    Package Introduction
    -
    Mixed Models for Repeated Measures
    + +
    Mixed Models for Repeated Measures
    -
    Comparison with other software
    + +
    Comparison with other software
    -
    + +
    +

    Covariance Structures

    -
    Covariance Structures
    +
    +
    Covariance Structures
    -
    + + + + + + + + + + + + + + + + +
    -
    - + + - + + diff --git a/v0.3.13/articles/introduction.html b/v0.3.13/articles/introduction.html index 88f35941a..d6a091161 100644 --- a/v0.3.13/articles/introduction.html +++ b/v0.3.13/articles/introduction.html @@ -1,5 +1,4 @@ - - + @@ -69,11 +68,10 @@ +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + + + + + @@ -93,7 +117,8 @@

    Authors

    -
    • +
        +
      • Daniel Sabanes Bove. Author, maintainer.

      • @@ -169,7 +194,8 @@

        Authors

        inferential.biostatistics GmbH. Copyright holder, funder.

        -
    + +

    Citation

    @@ -189,7 +215,8 @@

    Citation

    + +
    -
    - + + - + + diff --git a/v0.3.13/index.html b/v0.3.13/index.html index 533b93262..4887fa857 100644 --- a/v0.3.13/index.html +++ b/v0.3.13/index.html @@ -1,5 +1,4 @@ - - + @@ -72,11 +71,10 @@ +v0.2.2 + + + + + + @@ -92,10 +116,13 @@
    -

    mmrm 0.3.13

    +

    mmrm 0.3.13 +

    -

    Bug Fixes

    -
    • When running with TMB package versions below 1.9.15, MMRM fit results are not completely reproducible. While this may not be relevant for most applications, because the numerical differences are very small, we now issue a warning to the user if this is the case. We advise users to upgrade their TMB package versions to 1.9.15 or higher to ensure reproducibility.
    • +

      Bug Fixes +

      +
        +
      • When running with TMB package versions below 1.9.15, MMRM fit results are not completely reproducible. While this may not be relevant for most applications, because the numerical differences are very small, we now issue a warning to the user if this is the case. We advise users to upgrade their TMB package versions to 1.9.15 or higher to ensure reproducibility.
      • Previously, mmrm ignored contrasts defined for covariates in the input data set. This is fixed now.
      • Previously, predict always required the response to be valid, even for unconditional predictions. This is fixed now and unconditional prediction does not require the response to be valid or present any longer.
      • @@ -103,77 +130,119 @@

        Bug Fixesemmeans::emmeans returned NA for spatial covariance structures. This is fixed now.

      • Previously car::Anova gave incorrect results if an interaction term is included and the covariate of interest was not the first categorical variable. This is fixed now.
      • Previously car::Anova failed if the model did not contain an intercept. This is fixed now.
      • -
    + +
    -

    Miscellaneous

    -
    • Upon fitting an MMRM, it is checked whether a not reproducible optimization feature of TMB is turned on. If so, a warning is issued to the user once per session.
    • +

      Miscellaneous +

      +
        +
      • Upon fitting an MMRM, it is checked whether a not reproducible optimization feature of TMB is turned on. If so, a warning is issued to the user once per session.
      • mmrm now checks on the positive definiteness of the covariance matrix theta_vcov. If it is not positive definite, non-convergence is messaged appropriately.
      • model.matrix has been updated to ensure that the NA values are dropped. Additionally, an argument use_response is added to decide whether records with NA values in the response should be discarded.
      • predict has been updated to allow duplicated subject IDs for unconditional prediction.
      • -
    + +
    -

    mmrm 0.3.12

    CRAN release: 2024-06-26

    +

    mmrm 0.3.12 +

    +

    CRAN release: 2024-06-26

    -

    New Features

    -
    • Add parameter conditional for predict method to control whether the prediction is conditional on the observation or not.
    • -
    +

    New Features +

    +
      +
    • Add parameter conditional for predict method to control whether the prediction is conditional on the observation or not.
    • +
    +
    -

    Bug Fixes

    -
    • Previously if the left hand side of a model formula is an expression, predict and simulate will fail. This is fixed now.
    • -
    +

    Bug Fixes +

    +
      +
    • Previously if the left hand side of a model formula is an expression, predict and simulate will fail. This is fixed now.
    • +
    +
    -

    mmrm 0.3.11

    CRAN release: 2024-03-05

    +

    mmrm 0.3.11 +

    +

    CRAN release: 2024-03-05

    -

    Bug Fixes

    -
    • Previously if a secondary optimizer fails mmrm will fail. This is fixed now.
    • +

      Bug Fixes +

      +
        +
      • Previously if a secondary optimizer fails mmrm will fail. This is fixed now.
      • Previously character covariate variables will make Anova fail. This is fixed now.
      • -
    + +
    -

    mmrm 0.3.10

    CRAN release: 2024-01-26

    +

    mmrm 0.3.10 +

    +

    CRAN release: 2024-01-26

    -

    Miscellaneous

    -
    • Fix internal test skipping functions for MacOS R.
    • -
    +

    Miscellaneous +

    +
      +
    • Fix internal test skipping functions for MacOS R.
    • +
    +
    -

    mmrm 0.3.9

    CRAN release: 2024-01-25

    +

    mmrm 0.3.9 +

    +

    CRAN release: 2024-01-25

    -

    Miscellaneous

    -
    • Fix internal test skipping functions for R versions older than 4.3.
    • -
    +

    Miscellaneous +

    +
      +
    • Fix internal test skipping functions for R versions older than 4.3.
    • +
    +
    -

    mmrm 0.3.8

    CRAN release: 2024-01-24

    +

    mmrm 0.3.8 +

    +

    CRAN release: 2024-01-24

    -

    New Features

    -
    • +

      New Features +

      +
        +
      • Anova is implemented for mmrm models and available upon loading the car package. It supports type II and III hypothesis testing.
      • The argument start for mmrm_control() is updated to allow better choices of initial values.
      • confint on mmrm models will give t-based confidence intervals now, instead of the normal approximation.
      • -
    + +
    -

    Bug Fixes

    -
    • Previously if the first optimizer failed, the best successful fit among the remaining optimizers was not returned correctly. This is fixed now.
    • -
    +

    Bug Fixes +

    +
      +
    • Previously if the first optimizer failed, the best successful fit among the remaining optimizers was not returned correctly. This is fixed now.
    • +
    +
    -

    Miscellaneous

    -
    • In documentation of mmrm_control(), the allowed vcov definition is corrected to “Empirical-Jackknife” (CR3), and “Empirical-Bias-Reduced” (CR2).
    • +

      Miscellaneous +

      +
        +
      • In documentation of mmrm_control(), the allowed vcov definition is corrected to “Empirical-Jackknife” (CR3), and “Empirical-Bias-Reduced” (CR2).
      • Fixed a compiler warning related to missing format specification.
      • If an empty contrast matrix is provided to df_md, it will return statistics with NA values.
      • -
    + +
    -

    mmrm 0.3.7

    CRAN release: 2023-12-08

    +

    mmrm 0.3.7 +

    +

    CRAN release: 2023-12-08

    -

    New Features

    -
    • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
    • +

      New Features +

      +
        +
      • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
      • Add empirical, empirical Jackknife and empirical bias-reduced adjusted coefficients covariance estimates, which can be specified via the new vcov argument of mmrm().
      • Add residual and between-within degrees of freedom methods.
      • Add Kenward-Roger support for spatial covariance structures.
      • @@ -184,61 +253,87 @@

        New FeaturesAdd tidy(), glance() and augment() methods to tidy the fit results into summary tables.
      • Add tidymodels framework support via a parsnip interface.
      • Add argument covariance to mmrm() to allow for easier programmatic access to specifying the model’s covariance structure and to expose covariance customization through the tidymodels interface.
      • -

    + +
    -

    Bug Fixes

    -
    • Previously mmrm() follows the global option na.action and if it is set other than "na.omit" an assertion would fail. This is now fixed and hence NA values are always removed prior to model fitting, independent of the global na.action option.
    • +

      Bug Fixes +

      +
        +
      • Previously mmrm() follows the global option na.action and if it is set other than "na.omit" an assertion would fail. This is now fixed and hence NA values are always removed prior to model fitting, independent of the global na.action option.
      • Previously a model.frame() call on an mmrm object with transformed terms, or new data, e.g. model.frame(mmrm(Y ~ log(X) + ar1(VISIT|ID), data = new_data), would fail. This is now fixed.
      • Previously mmrm() always required a data argument. Now fitting mmrm can also use environment variables instead of requiring data argument. (Note that fit_mmrm is not affected.)
      • Previously emmeans() failed when using transformed terms or not including the visit variable in the model formula. This is now fixed.
      • Previously mmrm() might provide non-finite values in the Jacobian calculations, leading to errors in the Satterthwaite degrees of freedom calculations. This will raise an error now and thus alert the user that the model fit was not successful.
      • -
    + +
    -

    Miscellaneous

    -
    • Use automatic differentiation to calculate Satterthwaite adjusted degrees of freedom, resulting in 10-fold speed-up of the Satterthwaite calculations after the initial model fit.
    • +

      Miscellaneous +

      +
        +
      • Use automatic differentiation to calculate Satterthwaite adjusted degrees of freedom, resulting in 10-fold speed-up of the Satterthwaite calculations after the initial model fit.
      • Add an interactive confirmation step if the number of visit levels is too large for non-spatial covariance structures. Use options(mmrm.max_visits = ) to specify the maximum number of visits allowed in non-interactive mode.
      • Removed free_cores() in favor of parallelly::availableCores(omit = 1).
      • The model.frame() method has been updated: The full argument is deprecated and the include argument can be used instead; by default all relevant variables are returned. Furthermore, it returns a data.frame the size of the number of observations utilized in the model for all combinations of the include argument when na.action= "na.omit".
      • Overall, seven vignettes have been added to the package. All vignettes have a slightly different look now to reduce the size of the overall R package on CRAN.
      • The used optimizer is now available via component(., "optimizer") instead of previously attr(., "optimizer").
      • -
    + +
    -

    mmrm 0.2.2

    CRAN release: 2022-12-20

    +

    mmrm 0.2.2 +

    +

    CRAN release: 2022-12-20

    -

    New Features

    -
    • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
    • +

      New Features +

      +
        +
      • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
      • Update the mmrm arguments to allow users more fine-grained control, e.g. mmrm(..., start = start, optimizer = c("BFGS", "nlminb")) to set the starting values for the variance estimates and to choose the available optimizers. These arguments will be passed to the new function mmrm_control.
      • Add new argument drop_visit_levels to allow users to keep all levels in visits, even when they are not observed in the data. Dropping unobserved levels was done silently previously, and now a message will be given. See ?mmrm_control for more details.
      • -
    + +
    -

    Bug Fixes

    -
    • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
    • +

      Bug Fixes +

      +
        +
      • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
      • Previously in mmrm calls, the weights object in the environment where the formula is defined was replaced by the weights used internally. Now this behavior is removed and your variable weights e.g. in the global environment will no longer be replaced.
      • -
    + +
    -

    Miscellaneous

    -
    • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
    • +

      Miscellaneous +

      +
        +
      • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
      • Deprecated optimizer = "automatic" in favor of not specifying the optimizer. By default, all remaining optimizers will be tried if the first optimizer fails to reach convergence.
      • -
    + +
    -

    mmrm 0.1.5

    CRAN release: 2022-10-18

    -
    • First CRAN version of the package.
    • +

      mmrm 0.1.5 +

      +

      CRAN release: 2022-10-18

      +
        +
      • First CRAN version of the package.
      • The package fits mixed models for repeated measures (MMRM) based on the marginal linear model without random effects.
      • The motivation for this package is to have a fast, reliable (in terms of convergence behavior) and feature complete implementation of MMRM in R.
      • -
      -

      New Features

      -
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • +
      +
      +

      New Features +

      +
        +
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • Fast C++ implementation of Maximum Likelihood (ML) and Restricted Maximum Likelihood (REML) estimation.
      • Currently Satterthwaite adjusted degrees of freedom calculation is supported.
      • Interface to the emmeans package for computing estimated marginal means (also called least-square means) for the coefficients.
      • Multiple optimizers are run to reach convergence in as many cases as possible.
      • Flexible formula based model specification and support for standard S3 methods such as summary, logLik, etc.
      • -
      +
    +
    + + - + + - + + diff --git a/v0.3.13/reference/Anova.mmrm.html b/v0.3.13/reference/Anova.mmrm.html index df853a4c5..06cab0633 100644 --- a/v0.3.13/reference/Anova.mmrm.html +++ b/v0.3.13/reference/Anova.mmrm.html @@ -1,11 +1,27 @@ - -Conduct type II/III hypothesis testing on the MMRM fit results. — Anova.mmrm • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    Anova.mmrm(
       mod,
       type = c("II", "III", "2", "3"),
    @@ -107,34 +134,43 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    mod
    +
    +
    mod +

    (mmrm)
    the fitted MMRM.

    -
    type
    +
    type +

    (string) type of test, "II", "III", '2', or '3'.

    -
    tol
    +
    tol +

    (numeric) threshold blow which values are treated as 0.

    -
    ...
    +
    ... +

    not used.

    -
    + +
    -

    Details

    +

    Details +

    Anova will return anova object with one row per variable and columns Num Df(numerator degrees of freedom), Denom Df(denominator degrees of freedom), F Statistic and Pr(>=F).

    + + - + + - + + diff --git a/v0.3.13/reference/COV_TYPES.html b/v0.3.13/reference/COV_TYPES.html index c4829d1f0..0b24f624f 100644 --- a/v0.3.13/reference/COV_TYPES.html +++ b/v0.3.13/reference/COV_TYPES.html @@ -1,11 +1,27 @@ - -Covariance Type Database — COV_TYPES • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,14 +123,17 @@
    -

    Usage

    +

    Usage +

    COV_TYPES
    -

    Format

    +

    Format +

    A data frame with 5 variables and one record per covariance type:

    -
    name
    +
    +
    name

    The long-form name of the covariance structure type

    abbr
    @@ -123,10 +152,12 @@

    Format<

    A logical value indicating whether the covariance structure is spatial.

    -

    + + + +
    -
    - + + - + + diff --git a/v0.3.13/reference/as.cov_struct.html b/v0.3.13/reference/as.cov_struct.html index 5f87dc277..f2ec2c4ba 100644 --- a/v0.3.13/reference/as.cov_struct.html +++ b/v0.3.13/reference/as.cov_struct.html @@ -1,11 +1,27 @@ - -Coerce into a Covariance Structure Definition — as.cov_struct • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    as.cov_struct(x, ...)
     
     # S3 method for class 'formula'
    @@ -105,58 +132,85 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    an object from which to derive a covariance structure. See object specific sections for details.

    -
    ...
    +
    ... +

    additional arguments unused.

    -
    warn_partial
    +
    warn_partial +

    (flag)
    whether to emit a warning when parts of the formula are disregarded.

    -
    + +
    -

    Value

    +

    Value +

    A cov_struct() object.

    -

    Details

    +

    Details +

    A covariance structure can be parsed from a model definition formula or call. Generally, covariance structures defined using non-standard evaluation take the following form:

    -

    type( (visit, )* visit | (group /)? subject )

    +

    +
    +
    type( (visit, )* visit | (group /)? subject )
    +

    +

    For example, formulas may include terms such as

    -

    us(time | subject)
    +

    +
    +
    us(time | subject)
     cp(time | group / subject)
    -sp_exp(coord1, coord2 | group / subject)

    +sp_exp(coord1, coord2 | group / subject)
    +

    +

    Note that only sp_exp (spatial) covariance structures may provide multiple coordinates, which identify the Euclidean distance between the time points.

    -

    Methods (by class)

    +

    Methods (by class) +

    -
    • as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be +

        +
      • +

        as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be covariance structure definitions and must follow the form:

        -

        y ~ xs + type( (visit, )* visit | (group /)? subject )

        +

        +
        +
        y ~ xs + type( (visit, )* visit | (group /)? subject )
        +

        +

        Any component on the right hand side of a formula is considered when -searching for a covariance definition.

      • -
    +searching for a covariance definition.

    + + +
    -

    See also

    +

    See also +

    Other covariance types: cov_struct(), covariance_types

    -

    Examples

    +

    Examples +

    # provide a covariance structure as a right-sided formula
     as.cov_struct(~ csh(visit | group / subject))
     #> <covariance structure>
    @@ -176,7 +230,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/v0.3.13/reference/bcva_data.html b/v0.3.13/reference/bcva_data.html index b00419589..4df7764f8 100644 --- a/v0.3.13/reference/bcva_data.html +++ b/v0.3.13/reference/bcva_data.html @@ -1,11 +1,27 @@ - -Example Data on BCVA — bcva_data • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,33 +123,41 @@
    -

    Usage

    +

    Usage +

    bcva_data
    -

    Format

    -

    A tibble with 10,000 rows and 7 variables:

    • USUBJID: subject ID.

    • +

      Format +

      +

      A tibble with 10,000 rows and 7 variables:

      +
        +
      • USUBJID: subject ID.

      • VISITN: visit number (numeric).

      • AVISIT: visit number (factor).

      • ARMCD: treatment, TRT or CTL.

      • RACE: 3-category race.

      • BCVA_BL: BCVA at baseline.

      • BCVA_CHG: Change in BCVA at study visits.

      • -
    + +
    -

    Source

    +

    Source +

    This is an artificial dataset.

    -

    Note

    +

    Note +

    Measurements of BCVA (best corrected visual acuity) is a measure of how how many letters a person can read off of an eye chart using corrective lenses or contacts. This a common endpoint in ophthalmology trials.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/cached_mmrm_results.html b/v0.3.13/reference/cached_mmrm_results.html index e430d5773..130202f4c 100644 --- a/v0.3.13/reference/cached_mmrm_results.html +++ b/v0.3.13/reference/cached_mmrm_results.html @@ -1,11 +1,27 @@ - -Cache Data for mmrm Model Comparison — cached_mmrm_results • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    cached_mmrm_results
    -

    Format

    -

    A list with following elements:

    • conv_time_fev: Convergence time on FEV data.

    • +

      Format +

      +

      A list with following elements:

      +
        +
      • conv_time_fev: Convergence time on FEV data.

      • conv_time_bcva: Convergence time on BCVA data.

      • rel_diff_ests_tbl_fev: Relative difference in estimates on FEV data.

      • rel_diff_ests_tbl_bcva: Relative difference in estimates on BCVA data.

      • conv_rate: Convergence rate on data with different missing levels.

      • df_missingness: Summary of missingness on simulated data.

      • -
    + +
    -

    Source

    +

    Source +

    This is created based on simulations on FEV data and BCVA data.

    -

    Note

    +

    Note +

    The cached data for comparison is used for the vignettes generation. Please make sure that this data is refreshed before each package release by running the script data-raw/mmrm_review.R. @@ -124,7 +157,8 @@

    Note

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/car_add_mmrm.html b/v0.3.13/reference/car_add_mmrm.html index 9d0a0484c..30c21c688 100644 --- a/v0.3.13/reference/car_add_mmrm.html +++ b/v0.3.13/reference/car_add_mmrm.html @@ -1,11 +1,27 @@ - -Register mmrm For Use With car::Anova — car_add_mmrm • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + +
    @@ -97,25 +124,32 @@
    -

    Usage

    +

    Usage +

    car_add_mmrm(quietly = FALSE)
    -

    Arguments

    +

    Arguments +

    -
    quietly
    +
    +
    quietly +

    logical: should progress and error messages be suppressed?

    -
    + +
    -

    Value

    +

    Value +

    A logical value indicating whether registration was successful.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/check_package_version.html b/v0.3.13/reference/check_package_version.html index 10835d4f4..8660cc5f1 100644 --- a/v0.3.13/reference/check_package_version.html +++ b/v0.3.13/reference/check_package_version.html @@ -1,11 +1,27 @@ - -Check Suggested Dependency Against Version Requirements — check_package_version • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,33 +123,41 @@
    -

    Usage

    +

    Usage +

    check_package_version(pkg, ver = c(NA_character_, NA_character_))
    -

    Arguments

    +

    Arguments +

    -
    pkg
    +
    +
    pkg +

    (string)
    package name.

    -
    ver
    +
    ver +

    (character)
    of length 2 whose elements can be provided to numeric_version(), representing a minimum and maximum (inclusive) version requirement for interoperability. When NA, no version requirement is imposed. Defaults to no version requirement.

    -
    + +
    -

    Value

    +

    Value +

    A logical (invisibly) indicating whether the loaded package meets the version requirements. A warning is emitted otherwise.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/component.html b/v0.3.13/reference/component.html index 61e652269..91fbd31a9 100644 --- a/v0.3.13/reference/component.html +++ b/v0.3.13/reference/component.html @@ -1,11 +1,27 @@ - -Component Access for mmrm_tmb Objects — component • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    component(
       object,
       name = c("cov_type", "subject_var", "n_theta", "n_subjects", "n_timepoints", "n_obs",
    @@ -109,24 +136,33 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm_tmb)
    the fitted MMRM.

    -
    name
    +
    name +

    (character)
    the component(s) to be retrieved.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding component of the object, see details.

    -

    Details

    -

    Available component() names are as follows:

    • call: low-level function call which generated the model.

    • +

      Details +

      +

      Available component() names are as follows:

      +
    + +
    -

    See also

    +

    See also +

    In the lme4 package there is a similar function getME().

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -3120,7 +3159,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/v0.3.13/reference/cov_struct.html b/v0.3.13/reference/cov_struct.html index 797b96394..72e9d0de4 100644 --- a/v0.3.13/reference/cov_struct.html +++ b/v0.3.13/reference/cov_struct.html @@ -1,11 +1,27 @@ - -Define a Covariance Structure — cov_struct • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    cov_struct(
       type = cov_types(),
       visits,
    @@ -108,49 +135,60 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    type
    +
    +
    type +

    (string)
    the name of the covariance structure type to use. For available options, see cov_types(). If a type abbreviation is used that implies heterogeneity (e.g. cph) and no value is provided to heterogeneous, then the heterogeneity is derived from the type name.

    -
    visits
    +
    visits +

    (character)
    a vector of variable names to use for the longitudinal terms of the covariance structure. Multiple terms are only permitted for the "spatial" covariance type.

    -
    subject
    +
    subject +

    (string)
    the name of the variable that encodes a subject identifier.

    -
    group
    +
    group +

    (string)
    optionally, the name of the variable that encodes a grouping variable for subjects.

    -
    heterogeneous
    +
    heterogeneous +

    (flag)

    -
    + +
    -

    Value

    +

    Value +

    A cov_struct object.

    -

    See also

    +

    See also +

    Other covariance types: as.cov_struct(), covariance_types

    -

    Examples

    +

    Examples +

    cov_struct("csh", "AVISITN", "USUBJID")
     #> <covariance structure>
     #> heterogeneous compound symmetry:
    @@ -167,7 +205,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/v0.3.13/reference/cov_type_abbr.html b/v0.3.13/reference/cov_type_abbr.html index 2f7fdcfac..42cc40e29 100644 --- a/v0.3.13/reference/cov_type_abbr.html +++ b/v0.3.13/reference/cov_type_abbr.html @@ -1,11 +1,27 @@ - -Retrieve Associated Abbreviated Covariance Structure Type Name — cov_type_abbr • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,26 +123,33 @@
    -

    Usage

    +

    Usage +

    cov_type_abbr(type)
    -

    Arguments

    +

    Arguments +

    -
    type
    +
    +
    type +

    (string)
    either a full name or abbreviate covariance structure type name to collapse into an abbreviated type.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding abbreviated covariance type name.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/cov_type_name.html b/v0.3.13/reference/cov_type_name.html index 31e1b998c..5eecaf9e7 100644 --- a/v0.3.13/reference/cov_type_name.html +++ b/v0.3.13/reference/cov_type_name.html @@ -1,11 +1,27 @@ - -Retrieve Associated Full Covariance Structure Type Name — cov_type_name • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,26 +123,33 @@
    -

    Usage

    +

    Usage +

    cov_type_name(type)
    -

    Arguments

    +

    Arguments +

    -
    type
    +
    +
    type +

    (string)
    either a full name or abbreviate covariance structure type name to convert to a long-form type.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding abbreviated covariance type name.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/covariance_types.html b/v0.3.13/reference/covariance_types.html index 5ac321ecb..dead439e5 100644 --- a/v0.3.13/reference/covariance_types.html +++ b/v0.3.13/reference/covariance_types.html @@ -1,11 +1,27 @@ - -Covariance Types — covariance_types • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    cov_types(
       form = c("name", "abbr", "habbr"),
       filter = c("heterogeneous", "spatial")
    @@ -105,63 +132,152 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    form
    +
    +
    form +

    (character)
    covariance structure type name form. One or more of "name", "abbr" (abbreviation), or "habbr" (heterogeneous abbreviation).

    -
    filter
    +
    filter +

    (character)
    covariance structure type filter. One or more of "heterogeneous" or "spatial".

    -
    + +
    -

    Value

    +

    Value +

    A character vector of accepted covariance structure type names and abbreviations.

    -

    Note

    +

    Note +

    The ante-dependence covariance structure in this package refers to homogeneous ante-dependence, while the ante-dependence covariance structure from SAS PROC MIXED refers to heterogeneous ante-dependence and the homogeneous version is not available in SAS.

    For all non-spatial covariance structures, the time variable must -be coded as a factor.

    -

    Spatial Covariance structures:

    - - -
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)

    where \(d_{ij}\) denotes the Euclidean distance between time points +be coded as a factor.

    +
    +

    Spatial Covariance structures: +

    + + + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)
    +

    where \(d_{ij}\) denotes the Euclidean distance between time points \(i\) and \(j\).

    -

    Abbreviations for Covariance Structures

    +

    Abbreviations for Covariance Structures +

    -

    Common Covariance Structures:

    - - -
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, +

    Common Covariance Structures: +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)
    +

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, respectively, out of total \(m\) time points, \(1 \leq i, j \leq m\).

    -

    See also

    +

    See also +

    Other covariance types: as.cov_struct(), cov_struct()

    + + - + + - + + diff --git a/v0.3.13/reference/df_1d.html b/v0.3.13/reference/df_1d.html index afff6ebe0..1b74d61b2 100644 --- a/v0.3.13/reference/df_1d.html +++ b/v0.3.13/reference/df_1d.html @@ -1,15 +1,31 @@ - -Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm + + + + + +Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm + + + + + + + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,31 +129,39 @@
    -

    Usage

    +

    Usage +

    df_1d(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    contrast +

    (numeric)
    contrast vector. Note that this should not include elements for singular coefficient estimates, i.e. only refer to the actually estimated coefficients.

    -
    + +
    -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -153,7 +187,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/v0.3.13/reference/df_md.html b/v0.3.13/reference/df_md.html index 4184d276c..f835cb83d 100644 --- a/v0.3.13/reference/df_md.html +++ b/v0.3.13/reference/df_md.html @@ -1,17 +1,33 @@ - -Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm + + + + + +Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm + + + + + + + + + + Skip to contents @@ -27,10 +43,12 @@ + + + + + @@ -106,32 +132,40 @@
    -

    Usage

    +

    Usage +

    df_md(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    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

    +

    Value +

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

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -154,7 +188,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/v0.3.13/reference/drop_elements.html b/v0.3.13/reference/drop_elements.html index b0bc8c28f..acd393c35 100644 --- a/v0.3.13/reference/drop_elements.html +++ b/v0.3.13/reference/drop_elements.html @@ -1,11 +1,27 @@ - -Drop Items from an Indexible — drop_elements • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,30 +123,38 @@
    -

    Usage

    +

    Usage +

    drop_elements(x, n)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    Any object that can be consumed by seq_along() and indexed by a logical vector of the same length.

    -
    n
    +
    n +

    (integer)
    the number of terms to drop.

    -
    + +
    -

    Value

    +

    Value +

    A subset of x.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/emit_tidymodels_register_msg.html b/v0.3.13/reference/emit_tidymodels_register_msg.html index d608e9e93..9cb189068 100644 --- a/v0.3.13/reference/emit_tidymodels_register_msg.html +++ b/v0.3.13/reference/emit_tidymodels_register_msg.html @@ -1,11 +1,27 @@ - -Format a Message to Emit When Tidymodels is Loaded — emit_tidymodels_register_msg • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,18 +123,21 @@
    -

    Usage

    +

    Usage +

    emit_tidymodels_register_msg()
    -

    Value

    +

    Value +

    A character message to emit. Either a ansi-formatted cli output if package 'cli' is available or a plain-text message otherwise.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/emmeans_support.html b/v0.3.13/reference/emmeans_support.html index f48ab7569..0c59257a0 100644 --- a/v0.3.13/reference/emmeans_support.html +++ b/v0.3.13/reference/emmeans_support.html @@ -1,23 +1,39 @@ - -Support for emmeans — emmeans_support • mmrm + + + + + +Support for emmeans — emmeans_support • mmrm + + + + + + + + + + Skip to contents @@ -33,10 +49,12 @@ + + + + +
    @@ -117,7 +144,8 @@
    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -149,7 +177,8 @@ 

    Examples#> Results are averaged over the levels of: RACE, SEX

    -
    + +
    - + + - + + diff --git a/v0.3.13/reference/emp_start.html b/v0.3.13/reference/emp_start.html index b636c575f..5b65fbaf5 100644 --- a/v0.3.13/reference/emp_start.html +++ b/v0.3.13/reference/emp_start.html @@ -1,11 +1,27 @@ - -Empirical Starting Value — emp_start • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,58 +123,72 @@
    -

    Usage

    +

    Usage +

    emp_start(data, model_formula, visit_var, subject_var, subject_groups, ...)
    -

    Arguments

    +

    Arguments +

    -
    data
    +
    +
    data +

    (data.frame)
    data used for model fitting.

    -
    model_formula
    +
    model_formula +

    (formula)
    the formula in mmrm model without covariance structure part.

    -
    visit_var
    +
    visit_var +

    (string)
    visit variable.

    -
    subject_var
    +
    subject_var +

    (string)
    subject id variable.

    -
    subject_groups
    +
    subject_groups +

    (factor)
    subject group assignment.

    -
    ...
    +
    ... +

    not used.

    -
    + +
    -

    Value

    +

    Value +

    A numeric vector of starting values.

    -

    Details

    +

    Details +

    This emp_start only works for unstructured covariance structure. It uses linear regression to first obtain the coefficients and use the residuals to obtain the empirical variance-covariance, and it is then used to obtain the starting values.

    -

    Note

    +

    Note +

    data is used instead of full_frame because full_frame is already transformed if model contains transformations, e.g. log(FEV1) ~ exp(FEV1_BL) will drop FEV1 and FEV1_BL but add log(FEV1) and exp(FEV1_BL) in full_frame.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/fev_data.html b/v0.3.13/reference/fev_data.html index b8daa4cbf..42bb2180c 100644 --- a/v0.3.13/reference/fev_data.html +++ b/v0.3.13/reference/fev_data.html @@ -1,11 +1,27 @@ - -Example Data on FEV1 — fev_data • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,13 +123,17 @@
    -

    Usage

    +

    Usage +

    fev_data
    -

    Format

    -

    A tibble with 800 rows and 7 variables:

    • USUBJID: subject ID.

    • +

      Format +

      +

      A tibble with 800 rows and 7 variables:

      +
        +
      • USUBJID: subject ID.

      • AVISIT: visit number.

      • ARMCD: treatment, TRT or PBO.

      • RACE: 3-category race.

      • @@ -113,20 +143,24 @@

        Format<
      • WEIGHT: weighting variable.

      • VISITN: integer order of the visit.

      • VISITN2: coordinates of the visit for distance calculation.

      • -

    + +
    -

    Source

    +

    Source +

    This is an artificial dataset.

    -

    Note

    +

    Note +

    Measurements of FEV1 (forced expired volume in one second) is a measure of how quickly the lungs can be emptied. Low levels of FEV1 may indicate chronic obstructive pulmonary disease (COPD).

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/fill_names.html b/v0.3.13/reference/fill_names.html index 0fa9fdcc6..cbeefb602 100644 --- a/v0.3.13/reference/fill_names.html +++ b/v0.3.13/reference/fill_names.html @@ -1,11 +1,27 @@ - -Complete character Vector Names From Values — fill_names • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,26 +123,33 @@
    -

    Usage

    +

    Usage +

    fill_names(x)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (character or list)
    value whose names should be completed from element values.

    -
    + +
    -

    Value

    +

    Value +

    A named vector or list.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/fit_mmrm.html b/v0.3.13/reference/fit_mmrm.html index 2129f5e75..93097507f 100644 --- a/v0.3.13/reference/fit_mmrm.html +++ b/v0.3.13/reference/fit_mmrm.html @@ -1,17 +1,33 @@ - -Low-Level Fitting Function for MMRM — fit_mmrm • mmrm + + + + + +Low-Level Fitting Function for MMRM — fit_mmrm • mmrm + + + + + + + + + + Skip to contents @@ -27,10 +43,12 @@ + + + + + @@ -106,7 +132,8 @@
    -

    Usage

    +

    Usage +

    fit_mmrm(
       formula,
       data,
    @@ -120,56 +147,69 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    formula
    +
    +
    formula +

    (formula)
    model formula with exactly one special term specifying the visits within subjects, see details.

    -
    data
    +
    data +

    (data.frame)
    input data containing the variables used in formula.

    -
    weights
    +
    weights +

    (vector)
    input vector containing the weights.

    -
    reml
    +
    reml +

    (flag)
    whether restricted maximum likelihood (REML) estimation is used, otherwise maximum likelihood (ML) is used.

    -
    covariance
    +
    covariance +

    (cov_struct)
    A covariance structure type definition, or value that can be coerced to a covariance structure using as.cov_struct(). If no value is provided, a structure is derived from the provided formula.

    -
    tmb_data
    +
    tmb_data +

    (mmrm_tmb_data)
    object.

    -
    formula_parts
    +
    formula_parts +

    (mmrm_tmb_formula_parts)
    list with formula parts from h_mmrm_tmb_formula_parts().

    -
    control
    +
    control +

    (mmrm_control)
    list of control options produced by mmrm_control().

    -
    + +
    -

    Value

    +

    Value +

    List of class mmrm_tmb, see h_mmrm_tmb_fit() for details. In addition, it contains elements call and optimizer.

    -

    Details

    +

    Details +

    The formula typically looks like:

    FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)

    which specifies response and covariates as usual, and exactly one special term @@ -179,7 +219,8 @@

    Details
    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     data <- fev_data
     system.time(result <- fit_mmrm(formula, data, rep(1, nrow(fev_data))))
    @@ -188,7 +229,8 @@ 

    Examples

    + +

    - + + - + + diff --git a/v0.3.13/reference/fit_single_optimizer.html b/v0.3.13/reference/fit_single_optimizer.html index 9ef226a0c..900350578 100644 --- a/v0.3.13/reference/fit_single_optimizer.html +++ b/v0.3.13/reference/fit_single_optimizer.html @@ -1,15 +1,31 @@ - -Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm + + + + + +Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm + + + + + + + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,7 +129,8 @@
    -

    Usage

    +

    Usage +

    fit_single_optimizer(
       formula,
       data,
    @@ -118,58 +145,72 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    formula
    +
    +
    formula +

    (formula)
    the model formula, see details.

    -
    data
    +
    data +

    (data)
    the data to be used for the model.

    -
    weights
    +
    weights +

    (vector)
    an optional vector of weights to be used in the fitting process. Should be NULL or a numeric vector.

    -
    reml
    +
    reml +

    (flag)
    whether restricted maximum likelihood (REML) estimation is used, otherwise maximum likelihood (ML) is used.

    -
    covariance
    +
    covariance +

    (cov_struct)
    a covariance structure type definition as produced with cov_struct(), or value that can be coerced to a covariance structure using as.cov_struct(). If no value is provided, a structure is derived from the provided formula.

    -
    tmb_data
    +
    tmb_data +

    (mmrm_tmb_data)
    object.

    -
    formula_parts
    +
    formula_parts +

    (mmrm_tmb_formula_parts)
    object.

    -
    ...
    +
    ... +

    Additional arguments to pass to mmrm_control().

    -
    control
    +
    control +

    (mmrm_control)
    object.

    -
    + +
    -

    Value

    +

    Value +

    The mmrm_fit object, with additional attributes containing warnings, messages, optimizer used and convergence status in addition to the mmrm_tmb contents.

    -

    Details

    +

    Details +

    fit_single_optimizer will fit the mmrm model using the control provided. If there are multiple optimizers provided in control, only the first optimizer will be used. @@ -178,7 +219,8 @@

    Details
    -

    Examples

    +

    Examples +

    mod_fit <- fit_single_optimizer(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data,
    @@ -190,7 +232,8 @@ 

    Examples

    + +

    - + + - + + diff --git a/v0.3.13/reference/flat_expr.html b/v0.3.13/reference/flat_expr.html index 2c38ab176..95f5a4064 100644 --- a/v0.3.13/reference/flat_expr.html +++ b/v0.3.13/reference/flat_expr.html @@ -1,17 +1,33 @@ - -Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm + + + + + +Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm + + + + + + + + + + Skip to contents @@ -27,10 +43,12 @@ + + + + + @@ -106,46 +132,69 @@
    -

    Usage

    +

    Usage +

    flatten_call(call)
     
     flatten_expr(expr)
    -

    Arguments

    +

    Arguments +

    -
    call, expr
    +
    +
    call, expr +

    (language)
    a language object to flatten.

    -
    + +
    -

    Value

    +

    Value +

    A list of atomic values, symbols, infix operator names and subexpressions.

    -

    Details

    +

    Details +

    Where 1 + 2 | 3 in R's syntax tree is (|, (+, 1, 2), 3), flattening it into its visual order produces (1, +, 2, |, 3), which makes for more fluent interpretation of non-standard grammar rules used in formulas.

    -

    Functions

    +

    Functions +

    -
    • flatten_call(): Flatten a call into a list of names and argument expressions.

      +
        +
      • +

        flatten_call(): Flatten a call into a list of names and argument expressions.

        The call name and all arguments are flattened into the same list, meaning a call of the form sp_exp(a, b, c | d / e) produces a list of the form (sp_exp, a, b, c, |, d, /, e).

        -

        flatten_call(quote(sp_exp(a, b, c | d / e)))

      • -
      • flatten_expr(): Flatten nested expressions

        -

        flatten_expr(quote(1 + 2 + 3 | 4))

      • -
    +

    +
    +
    flatten_call(quote(sp_exp(a, b, c | d / e)))
    +

    +
    + +
  • +

    flatten_expr(): Flatten nested expressions

    +

    +
    +
    flatten_expr(quote(1 + 2 + 3 | 4))
    +

    +
    +
  • + + + +
    -
    - + + - + + diff --git a/v0.3.13/reference/format.cov_struct.html b/v0.3.13/reference/format.cov_struct.html index fbb516803..c20b638d3 100644 --- a/v0.3.13/reference/format.cov_struct.html +++ b/v0.3.13/reference/format.cov_struct.html @@ -1,11 +1,27 @@ - -Format Covariance Structure Object — format.cov_struct • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,30 +123,38 @@
    -

    Usage

    +

    Usage +

    # S3 method for class 'cov_struct'
     format(x, ...)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (cov_struct)
    a covariance structure object.

    -
    ...
    +
    ... +

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string for x.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/format_symbols.html b/v0.3.13/reference/format_symbols.html index 779df64ee..fe3fa3ea3 100644 --- a/v0.3.13/reference/format_symbols.html +++ b/v0.3.13/reference/format_symbols.html @@ -1,13 +1,29 @@ - -Format Symbol Objects — format_symbols • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,25 +126,32 @@
    -

    Usage

    +

    Usage +

    format_symbols(x)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (character) A vector of variable names.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string of comma-separated variables.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/formula_rhs.html b/v0.3.13/reference/formula_rhs.html index 57929d562..acbd7557f 100644 --- a/v0.3.13/reference/formula_rhs.html +++ b/v0.3.13/reference/formula_rhs.html @@ -1,11 +1,27 @@ - -Extract Right-Hand-Side (rhs) from Formula — formula_rhs • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,28 +123,39 @@
    -

    Usage

    +

    Usage +

    formula_rhs(f)
    -

    Arguments

    +

    Arguments +

    -
    f
    +
    +
    f +

    (formula)
    a formula.

    -
    + +
    -

    Value

    +

    Value +

    A formula without a response, derived from the right-hand-side of the formula, f.

    -

    formula_rhs(a ~ b + c)
    -formula_rhs(~ b + c)

    +

    +
    +
    formula_rhs(a ~ b + c)
    +formula_rhs(~ b + c)
    +

    +
    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_add_covariance_terms.html b/v0.3.13/reference/h_add_covariance_terms.html index 344cfd9c6..051e09527 100644 --- a/v0.3.13/reference/h_add_covariance_terms.html +++ b/v0.3.13/reference/h_add_covariance_terms.html @@ -1,11 +1,27 @@ - -Add Individual Covariance Variables As Terms to Formula — h_add_covariance_terms • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,37 +123,46 @@
    -

    Usage

    +

    Usage +

    h_add_covariance_terms(f, covariance)
    -

    Arguments

    +

    Arguments +

    -
    f
    +
    +
    f +

    (formula)
    a formula to which covariance structure terms should be added.

    -
    covariance
    +
    covariance +

    (cov_struct)
    a covariance structure object from which additional variables should be sourced.

    -
    + +
    -

    Value

    +

    Value +

    A new formula with included covariance terms.

    -

    Details

    +

    Details +

    stats::update() is used to append the covariance structure and the environment attribute will not be changed. This ensures the returned formula and the input formula have the same environment.

    + + - + + - + + diff --git a/v0.3.13/reference/h_add_terms.html b/v0.3.13/reference/h_add_terms.html index 49566b1cd..881271b68 100644 --- a/v0.3.13/reference/h_add_terms.html +++ b/v0.3.13/reference/h_add_terms.html @@ -1,11 +1,27 @@ - -Add Formula Terms with Character — h_add_terms • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,39 +123,49 @@
    -

    Usage

    +

    Usage +

    h_add_terms(f, adds, drop_response = FALSE)
    -

    Arguments

    +

    Arguments +

    -
    f
    +
    +
    f +

    (formula)
    a formula to be updated.

    -
    adds
    +
    adds +

    (character)
    representation of elements to be added.

    -
    drop_response
    +
    drop_response +

    (flag)
    whether response should be dropped.

    -
    + +
    -

    Value

    +

    Value +

    A new formula with elements in drops removed.

    -

    Details

    +

    Details +

    Elements in adds will be added from the formula, while the environment of the formula is unchanged. If adds is NULL or character(0), the formula is unchanged.

    + + - + + - + + diff --git a/v0.3.13/reference/h_coef_table.html b/v0.3.13/reference/h_coef_table.html index f6959d53c..4639dcd15 100644 --- a/v0.3.13/reference/h_coef_table.html +++ b/v0.3.13/reference/h_coef_table.html @@ -1,11 +1,27 @@ - -Coefficients Table for MMRM Fit — h_coef_table • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,26 +123,33 @@
    -

    Usage

    +

    Usage +

    h_coef_table(object)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    model fit.

    -
    + +
    -

    Value

    +

    Value +

    Matrix with one row per coefficient and columns Estimate, Std. Error, df, t value and Pr(>|t|).

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_confirm_large_levels.html b/v0.3.13/reference/h_confirm_large_levels.html index ae5205b9f..f4b98d360 100644 --- a/v0.3.13/reference/h_confirm_large_levels.html +++ b/v0.3.13/reference/h_confirm_large_levels.html @@ -1,13 +1,29 @@ - -Ask for Confirmation on Large Visit Levels — h_confirm_large_levels • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,25 +126,32 @@
    -

    Usage

    +

    Usage +

    h_confirm_large_levels(x)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (numeric)
    number of visit levels.

    -
    + +
    -

    Value

    +

    Value +

    Logical value TRUE.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_construct_model_frame_inputs.html b/v0.3.13/reference/h_construct_model_frame_inputs.html index 6dee9dd2c..f2e476e3d 100644 --- a/v0.3.13/reference/h_construct_model_frame_inputs.html +++ b/v0.3.13/reference/h_construct_model_frame_inputs.html @@ -1,19 +1,35 @@ - -Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm + + + + + +Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm + + + + + + + + + + Skip to contents @@ -29,10 +45,12 @@ + + + + + @@ -109,7 +135,8 @@
    -

    Usage

    +

    Usage +

    h_construct_model_frame_inputs(
       formula,
       data,
    @@ -120,35 +147,47 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    formula
    +
    +
    formula +

    (mmrm)
    mmrm fit object.

    -
    data
    +
    data +

    optional data frame that will be passed to model.frame() or model.matrix()

    -
    include
    +
    include +

    (character)
    names of variable to include

    -
    full
    +
    full +

    (flag)
    indicator whether to return full model frame (deprecated).

    -
    + +
    -

    Value

    -

    named list with four elements:

    • "formula": the formula including the columns requested in the include= argument.

    • +

      Value +

      +

      named list with four elements:

      +
        +
      • "formula": the formula including the columns requested in the include= argument.

      • "data": a data frame including all columns needed in the formula. full formula are identical

      • -
    + + + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_default_value.html b/v0.3.13/reference/h_default_value.html index ac4d9bca5..9e1a09154 100644 --- a/v0.3.13/reference/h_default_value.html +++ b/v0.3.13/reference/h_default_value.html @@ -1,13 +1,29 @@ - -Default Value on NULL Return default value when first argument is NULL. — h_default_value • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,29 +126,37 @@
    -

    Usage

    +

    Usage +

    h_default_value(x, y)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    Object.

    -
    y
    +
    y +

    Object.

    -
    + +
    -

    Details

    +

    Details +

    If x is NULL, returns y. Otherwise return x.

    + + - + + - + + diff --git a/v0.3.13/reference/h_df_1d_bw.html b/v0.3.13/reference/h_df_1d_bw.html index 9a75e7822..df9756005 100644 --- a/v0.3.13/reference/h_df_1d_bw.html +++ b/v0.3.13/reference/h_df_1d_bw.html @@ -1,11 +1,27 @@ - -Calculation of Between-Within Degrees of Freedom for One-Dimensional Contrast — h_df_1d_bw • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,31 +123,39 @@
    -

    Usage

    +

    Usage +

    h_df_1d_bw(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    contrast +

    (numeric)
    contrast vector. Note that this should not include elements for singular coefficient estimates, i.e. only refer to the actually estimated coefficients.

    -
    + +
    -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_df_1d_kr.html b/v0.3.13/reference/h_df_1d_kr.html index f31eaf7fa..ce04e6095 100644 --- a/v0.3.13/reference/h_df_1d_kr.html +++ b/v0.3.13/reference/h_df_1d_kr.html @@ -1,13 +1,29 @@ - -Calculation of Kenward-Roger Degrees of Freedom for One-Dimensional Contrast — h_df_1d_kr • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,31 +126,39 @@
    -

    Usage

    +

    Usage +

    h_df_1d_kr(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    contrast +

    (numeric)
    contrast vector. Note that this should not include elements for singular coefficient estimates, i.e. only refer to the actually estimated coefficients.

    -
    + +
    -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_df_1d_res.html b/v0.3.13/reference/h_df_1d_res.html index b983f681a..5515a3f64 100644 --- a/v0.3.13/reference/h_df_1d_res.html +++ b/v0.3.13/reference/h_df_1d_res.html @@ -1,13 +1,29 @@ - -Calculation of Residual Degrees of Freedom for One-Dimensional Contrast — h_df_1d_res • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,31 +126,39 @@
    -

    Usage

    +

    Usage +

    h_df_1d_res(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    contrast +

    (numeric)
    contrast vector. Note that this should not include elements for singular coefficient estimates, i.e. only refer to the actually estimated coefficients.

    -
    + +
    -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_df_1d_sat.html b/v0.3.13/reference/h_df_1d_sat.html index 5c05d6b9a..5a61a0584 100644 --- a/v0.3.13/reference/h_df_1d_sat.html +++ b/v0.3.13/reference/h_df_1d_sat.html @@ -1,13 +1,29 @@ - -Calculation of Satterthwaite Degrees of Freedom for One-Dimensional Contrast — h_df_1d_sat • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,31 +126,39 @@
    -

    Usage

    +

    Usage +

    h_df_1d_sat(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    contrast +

    (numeric)
    contrast vector. Note that this should not include elements for singular coefficient estimates, i.e. only refer to the actually estimated coefficients.

    -
    + +
    -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_df_bw_calc.html b/v0.3.13/reference/h_df_bw_calc.html index ab5513e7f..edeb9f833 100644 --- a/v0.3.13/reference/h_df_bw_calc.html +++ b/v0.3.13/reference/h_df_bw_calc.html @@ -1,11 +1,27 @@ - -Calculation of Between-Within Degrees of Freedom — h_df_bw_calc • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,27 +123,37 @@
    -

    Usage

    +

    Usage +

    h_df_bw_calc(object)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the fitted MMRM.

    -
    + +
    -

    Value

    -

    List with:

    + + + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_df_md_bw.html b/v0.3.13/reference/h_df_md_bw.html index 34da40d49..f6812d20a 100644 --- a/v0.3.13/reference/h_df_md_bw.html +++ b/v0.3.13/reference/h_df_md_bw.html @@ -1,11 +1,27 @@ - -Calculation of Between-Within Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_bw • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,32 +123,40 @@
    -

    Usage

    +

    Usage +

    h_df_md_bw(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    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

    +

    Value +

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

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_df_md_from_1d.html b/v0.3.13/reference/h_df_md_from_1d.html index e77def619..5e278d044 100644 --- a/v0.3.13/reference/h_df_md_from_1d.html +++ b/v0.3.13/reference/h_df_md_from_1d.html @@ -1,11 +1,27 @@ - -Creating F-Statistic Results from One-Dimensional Contrast — h_df_md_from_1d • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,30 +123,38 @@
    -

    Usage

    +

    Usage +

    h_df_md_from_1d(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    model fit.

    -
    contrast
    +
    contrast +

    (numeric)
    one-dimensional contrast.

    -
    + +
    -

    Value

    +

    Value +

    The one-dimensional degrees of freedom are calculated and then based on that the p-value is calculated.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_df_md_kr.html b/v0.3.13/reference/h_df_md_kr.html index a875edf96..e2fb21a98 100644 --- a/v0.3.13/reference/h_df_md_kr.html +++ b/v0.3.13/reference/h_df_md_kr.html @@ -1,11 +1,27 @@ - -Calculation of Kenward-Roger Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_kr • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,32 +123,40 @@
    -

    Usage

    +

    Usage +

    h_df_md_kr(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    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

    +

    Value +

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

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_df_md_res.html b/v0.3.13/reference/h_df_md_res.html index e39463da0..fe24bbb02 100644 --- a/v0.3.13/reference/h_df_md_res.html +++ b/v0.3.13/reference/h_df_md_res.html @@ -1,11 +1,27 @@ - -Calculation of Residual Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_res • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,32 +123,40 @@
    -

    Usage

    +

    Usage +

    h_df_md_res(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    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

    +

    Value +

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

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_df_md_sat.html b/v0.3.13/reference/h_df_md_sat.html index 07471b1d9..10b3947d4 100644 --- a/v0.3.13/reference/h_df_md_sat.html +++ b/v0.3.13/reference/h_df_md_sat.html @@ -1,11 +1,27 @@ - -Calculation of Satterthwaite Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_sat • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,32 +123,40 @@
    -

    Usage

    +

    Usage +

    h_df_md_sat(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    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

    +

    Value +

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

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_df_min_bw.html b/v0.3.13/reference/h_df_min_bw.html index 5a22bf69a..1d9b7c806 100644 --- a/v0.3.13/reference/h_df_min_bw.html +++ b/v0.3.13/reference/h_df_min_bw.html @@ -1,11 +1,27 @@ - -Assign Minimum Degrees of Freedom Given Involved Coefficients — h_df_min_bw • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,31 +123,39 @@
    -

    Usage

    +

    Usage +

    h_df_min_bw(bw_calc, is_coef_involved)
    -

    Arguments

    +

    Arguments +

    -
    bw_calc
    +
    +
    bw_calc +

    (list)
    from h_df_bw_calc().

    -
    is_coef_involved
    +
    is_coef_involved +

    (logical)
    whether each coefficient is involved in the contrast.

    -
    + +
    -

    Value

    +

    Value +

    The minimum of the degrees of freedom assigned to each involved coefficient according to its between-within categorization.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_df_to_tibble.html b/v0.3.13/reference/h_df_to_tibble.html index ed8d04cf2..357e32a38 100644 --- a/v0.3.13/reference/h_df_to_tibble.html +++ b/v0.3.13/reference/h_df_to_tibble.html @@ -1,11 +1,27 @@ - -Coerce a Data Frame to a tibble — h_df_to_tibble • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + +
    @@ -97,24 +124,31 @@
    -

    Usage

    +

    Usage +

    h_df_to_tibble(data)
    -

    Arguments

    +

    Arguments +

    -
    data
    +
    +
    data +

    (data.frame)
    what to coerce.

    -
    + +
    -

    Value

    +

    Value +

    The data as a tibble, potentially with a .rownames column.

    -

    Details

    +

    Details +

    This is only a thin wrapper around tibble::as_tibble(), except giving a useful error message and it checks for rownames and adds them as a new column .rownames if they are not just a numeric sequence as @@ -122,7 +156,8 @@

    Details

    + + - + + - + + diff --git a/v0.3.13/reference/h_drop_covariance_terms.html b/v0.3.13/reference/h_drop_covariance_terms.html index 05eb6564b..620889067 100644 --- a/v0.3.13/reference/h_drop_covariance_terms.html +++ b/v0.3.13/reference/h_drop_covariance_terms.html @@ -1,11 +1,27 @@ - -Drop Formula Terms used for Covariance Structure Definition — h_drop_covariance_terms • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,31 +123,39 @@
    -

    Usage

    +

    Usage +

    h_drop_covariance_terms(f)
    -

    Arguments

    +

    Arguments +

    -
    f
    +
    +
    f +

    (formula)
    a formula from which covariance terms should be dropped.

    -
    + +
    -

    Value

    +

    Value +

    The formula without accepted covariance terms.

    -

    Details

    +

    Details +

    terms is used and it will preserve the environment attribute. This ensures the returned formula and the input formula have the same environment.

    + + - + + - + + diff --git a/v0.3.13/reference/h_drop_levels.html b/v0.3.13/reference/h_drop_levels.html index 13f2da383..c538b146a 100644 --- a/v0.3.13/reference/h_drop_levels.html +++ b/v0.3.13/reference/h_drop_levels.html @@ -1,11 +1,27 @@ - -Drop Levels from Dataset — h_drop_levels • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,33 +123,42 @@
    -

    Usage

    +

    Usage +

    h_drop_levels(data, subject_var, visit_var, except)
    -

    Arguments

    +

    Arguments +

    -
    data
    +
    +
    data +

    (data.frame) data to drop levels.

    -
    subject_var
    +
    subject_var +

    (character) subject variable.

    -
    visit_var
    +
    visit_var +

    (character) visit variable.

    -
    except
    +
    except +

    (character) variables to exclude from dropping.

    -
    + + + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_extra_levels.html b/v0.3.13/reference/h_extra_levels.html index 9ceaeb688..bce1b764c 100644 --- a/v0.3.13/reference/h_extra_levels.html +++ b/v0.3.13/reference/h_extra_levels.html @@ -1,11 +1,27 @@ - -Check if a Factor Should Drop Levels — h_extra_levels • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,21 +123,27 @@
    -

    Usage

    +

    Usage +

    h_extra_levels(x)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (vector) vector to check.

    -
    + + + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_extract_covariance_terms.html b/v0.3.13/reference/h_extract_covariance_terms.html index d2381287b..437b7d1e3 100644 --- a/v0.3.13/reference/h_extract_covariance_terms.html +++ b/v0.3.13/reference/h_extract_covariance_terms.html @@ -1,11 +1,27 @@ - -Extract Formula Terms used for Covariance Structure Definition — h_extract_covariance_terms • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,26 +123,33 @@
    -

    Usage

    +

    Usage +

    h_extract_covariance_terms(f)
    -

    Arguments

    +

    Arguments +

    -
    f
    +
    +
    f +

    (formula)
    a formula from which covariance terms should be extracted.

    -
    + +
    -

    Value

    +

    Value +

    A list of covariance structure expressions found in f.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_first_contain_categorical.html b/v0.3.13/reference/h_first_contain_categorical.html index b1fbe5dd4..2683e108a 100644 --- a/v0.3.13/reference/h_first_contain_categorical.html +++ b/v0.3.13/reference/h_first_contain_categorical.html @@ -1,11 +1,27 @@ - -Check if the Effect is the First Categorical Effect — h_first_contain_categorical • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,29 +123,37 @@
    -

    Usage

    +

    Usage +

    h_first_contain_categorical(effect, factors, categorical)
    -

    Arguments

    +

    Arguments +

    -
    effect
    +
    +
    effect +

    (string) name of the effect.

    -
    factors
    +
    factors +

    (matrix) the factor matrix.

    -
    categorical
    +
    categorical +

    (character) names of the categorical values.

    -
    + + + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_get_contrast.html b/v0.3.13/reference/h_get_contrast.html index 201385e10..89e8afe73 100644 --- a/v0.3.13/reference/h_get_contrast.html +++ b/v0.3.13/reference/h_get_contrast.html @@ -1,11 +1,27 @@ - -Obtain Contrast for Specified Effect — h_get_contrast • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    h_get_contrast(
       object,
       effect,
    @@ -107,32 +134,41 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the fitted MMRM.

    -
    effect
    +
    effect +

    (string) the name of the effect.

    -
    type
    +
    type +

    (string) type of test, "II", "III", '2', or '3'.

    -
    tol
    +
    tol +

    (numeric) threshold blow which values are treated as 0.

    -
    + +
    -

    Value

    +

    Value +

    A matrix of the contrast.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_get_cov_default.html b/v0.3.13/reference/h_get_cov_default.html index 78866aa38..46fa8b15c 100644 --- a/v0.3.13/reference/h_get_cov_default.html +++ b/v0.3.13/reference/h_get_cov_default.html @@ -1,13 +1,29 @@ - -Obtain Default Covariance Method — h_get_cov_default • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,26 +126,33 @@
    -

    Usage

    +

    Usage +

    h_get_cov_default(
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within")
     )
    -

    Arguments

    +

    Arguments +

    -
    method
    +
    +
    method +

    (string)
    degrees of freedom method.

    -
    + +
    -

    Value

    +

    Value +

    String of the default covariance method.

    -

    Details

    +

    Details +

    The default covariance method is different for different degrees of freedom method. For "Satterthwaite" or "Between-Within", "Asymptotic" is returned. For "Kenward-Roger" only, "Kenward-Roger" is returned. @@ -127,7 +160,8 @@

    Details

    + + - + + - + + diff --git a/v0.3.13/reference/h_get_empirical.html b/v0.3.13/reference/h_get_empirical.html index e260283de..34fa9c7e8 100644 --- a/v0.3.13/reference/h_get_empirical.html +++ b/v0.3.13/reference/h_get_empirical.html @@ -1,15 +1,31 @@ - -Obtain Empirical/Jackknife/Bias-Reduced Covariance — h_get_empirical • mmrm + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,43 +129,57 @@
    -

    Usage

    +

    Usage +

    h_get_empirical(tmb_data, theta, beta, beta_vcov, type)
    -

    Arguments

    +

    Arguments +

    -
    tmb_data
    +
    +
    tmb_data +

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    -
    theta
    +
    theta +

    (numeric)
    theta estimate.

    -
    beta
    +
    beta +

    (numeric)
    beta estimate.

    -
    beta_vcov
    +
    beta_vcov +

    (matrix)
    covariance of beta estimate.

    -
    type
    +
    type +

    (string)
    type of empirical method, including "Empirical", "Empirical-Jackknife" and "Empirical-Bias-Reduced".

    -
    + +
    -

    Value

    -

    Named list with elements:

    • cov: matrix empirical covariance.

    • +

      Value +

      +

      Named list with elements:

      +
        +
      • cov: matrix empirical covariance.

      • df_mat: matrix to calculate Satterthwaite degree of freedom.

      • -
    + + + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_get_index.html b/v0.3.13/reference/h_get_index.html index 971cd462c..8baf1e41d 100644 --- a/v0.3.13/reference/h_get_index.html +++ b/v0.3.13/reference/h_get_index.html @@ -1,11 +1,27 @@ - -Test if the First Vector is Subset of the Second Vector — h_get_index • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_get_index(x, y)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (vector) the first list.

    -
    y
    +
    y +

    (vector) the second list.

    -
    + + + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_get_kr_comp.html b/v0.3.13/reference/h_get_kr_comp.html index 0d0e7b95f..4a650f1ff 100644 --- a/v0.3.13/reference/h_get_kr_comp.html +++ b/v0.3.13/reference/h_get_kr_comp.html @@ -1,13 +1,29 @@ - -Obtain Kenward-Roger Adjustment Components — h_get_kr_comp • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,30 +126,41 @@
    -

    Usage

    +

    Usage +

    h_get_kr_comp(tmb_data, theta)
    -

    Arguments

    +

    Arguments +

    -
    tmb_data
    +
    +
    tmb_data +

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    -
    theta
    +
    theta +

    (numeric)
    theta estimate.

    -
    + +
    -

    Value

    -

    Named list with elements:

    • P: matrix of \(P\) component.

    • +

      Value +

      +

      Named list with elements:

      +
        +
      • P: matrix of \(P\) component.

      • Q: matrix of \(Q\) component.

      • R: matrix of \(R\) component.

      • -
    + +
    -

    Details

    +

    Details +

    the function returns a named list, \(P\), \(Q\) and \(R\), which corresponds to the paper in 1997. The matrices are stacked in columns so that \(P\), \(Q\) and \(R\) has the same column number(number of beta parameters). The number of rows, is dependent on @@ -135,7 +172,8 @@

    Details

    + + - + + - + + diff --git a/v0.3.13/reference/h_get_na_action.html b/v0.3.13/reference/h_get_na_action.html index 9035d2ad6..d348f3053 100644 --- a/v0.3.13/reference/h_get_na_action.html +++ b/v0.3.13/reference/h_get_na_action.html @@ -1,11 +1,27 @@ - -Obtain na.action as Function — h_get_na_action • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,12 +123,14 @@
    -

    Usage

    +

    Usage +

    h_get_na_action(na_action)
    - + + - + + - + + diff --git a/v0.3.13/reference/h_get_optimizers.html b/v0.3.13/reference/h_get_optimizers.html index 31adcb7f5..157c5af04 100644 --- a/v0.3.13/reference/h_get_optimizers.html +++ b/v0.3.13/reference/h_get_optimizers.html @@ -1,11 +1,27 @@ - -Obtain Optimizer according to Optimizer String Value — h_get_optimizers • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    h_get_optimizers(
       optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"),
       optimizer_fun = h_optimizer_fun(optimizer),
    @@ -107,49 +134,65 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    optimizer
    +
    +
    optimizer +

    (character)
    names of built-in optimizers to try, subset of "L-BFGS-B", "BFGS", "CG" and "nlminb".

    -
    optimizer_fun
    +
    optimizer_fun +

    (function or list of function)
    alternatively to optimizer, an optimizer function or a list of optimizer functions can be passed directly here.

    -
    optimizer_args
    +
    optimizer_args +

    (list)
    additional arguments for optimizer_fun.

    -
    optimizer_control
    +
    optimizer_control +

    (list)
    passed to argument control in optimizer_fun.

    -
    + +
    -

    Value

    +

    Value +

    Named list of optimizers created by h_partial_fun_args().

    -

    Details

    -

    If you want to use only the built-in optimizers:

    • optimizer is a shortcut to create a list of built-in optimizer functions +

      Details +

      +

      If you want to use only the built-in optimizers:

      +
        +
      • optimizer is a shortcut to create a list of built-in optimizer functions passed to optimizer_fun.

      • Allowed are "L-BFGS-B", "BFGS", "CG" (using stats::optim() with corresponding method) and "nlminb" (using stats::nlminb()).

      • Other arguments should go into optimizer_args.

      • -

      If you want to use your own optimizer function:

      • Make sure that there are three arguments: parameter (start value), objective function +

      +

      If you want to use your own optimizer function:

      +
        +
      • Make sure that there are three arguments: parameter (start value), objective function and gradient function are sequentially in the function arguments.

      • If there are other named arguments in front of these, make sure they are correctly specified through optimizer_args.

      • If the hessian can be used, please make sure its argument name is hessian and please add attribute use_hessian = TRUE to the function, using attr(fun, "use_hessian) <- TRUE.

      • -
    + + + + - + + - + + diff --git a/v0.3.13/reference/h_get_prediction.html b/v0.3.13/reference/h_get_prediction.html index d0e8d8e71..c9e7d9519 100644 --- a/v0.3.13/reference/h_get_prediction.html +++ b/v0.3.13/reference/h_get_prediction.html @@ -1,11 +1,27 @@ - -Get Prediction — h_get_prediction • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,43 +123,57 @@
    -

    Usage

    +

    Usage +

    h_get_prediction(tmb_data, theta, beta, beta_vcov)
    -

    Arguments

    +

    Arguments +

    -
    tmb_data
    +
    +
    tmb_data +

    (mmrm_tmb_data)
    object.

    -
    theta
    +
    theta +

    (numeric)
    theta value.

    -
    beta
    +
    beta +

    (numeric)
    beta value.

    -
    beta_vcov
    +
    beta_vcov +

    (matrix)
    beta_vcov matrix.

    -
    + +
    -

    Value

    -

    List with:

    • prediction: Matrix with columns fit, conf_var, and var.

    • +

      Value +

      +

      List with:

      +
        +
      • prediction: Matrix with columns fit, conf_var, and var.

      • covariance: List with subject specific covariance matrices.

      • index: List of zero-based subject indices.

      • -
    + +
    -

    Details

    +

    Details +

    See predict function in predict.cpp which is called internally.

    + + - + + - + + diff --git a/v0.3.13/reference/h_get_prediction_variance.html b/v0.3.13/reference/h_get_prediction_variance.html index 214bdaf84..d3586d4c7 100644 --- a/v0.3.13/reference/h_get_prediction_variance.html +++ b/v0.3.13/reference/h_get_prediction_variance.html @@ -1,11 +1,27 @@ - -Get Prediction Variance — h_get_prediction_variance • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,29 +123,37 @@
    -

    Usage

    +

    Usage +

    h_get_prediction_variance(object, nsim, tmb_data)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm_tmb)
    the fitted MMRM.

    -
    nsim
    +
    nsim +

    (count)
    number of samples.

    -
    tmb_data
    +
    tmb_data +

    (mmrm_tmb_data)
    object.

    -
    + + + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_get_sim_per_subj.html b/v0.3.13/reference/h_get_sim_per_subj.html index ac0c61d0c..419f0bed9 100644 --- a/v0.3.13/reference/h_get_sim_per_subj.html +++ b/v0.3.13/reference/h_get_sim_per_subj.html @@ -1,11 +1,27 @@ - -Get simulated values by patient. — h_get_sim_per_subj • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,29 +123,37 @@
    -

    Usage

    +

    Usage +

    h_get_sim_per_subj(predict_res, nsub, nsim)
    -

    Arguments

    +

    Arguments +

    -
    predict_res
    +
    +
    predict_res +

    (list)
    from h_get_prediction().

    -
    nsub
    +
    nsub +

    (count)
    number of subjects.

    -
    nsim
    +
    nsim +

    (count)
    number of values to simulate.

    -
    + + + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_get_theta_from_cov.html b/v0.3.13/reference/h_get_theta_from_cov.html index 633b3c311..9740cef2b 100644 --- a/v0.3.13/reference/h_get_theta_from_cov.html +++ b/v0.3.13/reference/h_get_theta_from_cov.html @@ -1,11 +1,27 @@ - -Obtain Theta from Covariance Matrix — h_get_theta_from_cov • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,30 +123,38 @@
    -

    Usage

    +

    Usage +

    h_get_theta_from_cov(covariance)
    -

    Arguments

    +

    Arguments +

    -
    covariance
    +
    +
    covariance +

    (matrix) of covariance matrix values.

    -
    + +
    -

    Value

    +

    Value +

    Numeric vector of the theta values.

    -

    Details

    +

    Details +

    If the covariance matrix has NA in some of the elements, they will be replaced by 0 (non-diagonal) and 1 (diagonal). This ensures that the matrix is positive definite.

    + + - + + - + + diff --git a/v0.3.13/reference/h_gradient.html b/v0.3.13/reference/h_gradient.html index bf340f62c..e183c2cec 100644 --- a/v0.3.13/reference/h_gradient.html +++ b/v0.3.13/reference/h_gradient.html @@ -1,13 +1,29 @@ - -Computation of a Gradient Given Jacobian and Contrast Vector — h_gradient • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,32 +126,40 @@
    -

    Usage

    +

    Usage +

    h_gradient(jac_list, contrast)
    -

    Arguments

    +

    Arguments +

    -
    jac_list
    +
    +
    jac_list +

    (list)
    Jacobian list produced e.g. by h_jac_list().

    -
    contrast
    +
    contrast +

    (numeric)
    contrast vector, which needs to have the same number of elements as there are rows and columns in each element of jac_list.

    -
    + +
    -

    Value

    +

    Value +

    Numeric vector which contains the quadratic forms of each element of jac_list with the contrast vector.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_jac_list.html b/v0.3.13/reference/h_jac_list.html index 5d7953c53..a7b782067 100644 --- a/v0.3.13/reference/h_jac_list.html +++ b/v0.3.13/reference/h_jac_list.html @@ -1,11 +1,27 @@ - -Obtain List of Jacobian Matrix Entries for Covariance Matrix — h_jac_list • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,35 +123,44 @@
    -

    Usage

    +

    Usage +

    h_jac_list(tmb_data, theta_est, beta_vcov)
    -

    Arguments

    +

    Arguments +

    -
    tmb_data
    +
    +
    tmb_data +

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    -
    theta_est
    +
    theta_est +

    (numeric)
    variance parameters point estimate.

    -
    beta_vcov
    +
    beta_vcov +

    (matrix)
    vairance covariance matrix of coefficients.

    -
    + +
    -

    Value

    +

    Value +

    List with one element per variance parameter containing a matrix of the same dimensions as the covariance matrix. The values are the derivatives with regards to this variance parameter.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_kr_df.html b/v0.3.13/reference/h_kr_df.html index f24cf8b82..7da728596 100644 --- a/v0.3.13/reference/h_kr_df.html +++ b/v0.3.13/reference/h_kr_df.html @@ -1,13 +1,29 @@ - -Obtain the Adjusted Kenward-Roger degrees of freedom — h_kr_df • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,38 +126,51 @@
    -

    Usage

    +

    Usage +

    h_kr_df(v0, l, w, p)
    -

    Arguments

    +

    Arguments +

    -
    v0
    +
    +
    v0 +

    (matrix)
    unadjusted covariance matrix.

    -
    l
    +
    l +

    (matrix)
    linear combination matrix.

    -
    w
    +
    w +

    (matrix)
    hessian matrix.

    -
    p
    +
    p +

    (matrix)
    P matrix from h_get_kr_comp().

    -
    + +
    -

    Value

    -

    Named list with elements:

    • m: numeric degrees of freedom.

    • +

      Value +

      +

      Named list with elements:

      +
        +
      • m: numeric degrees of freedom.

      • lambda: numeric F statistic scale parameter.

      • -
    + + + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_md_denom_df.html b/v0.3.13/reference/h_md_denom_df.html index ca1ec80ad..a62aa1dcc 100644 --- a/v0.3.13/reference/h_md_denom_df.html +++ b/v0.3.13/reference/h_md_denom_df.html @@ -1,11 +1,27 @@ - -Calculating Denominator Degrees of Freedom for the Multi-Dimensional Case — h_md_denom_df • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,32 +123,40 @@
    -

    Usage

    +

    Usage +

    h_md_denom_df(t_stat_df)
    -

    Arguments

    +

    Arguments +

    -
    t_stat_df
    +
    +
    t_stat_df +

    (numeric)
    n t-statistic derived degrees of freedom.

    -
    + +
    -

    Value

    +

    Value +

    Usually the calculation is returning 2 * E / (E - n) where E is the sum of t / (t - 2) over all t_stat_df values t.

    -

    Note

    +

    Note +

    If the input values are two similar to each other then just the average of them is returned. If any of the inputs is not larger than 2 then 2 is returned.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_mmrm_tmb_assert_start.html b/v0.3.13/reference/h_mmrm_tmb_assert_start.html index df795913b..1a41ef79a 100644 --- a/v0.3.13/reference/h_mmrm_tmb_assert_start.html +++ b/v0.3.13/reference/h_mmrm_tmb_assert_start.html @@ -1,11 +1,27 @@ - -Asserting Sane Start Values for TMB Fit — h_mmrm_tmb_assert_start • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_assert_start(tmb_object)
    -

    Arguments

    +

    Arguments +

    -
    tmb_object
    +
    +
    tmb_object +

    (list)
    created with TMB::MakeADFun().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used for assertions.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_mmrm_tmb_check_conv.html b/v0.3.13/reference/h_mmrm_tmb_check_conv.html index d842116b3..5aa822319 100644 --- a/v0.3.13/reference/h_mmrm_tmb_check_conv.html +++ b/v0.3.13/reference/h_mmrm_tmb_check_conv.html @@ -1,11 +1,27 @@ - -Checking the TMB Optimization Result — h_mmrm_tmb_check_conv • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,30 +123,38 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_check_conv(tmb_opt, mmrm_tmb)
    -

    Arguments

    +

    Arguments +

    -
    tmb_opt
    +
    +
    tmb_opt +

    (list)
    optimization result.

    -
    mmrm_tmb
    +
    mmrm_tmb +

    (mmrm_tmb)
    result from h_mmrm_tmb_fit().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used to generate warnings in case that the model did not converge.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_mmrm_tmb_data.html b/v0.3.13/reference/h_mmrm_tmb_data.html index 78c3c81a6..d19521d17 100644 --- a/v0.3.13/reference/h_mmrm_tmb_data.html +++ b/v0.3.13/reference/h_mmrm_tmb_data.html @@ -1,11 +1,27 @@ - -Data for TMB Fit — h_mmrm_tmb_data • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_data(
       formula_parts,
       data,
    @@ -113,47 +140,61 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    formula_parts
    +
    +
    formula_parts +

    (mmrm_tmb_formula_parts)
    list with formula parts from h_mmrm_tmb_formula_parts().

    -
    data
    +
    data +

    (data.frame)
    which contains variables used in formula_parts.

    -
    weights
    +
    weights +

    (vector)
    weights to be used in the fitting process.

    -
    reml
    +
    reml +

    (flag)
    whether restricted maximum likelihood (REML) estimation is used, otherwise maximum likelihood (ML) is used.

    -
    singular
    +
    singular +

    (string)
    choices of method deal with rank-deficient matrices. "error" to stop the function return the error, "drop" to drop these columns, and "keep" to keep all the columns.

    -
    drop_visit_levels
    +
    drop_visit_levels +

    (flag)
    whether to drop levels for visit variable, if visit variable is a factor.

    -
    allow_na_response
    +
    allow_na_response +

    (flag)
    whether NA in response is allowed.

    -
    drop_levels
    +
    drop_levels +

    (flag)
    whether drop levels for covariates. If not dropped could lead to singular matrix.

    -
    + +
    -

    Value

    -

    List of class mmrm_tmb_data with elements:

    • full_frame: data.frame with n rows containing all variables needed in the model.

    • +

      Value +

      +

      List of class mmrm_tmb_data with elements:

      +
        +
      • full_frame: data.frame with n rows containing all variables needed in the model.

      • data: data.frame of input dataset.

      • x_matrix: matrix with n rows and p columns specifying the overall design matrix.

      • x_cols_aliased: logical with potentially more than p elements indicating which @@ -173,9 +214,11 @@

        Value

        reml: int specifying whether REML estimation is used (1), otherwise ML (0).

      • subject_groups: factor specifying the grouping for each subject.

      • n_groups: int with the number of total groups

      • -
    + +
    -

    Details

    +

    Details +

    Note that the subject_var must not be factor but can also be character. If it is character, then it will be converted to factor internally. Here the levels will be the unique values, sorted alphabetically and numerically if there @@ -184,7 +227,8 @@

    Details

    + + - + + - + + diff --git a/v0.3.13/reference/h_mmrm_tmb_extract_cov.html b/v0.3.13/reference/h_mmrm_tmb_extract_cov.html index 63e280f6b..5e9469a3e 100644 --- a/v0.3.13/reference/h_mmrm_tmb_extract_cov.html +++ b/v0.3.13/reference/h_mmrm_tmb_extract_cov.html @@ -1,13 +1,29 @@ - -Extract covariance matrix from TMB report and input data — h_mmrm_tmb_extract_cov • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,39 +126,49 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_extract_cov(tmb_report, tmb_data, visit_var, is_spatial)
    -

    Arguments

    +

    Arguments +

    -
    tmb_report
    +
    +
    tmb_report +

    (list)
    report created with TMB::MakeADFun() report function.

    -
    tmb_data
    +
    tmb_data +

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    -
    visit_var
    +
    visit_var +

    (character)
    character vector of the visit variable

    -
    is_spatial
    +
    is_spatial +

    (flag)
    indicator whether the covariance structure is spatial.

    -
    + +
    -

    Value

    +

    Value +

    Return a simple covariance matrix if there is no grouping, or a named list of estimated grouped covariance matrices, with its name equal to the group levels.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_mmrm_tmb_fit.html b/v0.3.13/reference/h_mmrm_tmb_fit.html index 6fc4f1ae7..2e8d714d5 100644 --- a/v0.3.13/reference/h_mmrm_tmb_fit.html +++ b/v0.3.13/reference/h_mmrm_tmb_fit.html @@ -1,13 +1,29 @@ - -Build TMB Fit Result List — h_mmrm_tmb_fit • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,34 +126,45 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_fit(tmb_object, tmb_opt, formula_parts, tmb_data)
    -

    Arguments

    +

    Arguments +

    -
    tmb_object
    +
    +
    tmb_object +

    (list)
    created with TMB::MakeADFun().

    -
    tmb_opt
    +
    tmb_opt +

    (list)
    optimization result.

    -
    formula_parts
    +
    formula_parts +

    (mmrm_tmb_formula_parts)
    produced by h_mmrm_tmb_formula_parts().

    -
    tmb_data
    +
    tmb_data +

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    -
    + +
    -

    Value

    -

    List of class mmrm_tmb with:

    • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

    • +

      Value +

      +

      List of class mmrm_tmb with:

      +
        +
      • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

      • beta_est: vector of coefficient estimates.

      • beta_vcov: Variance-covariance matrix for coefficient estimates.

      • beta_vcov_inv_L: Lower triangular matrix L of the inverse variance-covariance matrix decomposition.

      • @@ -142,16 +179,19 @@

        Value

        opt_details: list with optimization details including convergence code.

      • tmb_object: original TMB object created with TMB::MakeADFun().

      • tmb_data: input.

      • -
    + +
    -

    Details

    +

    Details +

    Instead of inverting or decomposing beta_vcov, it can be more efficient to use its robust Cholesky decomposition LDL^T, therefore we return the corresponding two components L and D as well since they have been available on the C++ side already.

    + + - + + - + + diff --git a/v0.3.13/reference/h_mmrm_tmb_formula_parts.html b/v0.3.13/reference/h_mmrm_tmb_formula_parts.html index c7c326afd..e14d41731 100644 --- a/v0.3.13/reference/h_mmrm_tmb_formula_parts.html +++ b/v0.3.13/reference/h_mmrm_tmb_formula_parts.html @@ -1,11 +1,27 @@ - -Processing the Formula for TMB Fit — h_mmrm_tmb_formula_parts • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_formula_parts(
       formula,
       covariance = as.cov_struct(formula, warn_partial = FALSE)
    @@ -105,21 +132,29 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    formula
    +
    +
    formula +

    (formula)
    Original formula.

    -
    covariance
    +
    covariance +

    (cov_struct)
    A covariance structure from which additional formula parts should be added.

    -
    + +
    -

    Value

    -

    List of class mmrm_tmb_formula_parts with elements:

    • formula: the original input.

    • +

      Value +

      +

      List of class mmrm_tmb_formula_parts with elements:

      +
        +
      • formula: the original input.

      • model_formula: formula with the covariance term is removed.

      • model_formula: formula with the covariance term removed.

      • full_formula: same as model_formula but includes the covariance @@ -132,10 +167,12 @@

        Value

        group_var: string with the group variable name. If no group specified, this element is NULL.

      • model_var: character with the variables names of the formula, except subject_var.

      • -
    + + + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_mmrm_tmb_parameters.html b/v0.3.13/reference/h_mmrm_tmb_parameters.html index a1233bf96..b48c30030 100644 --- a/v0.3.13/reference/h_mmrm_tmb_parameters.html +++ b/v0.3.13/reference/h_mmrm_tmb_parameters.html @@ -1,11 +1,27 @@ - -Start Parameters for TMB Fit — h_mmrm_tmb_parameters • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,40 +123,50 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_parameters(formula_parts, tmb_data, start, n_groups = 1L)
    -

    Arguments

    +

    Arguments +

    -
    formula_parts
    +
    +
    formula_parts +

    (mmrm_tmb_formula_parts)
    produced by h_mmrm_tmb_formula_parts().

    -
    tmb_data
    +
    tmb_data +

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    -
    start
    +
    start +

    (numeric or NULL)
    optional start values for variance parameters.

    -
    n_groups
    +
    n_groups +

    (int)
    number of groups.

    -
    + +
    -

    Value

    +

    Value +

    List with element theta containing the start values for the variance parameters.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_newdata_add_pred.html b/v0.3.13/reference/h_newdata_add_pred.html index 0c5712c30..4ea948662 100644 --- a/v0.3.13/reference/h_newdata_add_pred.html +++ b/v0.3.13/reference/h_newdata_add_pred.html @@ -1,11 +1,27 @@ - -Add Prediction Results to New Data — h_newdata_add_pred • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,44 +123,55 @@
    -

    Usage

    +

    Usage +

    h_newdata_add_pred(x, newdata, se_fit, interval, ...)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (mmrm)
    fit.

    -
    newdata
    +
    newdata +

    (data.frame)
    data to predict.

    -
    se_fit
    +
    se_fit +

    (flag)
    whether to return standard error of prediction, can only be used when interval is not "none".

    -
    interval
    +
    interval +

    (string)
    type of interval.

    -
    ...
    +
    ... +

    passed to predict.mmrm_tmb().

    -
    + +
    -

    Value

    +

    Value +

    The newdata as a tibble with additional columns .fitted, .lower, .upper (if interval is not none) and .se.fit (if se_fit requested).

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_obtain_lvls.html b/v0.3.13/reference/h_obtain_lvls.html index 8cfb0d1f5..cbf1d75e5 100644 --- a/v0.3.13/reference/h_obtain_lvls.html +++ b/v0.3.13/reference/h_obtain_lvls.html @@ -1,11 +1,27 @@ - -Obtain Levels Prior and Posterior — h_obtain_lvls • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,33 +123,42 @@
    -

    Usage

    +

    Usage +

    h_obtain_lvls(var, additional_vars, xlev, factors)
    -

    Arguments

    +

    Arguments +

    -
    var
    +
    +
    var +

    (string) name of the effect.

    -
    additional_vars
    +
    additional_vars +

    (character) names of additional variables.

    -
    xlev
    +
    xlev +

    (list) named list of character levels.

    -
    factors
    +
    factors +

    (matrix) the factor matrix.

    -
    + + + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_optimizer_fun.html b/v0.3.13/reference/h_optimizer_fun.html index 1b24f98c7..d8a1a87c2 100644 --- a/v0.3.13/reference/h_optimizer_fun.html +++ b/v0.3.13/reference/h_optimizer_fun.html @@ -1,11 +1,27 @@ - -Obtain Optimizer Function with Character — h_optimizer_fun • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_optimizer_fun(optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"))
    -

    Arguments

    +

    Arguments +

    -
    optimizer
    +
    +
    optimizer +

    (character)
    vector of optimizers.

    -
    + +
    -

    Value

    +

    Value +

    A (list)
    of optimizer functions generated from h_partial_fun_args().

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_partial_fun_args.html b/v0.3.13/reference/h_partial_fun_args.html index 5d62f3b15..a187c6038 100644 --- a/v0.3.13/reference/h_partial_fun_args.html +++ b/v0.3.13/reference/h_partial_fun_args.html @@ -1,11 +1,27 @@ - -Create Partial Functions — h_partial_fun_args • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,33 +123,42 @@
    -

    Usage

    +

    Usage +

    h_partial_fun_args(fun, ..., additional_attr = list())
    -

    Arguments

    +

    Arguments +

    -
    fun
    +
    +
    fun +

    (function)
    to be wrapped.

    -
    ...
    +
    ... +

    Additional arguments for fun.

    -
    additional_attr
    +
    additional_attr +

    (list)
    of additional attributes to apply to the result.

    -
    + +
    -

    Value

    +

    Value +

    Object with S3 class "partial", a function with args attribute (and possibly more attributes from additional_attr).

    -

    Details

    +

    Details +

    This function add args attribute to the original function, and add an extra class partial to the function. args is the argument for the function, and elements in ... will override the existing @@ -131,7 +166,8 @@

    Details

    + + - + + - + + diff --git a/v0.3.13/reference/h_print_aic_list.html b/v0.3.13/reference/h_print_aic_list.html index dcf714efd..b0bf0f5cc 100644 --- a/v0.3.13/reference/h_print_aic_list.html +++ b/v0.3.13/reference/h_print_aic_list.html @@ -1,11 +1,27 @@ - -Printing AIC and other Model Fit Criteria — h_print_aic_list • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_print_aic_list(aic_list, digits = 1)
    -

    Arguments

    +

    Arguments +

    -
    aic_list
    +
    +
    aic_list +

    (list)
    list as part of from summary.mmrm().

    -
    digits
    +
    digits +

    (number)
    number of decimal places used with round().

    -
    + + + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_print_call.html b/v0.3.13/reference/h_print_call.html index 69f3dc727..368ec5f06 100644 --- a/v0.3.13/reference/h_print_call.html +++ b/v0.3.13/reference/h_print_call.html @@ -1,11 +1,27 @@ - -Printing MMRM Function Call — h_print_call • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,33 +123,42 @@
    -

    Usage

    +

    Usage +

    h_print_call(call, n_obs, n_subjects, n_timepoints)
    -

    Arguments

    +

    Arguments +

    -
    call
    +
    +
    call +

    (call)
    original mmrm() function call.

    -
    n_obs
    +
    n_obs +

    (int)
    number of observations.

    -
    n_subjects
    +
    n_subjects +

    (int)
    number of subjects.

    -
    n_timepoints
    +
    n_timepoints +

    (int)
    number of timepoints.

    -
    + + + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_print_cov.html b/v0.3.13/reference/h_print_cov.html index f1a95ded3..3b374a1da 100644 --- a/v0.3.13/reference/h_print_cov.html +++ b/v0.3.13/reference/h_print_cov.html @@ -1,11 +1,27 @@ - -Printing MMRM Covariance Type — h_print_cov • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,29 +123,37 @@
    -

    Usage

    +

    Usage +

    h_print_cov(cov_type, n_theta, n_groups)
    -

    Arguments

    +

    Arguments +

    -
    cov_type
    +
    +
    cov_type +

    (string)
    covariance structure abbreviation.

    -
    n_theta
    +
    n_theta +

    (count)
    number of variance parameters.

    -
    n_groups
    +
    n_groups +

    (count)
    number of groups.

    -
    + + + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_quad_form.html b/v0.3.13/reference/h_quad_form.html index 900328005..33f041229 100644 --- a/v0.3.13/reference/h_quad_form.html +++ b/v0.3.13/reference/h_quad_form.html @@ -1,13 +1,29 @@ - -Quadratic Form Calculations — h_quad_form • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,43 +126,54 @@
    -

    Usage

    +

    Usage +

    h_quad_form_vec(vec, center)
     
     h_quad_form_mat(mat, center)
    -

    Arguments

    +

    Arguments +

    -
    vec
    +
    +
    vec +

    (numeric)
    interpreted as a row vector.

    -
    center
    +
    center +

    (matrix)
    square numeric matrix with the same dimensions as x as the center of the quadratic form.

    -
    mat
    +
    mat +

    (matrix)
    numeric matrix to be multiplied left and right of center, therefore needs to have as many columns as there are rows and columns in center.

    -
    + +
    -

    Functions

    +

    Functions +

    -
    • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) +

        +
      • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) as a numeric (not a matrix).

      • h_quad_form_mat(): calculates the quadratic form mat %*% center %*% t(mat) as a matrix, the result is square and has dimensions identical to the number of rows in mat.

      • -
    + + + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_reconcile_cov_struct.html b/v0.3.13/reference/h_reconcile_cov_struct.html index f6b280e58..35a26569a 100644 --- a/v0.3.13/reference/h_reconcile_cov_struct.html +++ b/v0.3.13/reference/h_reconcile_cov_struct.html @@ -1,11 +1,27 @@ - -Reconcile Possible Covariance Structure Inputs — h_reconcile_cov_struct • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,34 +123,42 @@
    -

    Usage

    +

    Usage +

    h_reconcile_cov_struct(formula = NULL, covariance = NULL)
    -

    Arguments

    +

    Arguments +

    -
    formula
    +
    +
    formula +

    (formula)
    the model formula, see details.

    -
    covariance
    +
    covariance +

    (cov_struct)
    a covariance structure type definition as produced with cov_struct(), or value that can be coerced to a covariance structure using as.cov_struct(). If no value is provided, a structure is derived from the provided formula.

    -
    + +
    -

    Value

    +

    Value +

    The value covariance if it's provided or a covariance structure derived from the provided formula otherwise. An error is raised of both are provided.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_record_all_output.html b/v0.3.13/reference/h_record_all_output.html index 05f6722b8..e5f47faae 100644 --- a/v0.3.13/reference/h_record_all_output.html +++ b/v0.3.13/reference/h_record_all_output.html @@ -1,15 +1,31 @@ - -Capture all Output — h_record_all_output • mmrm + + + + + +Capture all Output — h_record_all_output • mmrm + + + + + + + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,41 +129,53 @@
    -

    Usage

    +

    Usage +

    h_record_all_output(expr, remove = list(), divergence = list())
    -

    Arguments

    +

    Arguments +

    -
    expr
    +
    +
    expr +

    (expression)
    to be executed.

    -
    remove
    +
    remove +

    (list)
    optional list with elements warnings, errors, messages which can be character vectors, which will be removed from the results if specified.

    -
    divergence
    +
    divergence +

    (list)
    optional list similar as remove, but these character vectors will be moved to the divergence result and signal that the fit did not converge.

    -
    + +
    -

    Value

    -

    A list containing

    • result: The object returned by expr or list() if an error was thrown.

    • +

      Value +

      +

      A list containing

      +
        +
      • result: The object returned by expr or list() if an error was thrown.

      • warnings: NULL or a character vector if warnings were thrown.

      • errors: NULL or a string if an error was thrown.

      • messages: NULL or a character vector if messages were produced.

      • divergence: NULL or a character vector if divergence messages were caught.

      • -
    + + + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_register_s3.html b/v0.3.13/reference/h_register_s3.html index 79ff22518..35831c9a4 100644 --- a/v0.3.13/reference/h_register_s3.html +++ b/v0.3.13/reference/h_register_s3.html @@ -1,13 +1,29 @@ - -Register S3 Method Register S3 method to a generic. — h_register_s3 • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,37 +126,47 @@
    -

    Usage

    +

    Usage +

    h_register_s3(pkg, generic, class, envir = parent.frame())
    -

    Arguments

    +

    Arguments +

    -
    pkg
    +
    +
    pkg +

    (string) name of the package name.

    -
    generic
    +
    generic +

    (string) name of the generic.

    -
    class
    +
    class +

    (string) class name the function want to dispatch.

    -
    envir
    +
    envir +

    (environment) the location the method is defined.

    -
    + +
    -

    Details

    +

    Details +

    This function is adapted from emmeans:::register_s3_method().

    + + - + + - + + diff --git a/v0.3.13/reference/h_residuals_normalized.html b/v0.3.13/reference/h_residuals_normalized.html index d93e7885b..a43866d66 100644 --- a/v0.3.13/reference/h_residuals_normalized.html +++ b/v0.3.13/reference/h_residuals_normalized.html @@ -1,11 +1,27 @@ - -Calculate normalized residuals — h_residuals_normalized • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_residuals_normalized(object)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_residuals_pearson.html b/v0.3.13/reference/h_residuals_pearson.html index 6a1810917..a1a5a51ad 100644 --- a/v0.3.13/reference/h_residuals_pearson.html +++ b/v0.3.13/reference/h_residuals_pearson.html @@ -1,11 +1,27 @@ - -Calculate Pearson Residuals — h_residuals_pearson • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_residuals_pearson(object)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_residuals_response.html b/v0.3.13/reference/h_residuals_response.html index 3fc3d80d0..3fd7dc035 100644 --- a/v0.3.13/reference/h_residuals_response.html +++ b/v0.3.13/reference/h_residuals_response.html @@ -1,11 +1,27 @@ - -Calculate response residuals. — h_residuals_response • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_residuals_response(object)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_split_control.html b/v0.3.13/reference/h_split_control.html index f1be70031..2e69282c8 100644 --- a/v0.3.13/reference/h_split_control.html +++ b/v0.3.13/reference/h_split_control.html @@ -1,13 +1,29 @@ - -Split Control List — h_split_control • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,29 +126,37 @@
    -

    Usage

    +

    Usage +

    h_split_control(control, ...)
    -

    Arguments

    +

    Arguments +

    -
    control
    +
    +
    control +

    (mmrm_control)
    object.

    -
    ...
    +
    ... +

    additional parameters to update the control object.

    -
    + +
    -

    Value

    +

    Value +

    A list of mmrm_control entries.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_summarize_all_fits.html b/v0.3.13/reference/h_summarize_all_fits.html index a6a4657f0..e7ac020ff 100644 --- a/v0.3.13/reference/h_summarize_all_fits.html +++ b/v0.3.13/reference/h_summarize_all_fits.html @@ -1,11 +1,27 @@ - -Summarizing List of Fits — h_summarize_all_fits • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_summarize_all_fits(all_fits)
    -

    Arguments

    +

    Arguments +

    -
    all_fits
    +
    +
    all_fits +

    (list of mmrm_fit or try-error)
    list of fits.

    -
    + +
    -

    Value

    +

    Value +

    List with warnings, messages, log_liks and converged results.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_tbl_confint_terms.html b/v0.3.13/reference/h_tbl_confint_terms.html index 8a889c01c..93615d2af 100644 --- a/v0.3.13/reference/h_tbl_confint_terms.html +++ b/v0.3.13/reference/h_tbl_confint_terms.html @@ -1,11 +1,27 @@ - -Extract tibble with Confidence Intervals and Term Names — h_tbl_confint_terms • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,29 +123,37 @@
    -

    Usage

    +

    Usage +

    h_tbl_confint_terms(x, ...)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (mmrm)
    fit object.

    -
    ...
    +
    ... +

    passed to stats::confint(), hence not used at the moment.

    -
    + +
    -

    Value

    +

    Value +

    A tibble with term, conf.low, conf.high columns.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_test_1d.html b/v0.3.13/reference/h_test_1d.html index 7ebbb91fe..167e5bd2e 100644 --- a/v0.3.13/reference/h_test_1d.html +++ b/v0.3.13/reference/h_test_1d.html @@ -1,13 +1,29 @@ - -Creating T-Statistic Test Results For One-Dimensional Contrast — h_test_1d • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,35 +126,44 @@
    -

    Usage

    +

    Usage +

    h_test_1d(object, contrast, df)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    contrast +

    (numeric)
    contrast vector. Note that this should not include elements for singular coefficient estimates, i.e. only refer to the actually estimated coefficients.

    -
    df
    +
    df +

    (number)
    degrees of freedom for the one-dimensional contrast.

    -
    + +
    -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val (2-sided p-value).

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_test_md.html b/v0.3.13/reference/h_test_md.html index eabcb9d34..26d97f4e2 100644 --- a/v0.3.13/reference/h_test_md.html +++ b/v0.3.13/reference/h_test_md.html @@ -1,13 +1,29 @@ - -Creating F-Statistic Test Results For Multi-Dimensional Contrast — h_test_md • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,37 +126,47 @@
    -

    Usage

    +

    Usage +

    h_test_md(object, contrast, df, f_stat_factor = 1)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    contrast +

    (matrix)
    numeric contrast matrix.

    -
    df
    +
    df +

    (number)
    denominator degrees of freedom for the multi-dimensional contrast.

    -
    f_stat_factor
    +
    f_stat_factor +

    (number)
    optional scaling factor on top of the standard F-statistic.

    -
    + +
    -

    Value

    +

    Value +

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

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_tmb_warn_optimization.html b/v0.3.13/reference/h_tmb_warn_optimization.html index 40f92b49f..47d8344c5 100644 --- a/v0.3.13/reference/h_tmb_warn_optimization.html +++ b/v0.3.13/reference/h_tmb_warn_optimization.html @@ -1,15 +1,31 @@ - -Warn if TMB is Configured to Optimize Instantly — h_tmb_warn_optimization • mmrm + + + + + +Warn if TMB is Configured to Optimize Instantly — h_tmb_warn_optimization • mmrm + + + + + + + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,17 +129,20 @@
    -

    Usage

    +

    Usage +

    h_tmb_warn_optimization()
    -

    Value

    +

    Value +

    No return value, called for side effects.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_tr.html b/v0.3.13/reference/h_tr.html index 899732a08..8040d4270 100644 --- a/v0.3.13/reference/h_tr.html +++ b/v0.3.13/reference/h_tr.html @@ -1,11 +1,27 @@ - -Trace of a Matrix — h_tr • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_tr(x)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (matrix)
    square matrix input.

    -
    + +
    -

    Value

    +

    Value +

    The trace of the square matrix.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_valid_formula.html b/v0.3.13/reference/h_valid_formula.html index 82744d7d6..f8bf390a8 100644 --- a/v0.3.13/reference/h_valid_formula.html +++ b/v0.3.13/reference/h_valid_formula.html @@ -1,11 +1,27 @@ - -Validate mmrm Formula — h_valid_formula • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,26 +123,33 @@
    -

    Usage

    +

    Usage +

    h_valid_formula(formula)
    -

    Arguments

    +

    Arguments +

    -
    formula
    +
    +
    formula +

    (formula)
    to check.

    -
    + +
    -

    Details

    +

    Details +

    In mmrm models, . is not allowed as it introduces ambiguity of covariates to be used, so it is not allowed to be in formula.

    + + - + + - + + diff --git a/v0.3.13/reference/h_var_adj.html b/v0.3.13/reference/h_var_adj.html index ec6189b1d..544154304 100644 --- a/v0.3.13/reference/h_var_adj.html +++ b/v0.3.13/reference/h_var_adj.html @@ -1,15 +1,31 @@ - -Obtain the Adjusted Covariance Matrix — h_var_adj • mmrm + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,45 +129,57 @@
    -

    Usage

    +

    Usage +

    h_var_adj(v, w, p, q, r, linear = FALSE)
    -

    Arguments

    +

    Arguments +

    -
    v
    +
    +
    v +

    (matrix)
    unadjusted covariance matrix.

    -
    w
    +
    w +

    (matrix)
    hessian matrix.

    -
    p
    +
    p +

    (matrix)
    P matrix from h_get_kr_comp().

    -
    q
    +
    q +

    (matrix)
    Q matrix from h_get_kr_comp().

    -
    r
    +
    r +

    (matrix)
    R matrix from h_get_kr_comp().

    -
    linear
    +
    linear +

    (flag)
    whether to use linear Kenward-Roger approximation.

    -
    + +
    -

    Value

    +

    Value +

    The matrix of adjusted covariance matrix.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/h_warn_na_action.html b/v0.3.13/reference/h_warn_na_action.html index c79f2c5fa..f75d30d5b 100644 --- a/v0.3.13/reference/h_warn_na_action.html +++ b/v0.3.13/reference/h_warn_na_action.html @@ -1,11 +1,27 @@ - -Warn on na.action — h_warn_na_action • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,12 +123,14 @@
    -

    Usage

    +

    Usage +

    h_warn_na_action()
    - + + - + + - + + diff --git a/v0.3.13/reference/h_within_or_between.html b/v0.3.13/reference/h_within_or_between.html index 4d20083ea..e48140afc 100644 --- a/v0.3.13/reference/h_within_or_between.html +++ b/v0.3.13/reference/h_within_or_between.html @@ -1,13 +1,29 @@ - -Determine Within or Between for each Design Matrix Column — h_within_or_between • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,30 +126,38 @@
    -

    Usage

    +

    Usage +

    h_within_or_between(x_matrix, subject_ids)
    -

    Arguments

    +

    Arguments +

    -
    x_matrix
    +
    +
    x_matrix +

    (matrix)
    the design matrix with column names.

    -
    subject_ids
    +
    subject_ids +

    (factor)
    the subject IDs.

    -
    + +
    -

    Value

    +

    Value +

    Character vector with "intercept", "within" or "between" for each design matrix column identified via the names of the vector.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/index.html b/v0.3.13/reference/index.html index 0c63b3b00..3cb231e9b 100644 --- a/v0.3.13/reference/index.html +++ b/v0.3.13/reference/index.html @@ -1,11 +1,25 @@ - -Package index • mmrm + + + + + + + + + Skip to contents @@ -21,10 +35,12 @@ + + + + + @@ -91,217 +115,284 @@
    -

    Package

    +

    Package +

    -
    +
    +
    -
    +
    +
    mmrm-package
    -
    mmrm Package
    -
    -

    Functions

    +
    +mmrm Package
    + +
    +
    +

    Functions +

    -
    +
    +
    -
    +
    +
    mmrm() stable
    Fit an MMRM
    -
    +
    +
    +
    fit_mmrm() stable
    Low-Level Fitting Function for MMRM
    -
    +
    +
    +
    mmrm_control() stable
    Control Parameters for Fitting an MMRM
    -
    +
    +
    +
    fit_single_optimizer() stable
    Fitting an MMRM with Single Optimizer
    -
    +
    +
    +
    refit_multiple_optimizers() stable
    Refitting MMRM with Multiple Optimizers
    -
    +
    +
    +
    df_1d() stable
    Calculation of Degrees of Freedom for One-Dimensional Contrast
    -
    +
    +
    +
    df_md() stable
    Calculation of Degrees of Freedom for Multi-Dimensional Contrast
    -
    +
    +
    +
    component() stable
    Component Access for mmrm_tmb Objects
    -
    -

    Start Values

    + +
    +
    +

    Start Values +

    -
    +
    +
    -
    +
    +
    std_start()
    Standard Starting Value
    -
    +
    +
    +
    emp_start()
    Empirical Starting Value
    -
    -

    Methods

    + +
    +
    +

    Methods +

    -
    +
    +
    -

    Covariance Structures

    + +
    +
    +

    Covariance Structures +

    -
    +
    +
    -
    +
    +
    cov_struct() stable
    Define a Covariance Structure
    -
    +
    +
    +
    as.cov_struct() stable
    Coerce into a Covariance Structure Definition
    -
    +
    +
    +
    format(<cov_struct>)
    Format Covariance Structure Object
    -
    +
    +
    +
    print(<cov_struct>)
    Print a Covariance Structure Object
    -
    +
    +
    +
    cov_types() stable
    Covariance Types
    -
    -

    Estimate Marginal Means

    + +
    +
    +

    Estimate Marginal Means +

    -
    +
    +
    -
    +
    +
    emmeans_support stable
    -
    Support for emmeans
    -
    -

    Datasets

    +
    Support for emmeans +
    + +
    +
    +

    Datasets +

    -
    +
    +
    -
    +
    +
    fev_data stable
    Example Data on FEV1
    -
    +
    +
    +
    bcva_data stable
    Example Data on BCVA
    -
    + + + + - + + - + + diff --git a/v0.3.13/reference/is_infix.html b/v0.3.13/reference/is_infix.html index f432c554b..a936a366d 100644 --- a/v0.3.13/reference/is_infix.html +++ b/v0.3.13/reference/is_infix.html @@ -1,11 +1,27 @@ - -Test Whether a Symbol is an Infix Operator — is_infix • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,30 +123,41 @@
    -

    Usage

    +

    Usage +

    is_infix(name)
    -

    Arguments

    +

    Arguments +

    -
    name
    +
    +
    name +

    (symbol or name or string)
    a possible reference to an infix operator to check.

    -
    + +
    -

    Value

    +

    Value +

    A logical indicating whether the name is the name of an infix operator.

    -

    is_infix(as.name("|"))
    +

    +
    +
    is_infix(as.name("|"))
     is_infix("|")
    -is_infix("c")

    +is_infix("c")
    +

    +
    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/mmrm-package.html b/v0.3.13/reference/mmrm-package.html index 2318e2b5e..619e771c4 100644 --- a/v0.3.13/reference/mmrm-package.html +++ b/v0.3.13/reference/mmrm-package.html @@ -1,11 +1,27 @@ - -mmrm Package — mmrm-package • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + +
    @@ -98,15 +125,23 @@
    -

    See also

    -
    -

    Author

    +

    Author +

    Maintainer: Daniel Sabanes Bove daniel.sabanes_bove@rconis.com (ORCID)

    -

    Authors:

    + +
    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/mmrm.html b/v0.3.13/reference/mmrm.html index aac4c1bab..b08baadcf 100644 --- a/v0.3.13/reference/mmrm.html +++ b/v0.3.13/reference/mmrm.html @@ -1,13 +1,29 @@ - -Fit an MMRM — mmrm • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,7 +126,8 @@
    -

    Usage

    +

    Usage +

    mmrm(
       formula,
       data,
    @@ -113,49 +140,61 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    formula
    +
    +
    formula +

    (formula)
    the model formula, see details.

    -
    data
    +
    data +

    (data)
    the data to be used for the model.

    -
    weights
    +
    weights +

    (vector)
    an optional vector of weights to be used in the fitting process. Should be NULL or a numeric vector.

    -
    covariance
    +
    covariance +

    (cov_struct)
    a covariance structure type definition as produced with cov_struct(), or value that can be coerced to a covariance structure using as.cov_struct(). If no value is provided, a structure is derived from the provided formula.

    -
    reml
    +
    reml +

    (flag)
    whether restricted maximum likelihood (REML) estimation is used, otherwise maximum likelihood (ML) is used.

    -
    control
    +
    control +

    (mmrm_control)
    fine-grained fitting specifications list created with mmrm_control().

    -
    ...
    +
    ... +

    arguments passed to mmrm_control().

    -
    + +
    -

    Value

    +

    Value +

    An mmrm object.

    -

    Details

    +

    Details +

    The formula typically looks like: FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID) so specifies response and covariates as usual, and exactly one special term @@ -181,15 +220,19 @@

    Detailsmmrm.

    -

    Note

    +

    Note +

    The mmrm object is also an mmrm_fit and an mmrm_tmb object, therefore corresponding methods also work (see mmrm_tmb_methods).

    -

    Additional contents depend on the choice of the adjustment method:

    • If Satterthwaite adjustment is used, the Jacobian information jac_list +

      Additional contents depend on the choice of the adjustment method:

      +
        +
      • If Satterthwaite adjustment is used, the Jacobian information jac_list is included.

      • If Kenward-Roger adjustment is used, kr_comp contains necessary components and beta_vcov_adj includes the adjusted coefficients covariance matrix.

      • -

      Use of the package emmeans is supported, see emmeans_support.

      +
    +

    Use of the package emmeans is supported, see emmeans_support.

    NA values are always omitted regardless of na.action setting.

    When the number of visit levels is large, it usually requires large memory to create the covariance matrix. By default, the maximum allowed visit levels is 100, and if there are more @@ -200,7 +243,8 @@

    Note

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -224,7 +268,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/v0.3.13/reference/mmrm_control.html b/v0.3.13/reference/mmrm_control.html index e3f2019c2..ab46a3212 100644 --- a/v0.3.13/reference/mmrm_control.html +++ b/v0.3.13/reference/mmrm_control.html @@ -1,15 +1,31 @@ - -Control Parameters for Fitting an MMRM — mmrm_control • mmrm + + + + + +Control Parameters for Fitting an MMRM — mmrm_control • mmrm + + + + + + + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,7 +129,8 @@
    -

    Usage

    +

    Usage +

    mmrm_control(
       n_cores = 1L,
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within"),
    @@ -117,50 +144,63 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    n_cores
    +
    +
    n_cores +

    (count)
    number of cores to be used.

    -
    method
    +
    method +

    (string)
    adjustment method for degrees of freedom.

    -
    vcov
    +
    vcov +

    (string)
    coefficients covariance matrix adjustment method.

    -
    start
    +
    start +

    (NULL, numeric or function)
    optional start values for variance parameters. See details for more information.

    -
    accept_singular
    +
    accept_singular +

    (flag)
    whether singular design matrices are reduced to full rank automatically and additional coefficient estimates will be missing.

    -
    drop_visit_levels
    +
    drop_visit_levels +

    (flag)
    whether to drop levels for visit variable, if visit variable is a factor, see details.

    -
    ...
    +
    ... +

    additional arguments passed to h_get_optimizers().

    -
    optimizers
    +
    optimizers +

    (list)
    optimizer specification, created with h_get_optimizers().

    -
    + +
    -

    Value

    +

    Value +

    List of class mmrm_control with the control parameters.

    -

    Details

    +

    Details +

    For example, if the data only has observations at visits VIS1, VIS3 and VIS4, by default they are treated to be equally spaced, the distance from VIS1 to VIS3, and from VIS3 to VIS4, are identical. However, you can manually convert this visit into a factor, with @@ -168,14 +208,45 @@

    DetailsVIS1 to VIS3 will be double, as VIS2 is a valid visit. However, please be cautious because this can lead to convergence failure when using an unstructured covariance matrix and there are no observations -at the missing visits.

    + +
    -

    Examples

    +

    Examples +

    mmrm_control(
       optimizer_fun = stats::optim,
       optimizer_args = list(method = "L-BFGS-B")
    @@ -311,7 +384,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/v0.3.13/reference/mmrm_methods.html b/v0.3.13/reference/mmrm_methods.html index 8f45f1771..b38d71ddd 100644 --- a/v0.3.13/reference/mmrm_methods.html +++ b/v0.3.13/reference/mmrm_methods.html @@ -1,11 +1,27 @@ - -Methods for mmrm Objects — mmrm_methods • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for class 'mmrm'
     summary(object, ...)
     
    @@ -114,52 +141,71 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the fitted MMRM including Jacobian and call etc.

    -
    ...
    +
    ... +

    not used.

    -
    + +
    -

    Value

    +

    Value +

    Depends on the method, see Details and Functions.

    -

    Details

    -

    While printing the summary of (mmrm)
    object, the following will be displayed:

    1. Formula. The formula used in the model.

    2. +

      Details +

      +

      While printing the summary of (mmrm)
      object, the following will be displayed:

      +
        +
      1. Formula. The formula used in the model.

      2. Data. The data used for analysis, including number of subjects, number of valid observations.

      3. Covariance. The covariance structure and number of variance parameters.

      4. Method. Restricted maximum likelihood(REML) or maximum likelihood(ML).

      5. Model selection criteria. AIC, BIC, log likelihood and deviance.

      6. Coefficients. Coefficients of the covariates.

      7. -
      8. Covariance estimate. The covariance estimate(for each group).

        1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available +

        2. +

          Covariance estimate. The covariance estimate(for each group).

          +
            +
          1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available in data will be displayed.

          2. If the covariance structure is spatial, the covariance matrix of two time points with unit distance will be displayed.

          3. -
        3. -

        confint is used to obtain the confidence intervals for the coefficients. +

      + +
    +

    confint is used to obtain the confidence intervals for the coefficients. Please note that this is different from the confidence interval of difference of least square means from emmeans.

    -

    Functions

    +

    Functions +

    -
    • summary(mmrm): summarizes the MMRM fit results.

    • +
        +
      • summary(mmrm): summarizes the MMRM fit results.

      • print(summary.mmrm): prints the MMRM fit summary.

      • confint(mmrm): obtain the confidence intervals for the coefficients.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_tmb_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- mmrm(formula, fev_data)
     # Summary:
    @@ -230,7 +276,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/v0.3.13/reference/mmrm_tidiers.html b/v0.3.13/reference/mmrm_tidiers.html index 3b4226ac6..eb2f9f32a 100644 --- a/v0.3.13/reference/mmrm_tidiers.html +++ b/v0.3.13/reference/mmrm_tidiers.html @@ -1,15 +1,31 @@ - -Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm + + + + + +Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm + + + + + + + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,7 +129,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for class 'mmrm'
     tidy(x, conf.int = FALSE, conf.level = 0.95, ...)
     
    @@ -122,56 +149,72 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (mmrm)
    fitted model.

    -
    conf.int
    +
    conf.int +

    (flag)
    if TRUE columns for the lower (conf.low) and upper bounds (conf.high) of coefficient estimates are included.

    -
    conf.level
    +
    conf.level +

    (number)
    defines the range of the optional confidence internal.

    -
    ...
    +
    ... +

    only used by augment() to pass arguments to the predict.mmrm_tmb() method.

    -
    newdata
    +
    newdata +

    (data.frame or NULL)
    optional new data frame.

    -
    interval
    +
    interval +

    (string)
    type of interval calculation.

    -
    se_fit
    +
    se_fit +

    (flag)
    whether to return standard errors of fit.

    -
    type.residuals
    +
    type.residuals +

    (string)
    passed on to residuals.mmrm_tmb().

    -
    + +
    -

    Functions

    +

    Functions +

    -
    • tidy(mmrm): derives tidy tibble from an mmrm object.

    • +
        +
      • tidy(mmrm): derives tidy tibble from an mmrm object.

      • glance(mmrm): derives glance tibble from an mmrm object.

      • augment(mmrm): derives augment tibble from an mmrm object.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tmb_methods for additional methods.

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -263,7 +306,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/v0.3.13/reference/mmrm_tmb_methods.html b/v0.3.13/reference/mmrm_tmb_methods.html index bbd59029c..50c6ee290 100644 --- a/v0.3.13/reference/mmrm_tmb_methods.html +++ b/v0.3.13/reference/mmrm_tmb_methods.html @@ -1,11 +1,27 @@ - -Methods for mmrm_tmb Objects — mmrm_tmb_methods • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for class 'mmrm_tmb'
     coef(object, complete = TRUE, ...)
     
    @@ -171,110 +198,137 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm_tmb)
    the fitted MMRM object.

    -
    complete
    +
    complete +

    (flag)
    whether to include potential non-estimable coefficients.

    -
    ...
    +
    ... +

    mostly not used; Exception is model.matrix() passing ... to the default method.

    -
    newdata
    +
    newdata +

    (data.frame)
    optional new data, otherwise data from object is used.

    -
    se.fit
    +
    se.fit +

    (flag)
    indicator if standard errors are required.

    -
    interval
    +
    interval +

    (string)
    type of interval calculation. Can be abbreviated.

    -
    level
    +
    level +

    (number)
    tolerance/confidence level.

    -
    nsim
    +
    nsim +

    (count)
    number of simulations to use.

    -
    conditional
    +
    conditional +

    (flag)
    indicator if the prediction is conditional on the observation or not.

    -
    formula
    +
    formula +

    (mmrm_tmb)
    same as object.

    -
    data
    +
    data +

    (data.frame)
    object in which to construct the frame.

    -
    include
    +
    include +

    (character)
    names of variable types to include. Must be NULL or one or more of c("subject_var", "visit_var", "group_var", "response_var").

    -
    full
    +
    full +

    (flag)
    indicator whether to return full model frame (deprecated).

    -
    na.action
    +
    na.action +

    (string)
    na action.

    -
    use_response
    +
    use_response +

    (flag)
    whether to use the response for complete rows.

    -
    x
    +
    x +

    (mmrm_tmb)
    same as object.

    -
    sigma
    +
    sigma +

    cannot be used (this parameter does not exist in MMRM).

    -
    corrected
    +
    corrected +

    (flag)
    whether corrected AIC should be calculated.

    -
    k
    +
    k +

    (number)
    the penalty per parameter to be used; default k = 2 is the classical AIC.

    -
    type
    +
    type +

    (string)
    unscaled (response), pearson or normalized. Default is response, and this is the only type available for use with models with a spatial covariance structure.

    -
    seed
    +
    seed +

    unused argument from stats::simulate().

    -
    method
    +
    method +

    (string)
    simulation method to use. If "conditional", simulated values are sampled given the estimated covariance matrix of object. If "marginal", the variance of the estimated covariance matrix is taken into account.

    -
    + +
    -

    Value

    +

    Value +

    Depends on the method, see Functions.

    -

    Details

    +

    Details +

    include argument controls the variables the returned model frame will include. Possible options are "response_var", "subject_var", "visit_var" and "group_var", representing the response variable, subject variable, visit variable or group variable. @@ -282,9 +336,11 @@

    Detailsmodel.matrix.

    -

    Functions

    +

    Functions +

    -
    • coef(mmrm_tmb): obtains the estimated coefficients.

    • +
        +
      • coef(mmrm_tmb): obtains the estimated coefficients.

      • fitted(mmrm_tmb): obtains the fitted values.

      • predict(mmrm_tmb): predict conditional means for new data; optionally with standard errors and confidence or prediction intervals. @@ -317,21 +373,29 @@

        Functions -

        References

        +

        References +

        -
        • hurvich1989regressionmmrm

        • +
            +
          • hurvich1989regressionmmrm

          • burnham1998practicalmmrm

          • -
          • galecki2013linearmmrm

          • -
    + +
      +
    • galecki2013linearmmrm

    • +
    +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- fit_mmrm(formula, fev_data, weights = rep(1, nrow(fev_data)))
     # Estimated coefficients:
    @@ -3870,7 +3934,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/v0.3.13/reference/parsnip_add_mmrm.html b/v0.3.13/reference/parsnip_add_mmrm.html index 4daa3a6be..a1655298c 100644 --- a/v0.3.13/reference/parsnip_add_mmrm.html +++ b/v0.3.13/reference/parsnip_add_mmrm.html @@ -1,11 +1,27 @@ - -Register mmrm For Use With tidymodels — parsnip_add_mmrm • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + +
    @@ -97,30 +124,38 @@
    -

    Usage

    +

    Usage +

    parsnip_add_mmrm(quietly = FALSE)
    -

    Arguments

    +

    Arguments +

    -
    quietly
    +
    +
    quietly +

    logical: should progress and error messages be suppressed?

    -
    + +
    -

    Value

    +

    Value +

    A logical value indicating whether registration was successful.

    -

    Details

    +

    Details +

    We can use parsnip::show_model_info("linear_reg") to check the registration with parsnip and thus the wider tidymodels ecosystem.

    + + - + + - + + diff --git a/v0.3.13/reference/position_symbol.html b/v0.3.13/reference/position_symbol.html index 902fdb398..6af40bc33 100644 --- a/v0.3.13/reference/position_symbol.html +++ b/v0.3.13/reference/position_symbol.html @@ -1,15 +1,31 @@ - -Search For the Position of a Symbol — position_symbol • mmrm + + + + + +Search For the Position of a Symbol — position_symbol • mmrm + + + + + + + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,36 +129,45 @@
    -

    Usage

    +

    Usage +

    position_symbol(x, sym, ...)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (list of language)
    a list of language objects in which to search for a specific symbol.

    -
    sym
    +
    sym +

    (name or symbol or character)
    a symbol to search for in x.

    -
    ...
    +
    ... +

    Additional arguments passed to Position().

    -
    + +
    -

    Value

    +

    Value +

    The position of the symbol if found, or the nomatch value otherwise.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/print.cov_struct.html b/v0.3.13/reference/print.cov_struct.html index 4c31fe52f..317c3c463 100644 --- a/v0.3.13/reference/print.cov_struct.html +++ b/v0.3.13/reference/print.cov_struct.html @@ -1,11 +1,27 @@ - -Print a Covariance Structure Object — print.cov_struct • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,30 +123,38 @@
    -

    Usage

    +

    Usage +

    # S3 method for class 'cov_struct'
     print(x, ...)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (cov_struct)
    a covariance structure object.

    -
    ...
    +
    ... +

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    x invisibly.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/reexports.html b/v0.3.13/reference/reexports.html index 1791a1adf..6b7cf9bb8 100644 --- a/v0.3.13/reference/reexports.html +++ b/v0.3.13/reference/reexports.html @@ -1,25 +1,41 @@ - -Objects exported from other packages — reexports • mmrm + + + + + +Objects exported from other packages — reexports • mmrm + + + + + + + + + + Skip to contents @@ -35,10 +51,12 @@ + + + + + @@ -109,15 +135,18 @@

    These objects are imported from other packages. Follow the links below to see their documentation.

    -
    generics
    +
    +
    generics

    augment, glance, tidy

    -
    + + - + +
    -
    - + + - + + diff --git a/v0.3.13/reference/refit_multiple_optimizers.html b/v0.3.13/reference/refit_multiple_optimizers.html index 76c196996..48aefc0bf 100644 --- a/v0.3.13/reference/refit_multiple_optimizers.html +++ b/v0.3.13/reference/refit_multiple_optimizers.html @@ -1,11 +1,27 @@ - -Refitting MMRM with Multiple Optimizers — refit_multiple_optimizers • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,37 +123,47 @@
    -

    Usage

    +

    Usage +

    refit_multiple_optimizers(fit, ..., control = mmrm_control(...))
    -

    Arguments

    +

    Arguments +

    -
    fit
    +
    +
    fit +

    (mmrm_fit)
    original model fit from fit_single_optimizer().

    -
    ...
    +
    ... +

    Additional arguments passed to mmrm_control().

    -
    control
    +
    control +

    (mmrm_control)
    object.

    -
    + +
    -

    Value

    +

    Value +

    The best (in terms of log likelihood) fit which converged.

    -

    Note

    +

    Note +

    For Windows, no parallel computations are currently implemented.

    -

    Examples

    +

    Examples +

    fit <- fit_single_optimizer(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data,
    @@ -138,7 +174,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/v0.3.13/reference/register_on_load.html b/v0.3.13/reference/register_on_load.html index a2b6714ab..61a8357f5 100644 --- a/v0.3.13/reference/register_on_load.html +++ b/v0.3.13/reference/register_on_load.html @@ -1,11 +1,27 @@ - -Helper Function for Registering Functionality With Suggests Packages — register_on_load • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    register_on_load(
       pkg,
       ver = c(NA_character_, NA_character_),
    @@ -107,39 +134,48 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    pkg
    +
    +
    pkg +

    (string)
    package name.

    -
    ver
    +
    ver +

    (character)
    of length 2 whose elements can be provided to numeric_version(), representing a minimum and maximum (inclusive) version requirement for interoperability. When NA, no version requirement is imposed. Defaults to no version requirement.

    -
    callback
    +
    callback +

    (function(...) ANY)
    a callback to execute upon package load. Note that no arguments are passed to this function. Any necessary data must be provided upon construction.

    -
    message
    +
    message +

    (NULL or string)
    an optional message to print after the callback is executed upon successful registration.

    -
    + +
    -

    Value

    +

    Value +

    A logical (invisibly) indicating whether registration was successful. If not, a onLoad hook was set for the next time the package is loaded.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/std_start.html b/v0.3.13/reference/std_start.html index b02c31c8a..3188a478a 100644 --- a/v0.3.13/reference/std_start.html +++ b/v0.3.13/reference/std_start.html @@ -1,11 +1,27 @@ - -Standard Starting Value — std_start • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,36 +123,46 @@
    -

    Usage

    +

    Usage +

    std_start(cov_type, n_visits, n_groups, ...)
    -

    Arguments

    +

    Arguments +

    -
    cov_type
    +
    +
    cov_type +

    (string)
    name of the covariance structure.

    -
    n_visits
    +
    n_visits +

    (int)
    number of visits.

    -
    n_groups
    +
    n_groups +

    (int)
    number of groups.

    -
    ...
    +
    ... +

    not used.

    -
    + +
    -

    Value

    +

    Value +

    A numeric vector of starting values.

    -

    Details

    +

    Details +

    std_start will try to provide variance parameter from identity matrix. However, for ar1 and ar1h the corresponding values are not ideal because the \(\rho\) is usually a positive number thus using 0 as starting value can lead to @@ -134,7 +170,8 @@

    Details

    + + - + + - + + diff --git a/v0.3.13/reference/tmb_cov_type.html b/v0.3.13/reference/tmb_cov_type.html index 4eb3e48ba..6c42890ef 100644 --- a/v0.3.13/reference/tmb_cov_type.html +++ b/v0.3.13/reference/tmb_cov_type.html @@ -1,11 +1,27 @@ - -Produce A Covariance Identifier Passing to TMB — tmb_cov_type • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    tmb_cov_type(cov)
    -

    Arguments

    +

    Arguments +

    -
    cov
    +
    +
    cov +

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    A string used for method dispatch when passed to TMB.

    + +
    -
    - + + - + + diff --git a/v0.3.13/reference/validate_cov_struct.html b/v0.3.13/reference/validate_cov_struct.html index 26f4d2016..f534111f5 100644 --- a/v0.3.13/reference/validate_cov_struct.html +++ b/v0.3.13/reference/validate_cov_struct.html @@ -1,11 +1,27 @@ - -Validate Covariance Structure Data — validate_cov_struct • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    validate_cov_struct(x)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    x if successful, or an error is thrown otherwise.

    + +
    -
    - + + - + + diff --git a/v0.3.14/404.html b/v0.3.14/404.html index 652fbf269..fd43cafe8 100644 --- a/v0.3.14/404.html +++ b/v0.3.14/404.html @@ -1,5 +1,4 @@ - - + @@ -70,11 +69,10 @@ +v0.2.2 + + + + + + @@ -95,46 +119,66 @@

    Thank you for your interest in contributing to this repo! Your contribution is highly valued. Please go through this document for guidance on how to contribute.

    -

    Programming conventions

    +

    Programming conventions +

    Please follow the programming conventions to ensure a consistent programming style across the package.

    Generally we follow the tidyverse style guide. Some specific conventions that deviate from this are explained below.

    -

    Functions

    -
    1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
    2. +

      Functions +

      +
        +
      1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
      2. Functions starting with h_ are helper functions and they should not be exported.
      3. Functions should be well documented using roxygen2 (even when they are not exported).
      4. Functions must be unit tested (even when they are not exported).
      5. -
    + +
    -

    Imports

    +

    Imports +

    In package mmrm, we follow the following convention in package imports.

    -
    1. When only a few functions from another package are needed: -
      1. In DESCRIPTION, add that package into Imports.
      2. +
          +
        1. When only a few functions from another package are needed: +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we add a importFrom with a single function from the package. -
            1. The function imported can be any random function within the package.
            2. -
          3. +
              +
            1. The function imported can be any random function within the package.
            2. +
            +
          4. Always use package::function style wherever you need to use the function.
          5. Example: stats.
          6. -
        2. +
        +
      3. When many functions from another package are needed: -
        1. In DESCRIPTION, add that package into Imports.
        2. +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we use a import to import every function.
          3. Use the functions directly without prefix.
          4. Example: checkmate.
          5. -
          -
    + + + +
    -

    Comments

    -
    • Comments should always follow sentence style.
    • +

      Comments +

      +
        +
      • Comments should always follow sentence style.
      • Comments should be as minimal as possible: Generally the code and variable names should be clear enough to not need any comments. Only use them when needed and explain the “Why” and not the “What”.
      • -
    + +
    -

    Documentation

    -
    • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

    • +

      Documentation +

      +
        +
      • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

      • Exported objects must have a lifecycle badge to clarify the maturity.

        -
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • -
      • +
          +
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • +
        +
      • Use Title Style for the title of the documentation.

      • Always include a @description part with at least one sentence describing the object.

      • @@ -146,38 +190,55 @@

        Documentationwebsite.

      • In vignettes, you cannot directly reference help pages but only pkgdown web pages. Note that this includes only exported objects. To make it look similar to the help page references, please here also use function() style.

      • mmrm_review_methods.Rmd is a large vignette and we precompute this vignette to make the GitHub actions faster. Run the script vignettes/precompile.R to regenerate the precomputed vignette and subsequently update it in GitHub. Before every release we need to run this again. Please note you need to install the package and then compile the vignette because efficiency is better after installation to provide a fair comparison.

      • -
    + +
    -

    Github conventions

    +

    Github conventions +

    When using GitHub to collaborate, the following conventions are needed:

    -
    1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. -
      • If you are going to work on this issue, please assign yourself.
      • -
    2. +
        +
      1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. +
          +
        • If you are going to work on this issue, please assign yourself.
        • +
        +
      2. Please create a branch in the mmrm repository, instead of creating forks, unless you are not yet a team member. -
        • Branches should be associated with a GitHub issue and linked to an issue id.
        • +
            +
          • Branches should be associated with a GitHub issue and linked to an issue id.
          • The name of a branch should be of the form: <issue_id>_<short_discription>.
          • -
          +
        +
      3. Add changes to the branch and push it to GitHub. -
        • Please use clear commit messages.
        • +
            +
          • Please use clear commit messages.
          • Please keep your changes focused on the issue. If there are independent changes, please separate it into another PR linking to another issue.
          • -
          +
        +
      4. Please create a Pull Request when you think your code changes are ready: -
        • Functions are well documented.
        • +
            +
          • Functions are well documented.
          • Functions have corresponding unit tests.
          • Changes pass all the GitHub action checks.
          • The checklist in the corresponding issue is completed.
          • -
          +
        +
      5. Address all the comments you receive. -
        • at least one approval is needed to merge.
        • -
      6. -
    +
      +
    • at least one approval is needed to merge.
    • +
    + + +
    -

    Contribution tips

    +

    Contribution tips +

    -

    Development environment Set-up

    +

    Development environment Set-up +

    The development this mmrm package is based on the latest R version and C++ compilers. The package dependencies are the most recent versions from CRAN. We recommend that your working environment is set up in the same way. Additionally, there are some tools we recommend you to install:

    -
    1. +
        +
      1. RTools if you work on a Windows operating system. Alternatively you can use docker to separate the operating system and the development system.
      2. GitKraken is a very useful user interface for git including visualization of git commit graphs, file history, etc.
      3. @@ -185,43 +246,82 @@

        Development environment Set-uplintr will allow you to perform static code analysis.
      4. pre-commit is a Python module that allows you to identify issues before you commit locally.
      5. -

    + +
    -

    Issue labels

    +

    Issue labels +

    The issues are categorized with several labels:

    - +
    Label name
    ++++ + + - + + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + -
    Label name Description
    SPx
    SPx SP (story points) indicate complexity, and the larger the subsequent number, the more time consuming the issue is expected to be
    priority
    priority Issues with this label should be completed with higher priority
    good first issue
    good first issue Good choices for new team members
    blocked
    blocked Blocked by other issues
    bug
    bug Something isn’t working
    devops
    devops Development and Operation
    discussion
    discussion Discussion needed
    documentation
    documentation Improvement of documentation is needed
    duplicate
    duplicate The issue already exists
    enhancement
    enhancement New feature or request
    help wanted
    help wanted Extra attention is needed
    invalid
    invalid This doesn’t seem right
    question
    question Further information needed

    Please choose an issue based on your interest, issue complexity, and priority.

    + + + +

    Please choose an issue based on your interest, issue complexity, and priority.

    -

    Add new unit tests

    +

    Add new unit tests +

    To add a new unit test, you need to first identify the test scope. Does the test fit in the scope of existing tests? If so, please modify the existing test files under tests/testthat/ folder or src/ folder, depending on whether the code to be tested is R or C++. Otherwise please create a new test file, with a name prefix of “test-”.

    In each test case, use the following structure:

    @@ -234,19 +334,25 @@ 

    Add new unit tests -

    Add integration tests

    +

    Add integration tests +

    Integration tests compare the results of SAS and R and assures the quality of our code. To add an integration test, you need to do the following:

    -
    1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
    2. +
        +
      1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
      2. Save the results in .txt format in the design/SAS/ folder.
      3. Decide the key outputs that are needed for comparison.
      4. Add a unit test verifying that the R implementation of the same model has the same results (conversion may be needed).
      5. -
    + +
    -

    Get started with C++

    +

    Get started with C++ +

    If you have no experience with C++, it is totally fine: TMB has provided us with many high-level functionalities that is very similar to R. Here we only list the most important things that you need to go through before you begin C++ programming.

    -
    1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
    2. +
        +
      1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
      2. Types. C++ is a strong type programming language and all objects need to be declared with type. Sometimes you can combine the declaration and definition. -
        1. +
            +
          1. int i = 1; This works, as we declare i as int and define it to be 1.
          2. i = 1; This fails, because i is not declared yet.
          3. @@ -254,53 +360,70 @@

            Get started with C++
          4. in R, if (TRUE) { a = '123' }; print(a) is legal.
          5. +
              +
            1. in R, if (TRUE) { a = '123' }; print(a) is legal.
            2. in C++, if (1) {string a = '123'}; std::stdout << a << std::endl; is illegal, because object a is terminated already.
            3. in C++, string a; if (1) {a = '123'}; std::stdout << a << std::endl; is legal, a is declared prior to if statement.
            4. -
            +

          +
        2. Polymorphism. Unlike in R, where function arguments have no explicitly defined types, in C++ the type of each argument of a function must be pre-specified. -
          1. +
              +
            1. Template is a special function that works with generic argument type. We could imagine a single function that could work on arguments of arbitrary type, and template functions make this possible through separation of function logic from the argument declaration. In this way we can use template functions and avoid the need to replicate the whole code for each type.
            2. -
          2. -

          With these points in mind, you are about ready to go.

          +
        +
      3. +
      +

      With these points in mind, you are about ready to go.

    -

    Get started with TMB

    +

    Get started with TMB +

    In mmrm we are not including any latent variables and so the Laplace approximation aspect of TMB is not used. We only use the automatic differentiation part of TMB. For detailed documentation of TMB, visit the TMB reference.

    One important feature of TMB are the R style matrix/array calculations. This is important because we mainly use this part to conduct our calculations. See matrix_arrays.cpp for examples.

    -

    Add a new covariance structure

    +

    Add a new covariance structure +

    To add a new covariance structure, you need to do the following:

    -
    1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
    2. +
        +
      1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
      2. Implement the covariance structure on the C++ side and the corresponding R interface.
      3. Add unit tests to make sure the new covariance structure is working as expected.
      4. Add integration tests under design/SAS/ folder to make sure SAS and R produce similar results (within tolerance).
      5. -
    + +
    -

    Add additional data

    +

    Add additional data +

    To add additional data to mmrm, please follow the next steps:

    -
    1. Make sure the data is needed.
    2. +
        +
      1. Make sure the data is needed.
      2. Document the data in R/data.R.
      3. Use save to create an rda data only containing this dataset. Here the function usethis::use_data can also be helpful.
      4. -
    + +
    -

    Communications within team

    +

    Communications within team +

    There are several communication channels, please use appropriate ones.

    -

    GitHub

    +

    GitHub +

    GitHub issues and pull requests are where implementations are discussed and reviewed. Feature requests, bugs, enhancements, technical implementations can be discussed here. When you have ideas that needs to be documented, it is better to have them in GitHub.

    -

    Slack

    +

    Slack +

    Slack is a messaging tool and we have the mmrm channel under the rinpharma space. You can put anything in the slack channel, e.g., you have completed a issue and are waiting for review, or you have some questions and don’t want to wait until the next stand-up meeting.

    To join the slack channel, please make sure you have a slack account, and send the email address to any team member.

    -

    Stand-up meetings

    +

    Stand-up meetings +

    We have stand-up meetings currently three times a week. The purpose of stand-up meetings is for team members to discuss the current work progress and raise any issue/questions for team discussion if needed.

    You don’t need to join all three meetings.

    @@ -308,7 +431,8 @@

    Stand-up meetings

    + + - + + - + + diff --git a/v0.3.14/PULL_REQUEST_TEMPLATE.html b/v0.3.14/PULL_REQUEST_TEMPLATE.html index 516f71f6f..5c43fd664 100644 --- a/v0.3.14/PULL_REQUEST_TEMPLATE.html +++ b/v0.3.14/PULL_REQUEST_TEMPLATE.html @@ -1,11 +1,25 @@ - -Description • mmrm + + + + + + + + + Skip to contents @@ -21,10 +35,12 @@ + + + + + @@ -96,7 +120,8 @@ - + +
    -
    - + + - + + diff --git a/v0.3.14/articles/algorithm.html b/v0.3.14/articles/algorithm.html index 751e556c7..3af19655c 100644 --- a/v0.3.14/articles/algorithm.html +++ b/v0.3.14/articles/algorithm.html @@ -1,5 +1,4 @@ - - + @@ -69,11 +68,10 @@ +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + + + + + @@ -94,60 +118,86 @@

    Introduction

    -
    Package Introduction
    +
    +
    Package Introduction
    -
    Mixed Models for Repeated Measures
    + +
    Mixed Models for Repeated Measures
    -
    Comparison with other software
    + +
    Comparison with other software
    -
    + +
    +

    Covariance Structures

    -
    Covariance Structures
    +
    +
    Covariance Structures
    -
    + + + + + + + + + + + + + + + + +
    -
    - + + - + + diff --git a/v0.3.14/articles/introduction.html b/v0.3.14/articles/introduction.html index d67ef702c..494fce668 100644 --- a/v0.3.14/articles/introduction.html +++ b/v0.3.14/articles/introduction.html @@ -1,5 +1,4 @@ - - + @@ -69,11 +68,10 @@ +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + + + + + @@ -93,7 +117,8 @@

    Authors

    -
    • +
        +
      • Daniel Sabanes Bove. Author, maintainer.

      • @@ -173,7 +198,8 @@

        Authors

        inferential.biostatistics GmbH. Copyright holder, funder.

        -
    + +

    Citation

    @@ -193,7 +219,8 @@

    Citation

    + +
    -
    - + + - + + diff --git a/v0.3.14/index.html b/v0.3.14/index.html index ff0d5693a..799f8dbd9 100644 --- a/v0.3.14/index.html +++ b/v0.3.14/index.html @@ -1,5 +1,4 @@ - - + @@ -72,11 +71,10 @@ +v0.2.2 + + + + + + @@ -92,18 +116,27 @@
    -

    mmrm 0.3.14

    CRAN release: 2024-09-27

    +

    mmrm 0.3.14 +

    +

    CRAN release: 2024-09-27

    -

    Bug Fixes

    -
    • In version 0.3.13, when the tape optimizer from TMB was switched on, a warning would be given by fit_mmrm(), instructing users to turn off the tape optimizer. However, this is not necessary for reproducible results. Instead, it is now checked whether the deterministic hash for the TMB tape optimizer is used, and a warning is issued otherwise.
    • +

      Bug Fixes +

      +
        +
      • In version 0.3.13, when the tape optimizer from TMB was switched on, a warning would be given by fit_mmrm(), instructing users to turn off the tape optimizer. However, this is not necessary for reproducible results. Instead, it is now checked whether the deterministic hash for the TMB tape optimizer is used, and a warning is issued otherwise.
      • In version 0.3.13, the above described warning by fit_mmrm() was not visible to the user when calling mmrm() because it was caught internally, causing the first fit in each session to fail for the first tried optimizer and falling back to the other optimizers. The warning is now issued directly by mmrm(). This change ensures that the first model fit is consistent regarding the chosen optimizer (and thus numeric results) with subsequent model fits, avoiding discrepancies observed in version 0.3.13.
      • -
    + +
    -

    mmrm 0.3.13

    CRAN release: 2024-09-23

    +

    mmrm 0.3.13 +

    +

    CRAN release: 2024-09-23

    -

    Bug Fixes

    -
    • When running with TMB package versions below 1.9.15, MMRM fit results are not completely reproducible. While this may not be relevant for most applications, because the numerical differences are very small, we now issue a warning to the user if this is the case. We advise users to upgrade their TMB package versions to 1.9.15 or higher to ensure reproducibility.
    • +

      Bug Fixes +

      +
        +
      • When running with TMB package versions below 1.9.15, MMRM fit results are not completely reproducible. While this may not be relevant for most applications, because the numerical differences are very small, we now issue a warning to the user if this is the case. We advise users to upgrade their TMB package versions to 1.9.15 or higher to ensure reproducibility.
      • Previously, mmrm ignored contrasts defined for covariates in the input data set. This is fixed now.
      • Previously, predict always required the response to be valid, even for unconditional predictions. This is fixed now and unconditional prediction does not require the response to be valid or present any longer.
      • @@ -111,77 +144,119 @@

        Bug Fixesemmeans::emmeans returned NA for spatial covariance structures. This is fixed now.

      • Previously car::Anova gave incorrect results if an interaction term is included and the covariate of interest was not the first categorical variable. This is fixed now.
      • Previously car::Anova failed if the model did not contain an intercept. This is fixed now.
      • -
    + +
    -

    Miscellaneous

    -
    • Upon fitting an MMRM, it is checked whether a not reproducible optimization feature of TMB is turned on. If so, a warning is issued to the user once per session.
    • +

      Miscellaneous +

      +
        +
      • Upon fitting an MMRM, it is checked whether a not reproducible optimization feature of TMB is turned on. If so, a warning is issued to the user once per session.
      • mmrm now checks on the positive definiteness of the covariance matrix theta_vcov. If it is not positive definite, non-convergence is messaged appropriately.
      • model.matrix has been updated to ensure that the NA values are dropped. Additionally, an argument use_response is added to decide whether records with NA values in the response should be discarded.
      • predict has been updated to allow duplicated subject IDs for unconditional prediction.
      • -
    + +
    -

    mmrm 0.3.12

    CRAN release: 2024-06-26

    +

    mmrm 0.3.12 +

    +

    CRAN release: 2024-06-26

    -

    New Features

    -
    • Add parameter conditional for predict method to control whether the prediction is conditional on the observation or not.
    • -
    +

    New Features +

    +
      +
    • Add parameter conditional for predict method to control whether the prediction is conditional on the observation or not.
    • +
    +
    -

    Bug Fixes

    -
    • Previously if the left hand side of a model formula is an expression, predict and simulate will fail. This is fixed now.
    • -
    +

    Bug Fixes +

    +
      +
    • Previously if the left hand side of a model formula is an expression, predict and simulate will fail. This is fixed now.
    • +
    +
    -

    mmrm 0.3.11

    CRAN release: 2024-03-05

    +

    mmrm 0.3.11 +

    +

    CRAN release: 2024-03-05

    -

    Bug Fixes

    -
    • Previously if a secondary optimizer fails mmrm will fail. This is fixed now.
    • +

      Bug Fixes +

      +
        +
      • Previously if a secondary optimizer fails mmrm will fail. This is fixed now.
      • Previously character covariate variables will make Anova fail. This is fixed now.
      • -
    + +
    -

    mmrm 0.3.10

    CRAN release: 2024-01-26

    +

    mmrm 0.3.10 +

    +

    CRAN release: 2024-01-26

    -

    Miscellaneous

    -
    • Fix internal test skipping functions for MacOS R.
    • -
    +

    Miscellaneous +

    +
      +
    • Fix internal test skipping functions for MacOS R.
    • +
    +
    -

    mmrm 0.3.9

    CRAN release: 2024-01-25

    +

    mmrm 0.3.9 +

    +

    CRAN release: 2024-01-25

    -

    Miscellaneous

    -
    • Fix internal test skipping functions for R versions older than 4.3.
    • -
    +

    Miscellaneous +

    +
      +
    • Fix internal test skipping functions for R versions older than 4.3.
    • +
    +
    -

    mmrm 0.3.8

    CRAN release: 2024-01-24

    +

    mmrm 0.3.8 +

    +

    CRAN release: 2024-01-24

    -

    New Features

    -
    • +

      New Features +

      +
        +
      • Anova is implemented for mmrm models and available upon loading the car package. It supports type II and III hypothesis testing.
      • The argument start for mmrm_control() is updated to allow better choices of initial values.
      • confint on mmrm models will give t-based confidence intervals now, instead of the normal approximation.
      • -
    + +
    -

    Bug Fixes

    -
    • Previously if the first optimizer failed, the best successful fit among the remaining optimizers was not returned correctly. This is fixed now.
    • -
    +

    Bug Fixes +

    +
      +
    • Previously if the first optimizer failed, the best successful fit among the remaining optimizers was not returned correctly. This is fixed now.
    • +
    +
    -

    Miscellaneous

    -
    • In documentation of mmrm_control(), the allowed vcov definition is corrected to “Empirical-Jackknife” (CR3), and “Empirical-Bias-Reduced” (CR2).
    • +

      Miscellaneous +

      +
        +
      • In documentation of mmrm_control(), the allowed vcov definition is corrected to “Empirical-Jackknife” (CR3), and “Empirical-Bias-Reduced” (CR2).
      • Fixed a compiler warning related to missing format specification.
      • If an empty contrast matrix is provided to df_md, it will return statistics with NA values.
      • -
    + +
    -

    mmrm 0.3.7

    CRAN release: 2023-12-08

    +

    mmrm 0.3.7 +

    +

    CRAN release: 2023-12-08

    -

    New Features

    -
    • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
    • +

      New Features +

      +
        +
      • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
      • Add empirical, empirical Jackknife and empirical bias-reduced adjusted coefficients covariance estimates, which can be specified via the new vcov argument of mmrm().
      • Add residual and between-within degrees of freedom methods.
      • Add Kenward-Roger support for spatial covariance structures.
      • @@ -192,61 +267,87 @@

        New FeaturesAdd tidy(), glance() and augment() methods to tidy the fit results into summary tables.
      • Add tidymodels framework support via a parsnip interface.
      • Add argument covariance to mmrm() to allow for easier programmatic access to specifying the model’s covariance structure and to expose covariance customization through the tidymodels interface.
      • -

    + +
    -

    Bug Fixes

    -
    • Previously mmrm() follows the global option na.action and if it is set other than "na.omit" an assertion would fail. This is now fixed and hence NA values are always removed prior to model fitting, independent of the global na.action option.
    • +

      Bug Fixes +

      +
        +
      • Previously mmrm() follows the global option na.action and if it is set other than "na.omit" an assertion would fail. This is now fixed and hence NA values are always removed prior to model fitting, independent of the global na.action option.
      • Previously a model.frame() call on an mmrm object with transformed terms, or new data, e.g. model.frame(mmrm(Y ~ log(X) + ar1(VISIT|ID), data = new_data), would fail. This is now fixed.
      • Previously mmrm() always required a data argument. Now fitting mmrm can also use environment variables instead of requiring data argument. (Note that fit_mmrm is not affected.)
      • Previously emmeans() failed when using transformed terms or not including the visit variable in the model formula. This is now fixed.
      • Previously mmrm() might provide non-finite values in the Jacobian calculations, leading to errors in the Satterthwaite degrees of freedom calculations. This will raise an error now and thus alert the user that the model fit was not successful.
      • -
    + +
    -

    Miscellaneous

    -
    • Use automatic differentiation to calculate Satterthwaite adjusted degrees of freedom, resulting in 10-fold speed-up of the Satterthwaite calculations after the initial model fit.
    • +

      Miscellaneous +

      +
        +
      • Use automatic differentiation to calculate Satterthwaite adjusted degrees of freedom, resulting in 10-fold speed-up of the Satterthwaite calculations after the initial model fit.
      • Add an interactive confirmation step if the number of visit levels is too large for non-spatial covariance structures. Use options(mmrm.max_visits = ) to specify the maximum number of visits allowed in non-interactive mode.
      • Removed free_cores() in favor of parallelly::availableCores(omit = 1).
      • The model.frame() method has been updated: The full argument is deprecated and the include argument can be used instead; by default all relevant variables are returned. Furthermore, it returns a data.frame the size of the number of observations utilized in the model for all combinations of the include argument when na.action= "na.omit".
      • Overall, seven vignettes have been added to the package. All vignettes have a slightly different look now to reduce the size of the overall R package on CRAN.
      • The used optimizer is now available via component(., "optimizer") instead of previously attr(., "optimizer").
      • -
    + +
    -

    mmrm 0.2.2

    CRAN release: 2022-12-20

    +

    mmrm 0.2.2 +

    +

    CRAN release: 2022-12-20

    -

    New Features

    -
    • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
    • +

      New Features +

      +
        +
      • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
      • Update the mmrm arguments to allow users more fine-grained control, e.g. mmrm(..., start = start, optimizer = c("BFGS", "nlminb")) to set the starting values for the variance estimates and to choose the available optimizers. These arguments will be passed to the new function mmrm_control.
      • Add new argument drop_visit_levels to allow users to keep all levels in visits, even when they are not observed in the data. Dropping unobserved levels was done silently previously, and now a message will be given. See ?mmrm_control for more details.
      • -
    + +
    -

    Bug Fixes

    -
    • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
    • +

      Bug Fixes +

      +
        +
      • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
      • Previously in mmrm calls, the weights object in the environment where the formula is defined was replaced by the weights used internally. Now this behavior is removed and your variable weights e.g. in the global environment will no longer be replaced.
      • -
    + +
    -

    Miscellaneous

    -
    • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
    • +

      Miscellaneous +

      +
        +
      • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
      • Deprecated optimizer = "automatic" in favor of not specifying the optimizer. By default, all remaining optimizers will be tried if the first optimizer fails to reach convergence.
      • -
    + +
    -

    mmrm 0.1.5

    CRAN release: 2022-10-18

    -
    • First CRAN version of the package.
    • +

      mmrm 0.1.5 +

      +

      CRAN release: 2022-10-18

      +
        +
      • First CRAN version of the package.
      • The package fits mixed models for repeated measures (MMRM) based on the marginal linear model without random effects.
      • The motivation for this package is to have a fast, reliable (in terms of convergence behavior) and feature complete implementation of MMRM in R.
      • -
      -

      New Features

      -
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • +
      +
      +

      New Features +

      +
        +
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • Fast C++ implementation of Maximum Likelihood (ML) and Restricted Maximum Likelihood (REML) estimation.
      • Currently Satterthwaite adjusted degrees of freedom calculation is supported.
      • Interface to the emmeans package for computing estimated marginal means (also called least-square means) for the coefficients.
      • Multiple optimizers are run to reach convergence in as many cases as possible.
      • Flexible formula based model specification and support for standard S3 methods such as summary, logLik, etc.
      • -
      +
    +
    + + - + + - + + diff --git a/v0.3.14/reference/Anova.mmrm.html b/v0.3.14/reference/Anova.mmrm.html index 881aa7f8f..4824ed6ae 100644 --- a/v0.3.14/reference/Anova.mmrm.html +++ b/v0.3.14/reference/Anova.mmrm.html @@ -1,11 +1,27 @@ - -Conduct type II/III hypothesis testing on the MMRM fit results. — Anova.mmrm • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    Anova.mmrm(
       mod,
       type = c("II", "III", "2", "3"),
    @@ -107,34 +134,43 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    mod
    +
    +
    mod +

    (mmrm)
    the fitted MMRM.

    -
    type
    +
    type +

    (string) type of test, "II", "III", '2', or '3'.

    -
    tol
    +
    tol +

    (numeric) threshold blow which values are treated as 0.

    -
    ...
    +
    ... +

    not used.

    -
    + +
    -

    Details

    +

    Details +

    Anova will return anova object with one row per variable and columns Num Df(numerator degrees of freedom), Denom Df(denominator degrees of freedom), F Statistic and Pr(>=F).

    + + - + + - + + diff --git a/v0.3.14/reference/COV_TYPES.html b/v0.3.14/reference/COV_TYPES.html index 4e37e8de6..11c555ca5 100644 --- a/v0.3.14/reference/COV_TYPES.html +++ b/v0.3.14/reference/COV_TYPES.html @@ -1,11 +1,27 @@ - -Covariance Type Database — COV_TYPES • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,14 +123,17 @@
    -

    Usage

    +

    Usage +

    COV_TYPES
    -

    Format

    +

    Format +

    A data frame with 5 variables and one record per covariance type:

    -
    name
    +
    +
    name

    The long-form name of the covariance structure type

    abbr
    @@ -123,10 +152,12 @@

    Format<

    A logical value indicating whether the covariance structure is spatial.

    -

    + + + +
    -
    - + + - + + diff --git a/v0.3.14/reference/as.cov_struct.html b/v0.3.14/reference/as.cov_struct.html index d73dc94cc..fba8c81a6 100644 --- a/v0.3.14/reference/as.cov_struct.html +++ b/v0.3.14/reference/as.cov_struct.html @@ -1,11 +1,27 @@ - -Coerce into a Covariance Structure Definition — as.cov_struct • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    as.cov_struct(x, ...)
     
     # S3 method for class 'formula'
    @@ -105,58 +132,85 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    an object from which to derive a covariance structure. See object specific sections for details.

    -
    ...
    +
    ... +

    additional arguments unused.

    -
    warn_partial
    +
    warn_partial +

    (flag)
    whether to emit a warning when parts of the formula are disregarded.

    -
    + +
    -

    Value

    +

    Value +

    A cov_struct() object.

    -

    Details

    +

    Details +

    A covariance structure can be parsed from a model definition formula or call. Generally, covariance structures defined using non-standard evaluation take the following form:

    -

    type( (visit, )* visit | (group /)? subject )

    +

    +
    +
    type( (visit, )* visit | (group /)? subject )
    +

    +

    For example, formulas may include terms such as

    -

    us(time | subject)
    +

    +
    +
    us(time | subject)
     cp(time | group / subject)
    -sp_exp(coord1, coord2 | group / subject)

    +sp_exp(coord1, coord2 | group / subject)
    +

    +

    Note that only sp_exp (spatial) covariance structures may provide multiple coordinates, which identify the Euclidean distance between the time points.

    -

    Methods (by class)

    +

    Methods (by class) +

    -
    • as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be +

        +
      • +

        as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be covariance structure definitions and must follow the form:

        -

        y ~ xs + type( (visit, )* visit | (group /)? subject )

        +

        +
        +
        y ~ xs + type( (visit, )* visit | (group /)? subject )
        +

        +

        Any component on the right hand side of a formula is considered when -searching for a covariance definition.

      • -
    +searching for a covariance definition.

    + + +
    -

    See also

    +

    See also +

    Other covariance types: cov_struct(), covariance_types

    -

    Examples

    +

    Examples +

    # provide a covariance structure as a right-sided formula
     as.cov_struct(~ csh(visit | group / subject))
     #> <covariance structure>
    @@ -176,7 +230,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/v0.3.14/reference/bcva_data.html b/v0.3.14/reference/bcva_data.html index 89e70bcba..18d1afdf3 100644 --- a/v0.3.14/reference/bcva_data.html +++ b/v0.3.14/reference/bcva_data.html @@ -1,11 +1,27 @@ - -Example Data on BCVA — bcva_data • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,33 +123,41 @@
    -

    Usage

    +

    Usage +

    bcva_data
    -

    Format

    -

    A tibble with 10,000 rows and 7 variables:

    • USUBJID: subject ID.

    • +

      Format +

      +

      A tibble with 10,000 rows and 7 variables:

      +
        +
      • USUBJID: subject ID.

      • VISITN: visit number (numeric).

      • AVISIT: visit number (factor).

      • ARMCD: treatment, TRT or CTL.

      • RACE: 3-category race.

      • BCVA_BL: BCVA at baseline.

      • BCVA_CHG: Change in BCVA at study visits.

      • -
    + +
    -

    Source

    +

    Source +

    This is an artificial dataset.

    -

    Note

    +

    Note +

    Measurements of BCVA (best corrected visual acuity) is a measure of how how many letters a person can read off of an eye chart using corrective lenses or contacts. This a common endpoint in ophthalmology trials.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/cached_mmrm_results.html b/v0.3.14/reference/cached_mmrm_results.html index d35a8dd3c..9f4e6a655 100644 --- a/v0.3.14/reference/cached_mmrm_results.html +++ b/v0.3.14/reference/cached_mmrm_results.html @@ -1,11 +1,27 @@ - -Cache Data for mmrm Model Comparison — cached_mmrm_results • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    cached_mmrm_results
    -

    Format

    -

    A list with following elements:

    • conv_time_fev: Convergence time on FEV data.

    • +

      Format +

      +

      A list with following elements:

      +
        +
      • conv_time_fev: Convergence time on FEV data.

      • conv_time_bcva: Convergence time on BCVA data.

      • rel_diff_ests_tbl_fev: Relative difference in estimates on FEV data.

      • rel_diff_ests_tbl_bcva: Relative difference in estimates on BCVA data.

      • conv_rate: Convergence rate on data with different missing levels.

      • df_missingness: Summary of missingness on simulated data.

      • -
    + +
    -

    Source

    +

    Source +

    This is created based on simulations on FEV data and BCVA data.

    -

    Note

    +

    Note +

    The cached data for comparison is used for the vignettes generation. Please make sure that this data is refreshed before each package release by running the script data-raw/mmrm_review.R. @@ -124,7 +157,8 @@

    Note

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/car_add_mmrm.html b/v0.3.14/reference/car_add_mmrm.html index 857695d39..e5bb952de 100644 --- a/v0.3.14/reference/car_add_mmrm.html +++ b/v0.3.14/reference/car_add_mmrm.html @@ -1,11 +1,27 @@ - -Register mmrm For Use With car::Anova — car_add_mmrm • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + +
    @@ -97,25 +124,32 @@
    -

    Usage

    +

    Usage +

    car_add_mmrm(quietly = FALSE)
    -

    Arguments

    +

    Arguments +

    -
    quietly
    +
    +
    quietly +

    logical: should progress and error messages be suppressed?

    -
    + +
    -

    Value

    +

    Value +

    A logical value indicating whether registration was successful.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/check_package_version.html b/v0.3.14/reference/check_package_version.html index b3415e2ff..542f28625 100644 --- a/v0.3.14/reference/check_package_version.html +++ b/v0.3.14/reference/check_package_version.html @@ -1,11 +1,27 @@ - -Check Suggested Dependency Against Version Requirements — check_package_version • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,33 +123,41 @@
    -

    Usage

    +

    Usage +

    check_package_version(pkg, ver = c(NA_character_, NA_character_))
    -

    Arguments

    +

    Arguments +

    -
    pkg
    +
    +
    pkg +

    (string)
    package name.

    -
    ver
    +
    ver +

    (character)
    of length 2 whose elements can be provided to numeric_version(), representing a minimum and maximum (inclusive) version requirement for interoperability. When NA, no version requirement is imposed. Defaults to no version requirement.

    -
    + +
    -

    Value

    +

    Value +

    A logical (invisibly) indicating whether the loaded package meets the version requirements. A warning is emitted otherwise.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/component.html b/v0.3.14/reference/component.html index 597692fa4..5bb730e66 100644 --- a/v0.3.14/reference/component.html +++ b/v0.3.14/reference/component.html @@ -1,11 +1,27 @@ - -Component Access for mmrm_tmb Objects — component • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    component(
       object,
       name = c("cov_type", "subject_var", "n_theta", "n_subjects", "n_timepoints", "n_obs",
    @@ -109,24 +136,33 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm_tmb)
    the fitted MMRM.

    -
    name
    +
    name +

    (character)
    the component(s) to be retrieved.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding component of the object, see details.

    -

    Details

    -

    Available component() names are as follows:

    • call: low-level function call which generated the model.

    • +

      Details +

      +

      Available component() names are as follows:

      +
    + +
    -

    See also

    +

    See also +

    In the lme4 package there is a similar function getME().

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -3120,7 +3159,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/v0.3.14/reference/cov_struct.html b/v0.3.14/reference/cov_struct.html index e5941925d..10d162ea0 100644 --- a/v0.3.14/reference/cov_struct.html +++ b/v0.3.14/reference/cov_struct.html @@ -1,11 +1,27 @@ - -Define a Covariance Structure — cov_struct • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    cov_struct(
       type = cov_types(),
       visits,
    @@ -108,49 +135,60 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    type
    +
    +
    type +

    (string)
    the name of the covariance structure type to use. For available options, see cov_types(). If a type abbreviation is used that implies heterogeneity (e.g. cph) and no value is provided to heterogeneous, then the heterogeneity is derived from the type name.

    -
    visits
    +
    visits +

    (character)
    a vector of variable names to use for the longitudinal terms of the covariance structure. Multiple terms are only permitted for the "spatial" covariance type.

    -
    subject
    +
    subject +

    (string)
    the name of the variable that encodes a subject identifier.

    -
    group
    +
    group +

    (string)
    optionally, the name of the variable that encodes a grouping variable for subjects.

    -
    heterogeneous
    +
    heterogeneous +

    (flag)

    -
    + +
    -

    Value

    +

    Value +

    A cov_struct object.

    -

    See also

    +

    See also +

    Other covariance types: as.cov_struct(), covariance_types

    -

    Examples

    +

    Examples +

    cov_struct("csh", "AVISITN", "USUBJID")
     #> <covariance structure>
     #> heterogeneous compound symmetry:
    @@ -167,7 +205,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/v0.3.14/reference/cov_type_abbr.html b/v0.3.14/reference/cov_type_abbr.html index c346ea5a0..5edcfd38d 100644 --- a/v0.3.14/reference/cov_type_abbr.html +++ b/v0.3.14/reference/cov_type_abbr.html @@ -1,11 +1,27 @@ - -Retrieve Associated Abbreviated Covariance Structure Type Name — cov_type_abbr • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,26 +123,33 @@
    -

    Usage

    +

    Usage +

    cov_type_abbr(type)
    -

    Arguments

    +

    Arguments +

    -
    type
    +
    +
    type +

    (string)
    either a full name or abbreviate covariance structure type name to collapse into an abbreviated type.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding abbreviated covariance type name.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/cov_type_name.html b/v0.3.14/reference/cov_type_name.html index e7bd3c282..262ee6490 100644 --- a/v0.3.14/reference/cov_type_name.html +++ b/v0.3.14/reference/cov_type_name.html @@ -1,11 +1,27 @@ - -Retrieve Associated Full Covariance Structure Type Name — cov_type_name • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,26 +123,33 @@
    -

    Usage

    +

    Usage +

    cov_type_name(type)
    -

    Arguments

    +

    Arguments +

    -
    type
    +
    +
    type +

    (string)
    either a full name or abbreviate covariance structure type name to convert to a long-form type.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding abbreviated covariance type name.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/covariance_types.html b/v0.3.14/reference/covariance_types.html index 331bf72db..075f62d68 100644 --- a/v0.3.14/reference/covariance_types.html +++ b/v0.3.14/reference/covariance_types.html @@ -1,11 +1,27 @@ - -Covariance Types — covariance_types • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    cov_types(
       form = c("name", "abbr", "habbr"),
       filter = c("heterogeneous", "spatial")
    @@ -105,63 +132,152 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    form
    +
    +
    form +

    (character)
    covariance structure type name form. One or more of "name", "abbr" (abbreviation), or "habbr" (heterogeneous abbreviation).

    -
    filter
    +
    filter +

    (character)
    covariance structure type filter. One or more of "heterogeneous" or "spatial".

    -
    + +
    -

    Value

    +

    Value +

    A character vector of accepted covariance structure type names and abbreviations.

    -

    Note

    +

    Note +

    The ante-dependence covariance structure in this package refers to homogeneous ante-dependence, while the ante-dependence covariance structure from SAS PROC MIXED refers to heterogeneous ante-dependence and the homogeneous version is not available in SAS.

    For all non-spatial covariance structures, the time variable must -be coded as a factor.

    -

    Spatial Covariance structures:

    - - -
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)

    where \(d_{ij}\) denotes the Euclidean distance between time points +be coded as a factor.

    +
    +

    Spatial Covariance structures: +

    + + + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)
    +

    where \(d_{ij}\) denotes the Euclidean distance between time points \(i\) and \(j\).

    -

    Abbreviations for Covariance Structures

    +

    Abbreviations for Covariance Structures +

    -

    Common Covariance Structures:

    - - -
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, +

    Common Covariance Structures: +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)
    +

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, respectively, out of total \(m\) time points, \(1 \leq i, j \leq m\).

    -

    See also

    +

    See also +

    Other covariance types: as.cov_struct(), cov_struct()

    + + - + + - + + diff --git a/v0.3.14/reference/df_1d.html b/v0.3.14/reference/df_1d.html index 27518fb6a..0d71f4a60 100644 --- a/v0.3.14/reference/df_1d.html +++ b/v0.3.14/reference/df_1d.html @@ -1,15 +1,31 @@ - -Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm + + + + + +Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm + + + + + + + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,31 +129,39 @@
    -

    Usage

    +

    Usage +

    df_1d(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    contrast +

    (numeric)
    contrast vector. Note that this should not include elements for singular coefficient estimates, i.e. only refer to the actually estimated coefficients.

    -
    + +
    -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -153,7 +187,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/v0.3.14/reference/df_md.html b/v0.3.14/reference/df_md.html index dad348050..0b5754868 100644 --- a/v0.3.14/reference/df_md.html +++ b/v0.3.14/reference/df_md.html @@ -1,17 +1,33 @@ - -Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm + + + + + +Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm + + + + + + + + + + Skip to contents @@ -27,10 +43,12 @@ + + + + + @@ -106,32 +132,40 @@
    -

    Usage

    +

    Usage +

    df_md(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    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

    +

    Value +

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

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -154,7 +188,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/v0.3.14/reference/drop_elements.html b/v0.3.14/reference/drop_elements.html index 66bb3978a..b0205c431 100644 --- a/v0.3.14/reference/drop_elements.html +++ b/v0.3.14/reference/drop_elements.html @@ -1,11 +1,27 @@ - -Drop Items from an Indexible — drop_elements • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,30 +123,38 @@
    -

    Usage

    +

    Usage +

    drop_elements(x, n)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    Any object that can be consumed by seq_along() and indexed by a logical vector of the same length.

    -
    n
    +
    n +

    (integer)
    the number of terms to drop.

    -
    + +
    -

    Value

    +

    Value +

    A subset of x.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/emit_tidymodels_register_msg.html b/v0.3.14/reference/emit_tidymodels_register_msg.html index 00155ce37..6ab17cb91 100644 --- a/v0.3.14/reference/emit_tidymodels_register_msg.html +++ b/v0.3.14/reference/emit_tidymodels_register_msg.html @@ -1,11 +1,27 @@ - -Format a Message to Emit When Tidymodels is Loaded — emit_tidymodels_register_msg • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,18 +123,21 @@
    -

    Usage

    +

    Usage +

    emit_tidymodels_register_msg()
    -

    Value

    +

    Value +

    A character message to emit. Either a ansi-formatted cli output if package 'cli' is available or a plain-text message otherwise.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/emmeans_support.html b/v0.3.14/reference/emmeans_support.html index fb628000f..769723fe5 100644 --- a/v0.3.14/reference/emmeans_support.html +++ b/v0.3.14/reference/emmeans_support.html @@ -1,23 +1,39 @@ - -Support for emmeans — emmeans_support • mmrm + + + + + +Support for emmeans — emmeans_support • mmrm + + + + + + + + + + Skip to contents @@ -33,10 +49,12 @@ + + + + +
    @@ -117,7 +144,8 @@
    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -149,7 +177,8 @@ 

    Examples#> Results are averaged over the levels of: RACE, SEX

    -
    + +
    - + + - + + diff --git a/v0.3.14/reference/emp_start.html b/v0.3.14/reference/emp_start.html index 1c246b10d..ea3c6ece9 100644 --- a/v0.3.14/reference/emp_start.html +++ b/v0.3.14/reference/emp_start.html @@ -1,11 +1,27 @@ - -Empirical Starting Value — emp_start • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,58 +123,72 @@
    -

    Usage

    +

    Usage +

    emp_start(data, model_formula, visit_var, subject_var, subject_groups, ...)
    -

    Arguments

    +

    Arguments +

    -
    data
    +
    +
    data +

    (data.frame)
    data used for model fitting.

    -
    model_formula
    +
    model_formula +

    (formula)
    the formula in mmrm model without covariance structure part.

    -
    visit_var
    +
    visit_var +

    (string)
    visit variable.

    -
    subject_var
    +
    subject_var +

    (string)
    subject id variable.

    -
    subject_groups
    +
    subject_groups +

    (factor)
    subject group assignment.

    -
    ...
    +
    ... +

    not used.

    -
    + +
    -

    Value

    +

    Value +

    A numeric vector of starting values.

    -

    Details

    +

    Details +

    This emp_start only works for unstructured covariance structure. It uses linear regression to first obtain the coefficients and use the residuals to obtain the empirical variance-covariance, and it is then used to obtain the starting values.

    -

    Note

    +

    Note +

    data is used instead of full_frame because full_frame is already transformed if model contains transformations, e.g. log(FEV1) ~ exp(FEV1_BL) will drop FEV1 and FEV1_BL but add log(FEV1) and exp(FEV1_BL) in full_frame.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/fev_data.html b/v0.3.14/reference/fev_data.html index 62430f0b8..f5f375fd5 100644 --- a/v0.3.14/reference/fev_data.html +++ b/v0.3.14/reference/fev_data.html @@ -1,11 +1,27 @@ - -Example Data on FEV1 — fev_data • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,13 +123,17 @@
    -

    Usage

    +

    Usage +

    fev_data
    -

    Format

    -

    A tibble with 800 rows and 7 variables:

    • USUBJID: subject ID.

    • +

      Format +

      +

      A tibble with 800 rows and 7 variables:

      +
        +
      • USUBJID: subject ID.

      • AVISIT: visit number.

      • ARMCD: treatment, TRT or PBO.

      • RACE: 3-category race.

      • @@ -113,20 +143,24 @@

        Format<
      • WEIGHT: weighting variable.

      • VISITN: integer order of the visit.

      • VISITN2: coordinates of the visit for distance calculation.

      • -

    + +
    -

    Source

    +

    Source +

    This is an artificial dataset.

    -

    Note

    +

    Note +

    Measurements of FEV1 (forced expired volume in one second) is a measure of how quickly the lungs can be emptied. Low levels of FEV1 may indicate chronic obstructive pulmonary disease (COPD).

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/fill_names.html b/v0.3.14/reference/fill_names.html index 4d0664890..31909b716 100644 --- a/v0.3.14/reference/fill_names.html +++ b/v0.3.14/reference/fill_names.html @@ -1,11 +1,27 @@ - -Complete character Vector Names From Values — fill_names • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,26 +123,33 @@
    -

    Usage

    +

    Usage +

    fill_names(x)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (character or list)
    value whose names should be completed from element values.

    -
    + +
    -

    Value

    +

    Value +

    A named vector or list.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/fit_mmrm.html b/v0.3.14/reference/fit_mmrm.html index 2fab6fed8..d54ea6666 100644 --- a/v0.3.14/reference/fit_mmrm.html +++ b/v0.3.14/reference/fit_mmrm.html @@ -1,17 +1,33 @@ - -Low-Level Fitting Function for MMRM — fit_mmrm • mmrm + + + + + +Low-Level Fitting Function for MMRM — fit_mmrm • mmrm + + + + + + + + + + Skip to contents @@ -27,10 +43,12 @@ + + + + + @@ -106,7 +132,8 @@
    -

    Usage

    +

    Usage +

    fit_mmrm(
       formula,
       data,
    @@ -120,56 +147,69 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    formula
    +
    +
    formula +

    (formula)
    model formula with exactly one special term specifying the visits within subjects, see details.

    -
    data
    +
    data +

    (data.frame)
    input data containing the variables used in formula.

    -
    weights
    +
    weights +

    (vector)
    input vector containing the weights.

    -
    reml
    +
    reml +

    (flag)
    whether restricted maximum likelihood (REML) estimation is used, otherwise maximum likelihood (ML) is used.

    -
    covariance
    +
    covariance +

    (cov_struct)
    A covariance structure type definition, or value that can be coerced to a covariance structure using as.cov_struct(). If no value is provided, a structure is derived from the provided formula.

    -
    tmb_data
    +
    tmb_data +

    (mmrm_tmb_data)
    object.

    -
    formula_parts
    +
    formula_parts +

    (mmrm_tmb_formula_parts)
    list with formula parts from h_mmrm_tmb_formula_parts().

    -
    control
    +
    control +

    (mmrm_control)
    list of control options produced by mmrm_control().

    -
    + +
    -

    Value

    +

    Value +

    List of class mmrm_tmb, see h_mmrm_tmb_fit() for details. In addition, it contains elements call and optimizer.

    -

    Details

    +

    Details +

    The formula typically looks like:

    FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)

    which specifies response and covariates as usual, and exactly one special term @@ -179,7 +219,8 @@

    Details
    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     data <- fev_data
     system.time(result <- fit_mmrm(formula, data, rep(1, nrow(fev_data))))
    @@ -188,7 +229,8 @@ 

    Examples

    + +

    - + + - + + diff --git a/v0.3.14/reference/fit_single_optimizer.html b/v0.3.14/reference/fit_single_optimizer.html index 7c445d1b3..5b5d47663 100644 --- a/v0.3.14/reference/fit_single_optimizer.html +++ b/v0.3.14/reference/fit_single_optimizer.html @@ -1,15 +1,31 @@ - -Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm + + + + + +Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm + + + + + + + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,7 +129,8 @@
    -

    Usage

    +

    Usage +

    fit_single_optimizer(
       formula,
       data,
    @@ -118,58 +145,72 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    formula
    +
    +
    formula +

    (formula)
    the model formula, see details.

    -
    data
    +
    data +

    (data)
    the data to be used for the model.

    -
    weights
    +
    weights +

    (vector)
    an optional vector of weights to be used in the fitting process. Should be NULL or a numeric vector.

    -
    reml
    +
    reml +

    (flag)
    whether restricted maximum likelihood (REML) estimation is used, otherwise maximum likelihood (ML) is used.

    -
    covariance
    +
    covariance +

    (cov_struct)
    a covariance structure type definition as produced with cov_struct(), or value that can be coerced to a covariance structure using as.cov_struct(). If no value is provided, a structure is derived from the provided formula.

    -
    tmb_data
    +
    tmb_data +

    (mmrm_tmb_data)
    object.

    -
    formula_parts
    +
    formula_parts +

    (mmrm_tmb_formula_parts)
    object.

    -
    ...
    +
    ... +

    Additional arguments to pass to mmrm_control().

    -
    control
    +
    control +

    (mmrm_control)
    object.

    -
    + +
    -

    Value

    +

    Value +

    The mmrm_fit object, with additional attributes containing warnings, messages, optimizer used and convergence status in addition to the mmrm_tmb contents.

    -

    Details

    +

    Details +

    fit_single_optimizer will fit the mmrm model using the control provided. If there are multiple optimizers provided in control, only the first optimizer will be used. @@ -178,7 +219,8 @@

    Details
    -

    Examples

    +

    Examples +

    mod_fit <- fit_single_optimizer(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data,
    @@ -190,7 +232,8 @@ 

    Examples

    + +

    - + + - + + diff --git a/v0.3.14/reference/flat_expr.html b/v0.3.14/reference/flat_expr.html index 798ce3661..505767d25 100644 --- a/v0.3.14/reference/flat_expr.html +++ b/v0.3.14/reference/flat_expr.html @@ -1,17 +1,33 @@ - -Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm + + + + + +Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm + + + + + + + + + + Skip to contents @@ -27,10 +43,12 @@ + + + + + @@ -106,46 +132,69 @@
    -

    Usage

    +

    Usage +

    flatten_call(call)
     
     flatten_expr(expr)
    -

    Arguments

    +

    Arguments +

    -
    call, expr
    +
    +
    call, expr +

    (language)
    a language object to flatten.

    -
    + +
    -

    Value

    +

    Value +

    A list of atomic values, symbols, infix operator names and subexpressions.

    -

    Details

    +

    Details +

    Where 1 + 2 | 3 in R's syntax tree is (|, (+, 1, 2), 3), flattening it into its visual order produces (1, +, 2, |, 3), which makes for more fluent interpretation of non-standard grammar rules used in formulas.

    -

    Functions

    +

    Functions +

    -
    • flatten_call(): Flatten a call into a list of names and argument expressions.

      +
        +
      • +

        flatten_call(): Flatten a call into a list of names and argument expressions.

        The call name and all arguments are flattened into the same list, meaning a call of the form sp_exp(a, b, c | d / e) produces a list of the form (sp_exp, a, b, c, |, d, /, e).

        -

        flatten_call(quote(sp_exp(a, b, c | d / e)))

      • -
      • flatten_expr(): Flatten nested expressions

        -

        flatten_expr(quote(1 + 2 + 3 | 4))

      • -
    +

    +
    +
    flatten_call(quote(sp_exp(a, b, c | d / e)))
    +

    +
    + +
  • +

    flatten_expr(): Flatten nested expressions

    +

    +
    +
    flatten_expr(quote(1 + 2 + 3 | 4))
    +

    +
    +
  • + + + +
    -
    - + + - + + diff --git a/v0.3.14/reference/format.cov_struct.html b/v0.3.14/reference/format.cov_struct.html index 49628d912..4782e1c3f 100644 --- a/v0.3.14/reference/format.cov_struct.html +++ b/v0.3.14/reference/format.cov_struct.html @@ -1,11 +1,27 @@ - -Format Covariance Structure Object — format.cov_struct • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,30 +123,38 @@
    -

    Usage

    +

    Usage +

    # S3 method for class 'cov_struct'
     format(x, ...)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (cov_struct)
    a covariance structure object.

    -
    ...
    +
    ... +

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string for x.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/format_symbols.html b/v0.3.14/reference/format_symbols.html index 1a3a6dbb6..cd48203ef 100644 --- a/v0.3.14/reference/format_symbols.html +++ b/v0.3.14/reference/format_symbols.html @@ -1,13 +1,29 @@ - -Format Symbol Objects — format_symbols • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,25 +126,32 @@
    -

    Usage

    +

    Usage +

    format_symbols(x)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (character) A vector of variable names.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string of comma-separated variables.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/formula_rhs.html b/v0.3.14/reference/formula_rhs.html index 4967b9cda..13705a406 100644 --- a/v0.3.14/reference/formula_rhs.html +++ b/v0.3.14/reference/formula_rhs.html @@ -1,11 +1,27 @@ - -Extract Right-Hand-Side (rhs) from Formula — formula_rhs • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,28 +123,39 @@
    -

    Usage

    +

    Usage +

    formula_rhs(f)
    -

    Arguments

    +

    Arguments +

    -
    f
    +
    +
    f +

    (formula)
    a formula.

    -
    + +
    -

    Value

    +

    Value +

    A formula without a response, derived from the right-hand-side of the formula, f.

    -

    formula_rhs(a ~ b + c)
    -formula_rhs(~ b + c)

    +

    +
    +
    formula_rhs(a ~ b + c)
    +formula_rhs(~ b + c)
    +

    +
    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_add_covariance_terms.html b/v0.3.14/reference/h_add_covariance_terms.html index c1eada240..6800176ca 100644 --- a/v0.3.14/reference/h_add_covariance_terms.html +++ b/v0.3.14/reference/h_add_covariance_terms.html @@ -1,11 +1,27 @@ - -Add Individual Covariance Variables As Terms to Formula — h_add_covariance_terms • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,37 +123,46 @@
    -

    Usage

    +

    Usage +

    h_add_covariance_terms(f, covariance)
    -

    Arguments

    +

    Arguments +

    -
    f
    +
    +
    f +

    (formula)
    a formula to which covariance structure terms should be added.

    -
    covariance
    +
    covariance +

    (cov_struct)
    a covariance structure object from which additional variables should be sourced.

    -
    + +
    -

    Value

    +

    Value +

    A new formula with included covariance terms.

    -

    Details

    +

    Details +

    stats::update() is used to append the covariance structure and the environment attribute will not be changed. This ensures the returned formula and the input formula have the same environment.

    + + - + + - + + diff --git a/v0.3.14/reference/h_add_terms.html b/v0.3.14/reference/h_add_terms.html index 63ee3fb2e..a44323888 100644 --- a/v0.3.14/reference/h_add_terms.html +++ b/v0.3.14/reference/h_add_terms.html @@ -1,11 +1,27 @@ - -Add Formula Terms with Character — h_add_terms • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,39 +123,49 @@
    -

    Usage

    +

    Usage +

    h_add_terms(f, adds, drop_response = FALSE)
    -

    Arguments

    +

    Arguments +

    -
    f
    +
    +
    f +

    (formula)
    a formula to be updated.

    -
    adds
    +
    adds +

    (character)
    representation of elements to be added.

    -
    drop_response
    +
    drop_response +

    (flag)
    whether response should be dropped.

    -
    + +
    -

    Value

    +

    Value +

    A new formula with elements in drops removed.

    -

    Details

    +

    Details +

    Elements in adds will be added from the formula, while the environment of the formula is unchanged. If adds is NULL or character(0), the formula is unchanged.

    + + - + + - + + diff --git a/v0.3.14/reference/h_coef_table.html b/v0.3.14/reference/h_coef_table.html index cee690749..da110cd0c 100644 --- a/v0.3.14/reference/h_coef_table.html +++ b/v0.3.14/reference/h_coef_table.html @@ -1,11 +1,27 @@ - -Coefficients Table for MMRM Fit — h_coef_table • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,26 +123,33 @@
    -

    Usage

    +

    Usage +

    h_coef_table(object)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    model fit.

    -
    + +
    -

    Value

    +

    Value +

    Matrix with one row per coefficient and columns Estimate, Std. Error, df, t value and Pr(>|t|).

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_confirm_large_levels.html b/v0.3.14/reference/h_confirm_large_levels.html index 2c521e2f2..05d752de3 100644 --- a/v0.3.14/reference/h_confirm_large_levels.html +++ b/v0.3.14/reference/h_confirm_large_levels.html @@ -1,13 +1,29 @@ - -Ask for Confirmation on Large Visit Levels — h_confirm_large_levels • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,25 +126,32 @@
    -

    Usage

    +

    Usage +

    h_confirm_large_levels(x)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (numeric)
    number of visit levels.

    -
    + +
    -

    Value

    +

    Value +

    Logical value TRUE.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_construct_model_frame_inputs.html b/v0.3.14/reference/h_construct_model_frame_inputs.html index c1177d0ac..f4d947705 100644 --- a/v0.3.14/reference/h_construct_model_frame_inputs.html +++ b/v0.3.14/reference/h_construct_model_frame_inputs.html @@ -1,19 +1,35 @@ - -Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm + + + + + +Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm + + + + + + + + + + Skip to contents @@ -29,10 +45,12 @@ + + + + + @@ -109,7 +135,8 @@
    -

    Usage

    +

    Usage +

    h_construct_model_frame_inputs(
       formula,
       data,
    @@ -120,35 +147,47 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    formula
    +
    +
    formula +

    (mmrm)
    mmrm fit object.

    -
    data
    +
    data +

    optional data frame that will be passed to model.frame() or model.matrix()

    -
    include
    +
    include +

    (character)
    names of variable to include

    -
    full
    +
    full +

    (flag)
    indicator whether to return full model frame (deprecated).

    -
    + +
    -

    Value

    -

    named list with four elements:

    • "formula": the formula including the columns requested in the include= argument.

    • +

      Value +

      +

      named list with four elements:

      +
        +
      • "formula": the formula including the columns requested in the include= argument.

      • "data": a data frame including all columns needed in the formula. full formula are identical

      • -
    + + + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_default_value.html b/v0.3.14/reference/h_default_value.html index 724d96186..bbf54ea0b 100644 --- a/v0.3.14/reference/h_default_value.html +++ b/v0.3.14/reference/h_default_value.html @@ -1,13 +1,29 @@ - -Default Value on NULL Return default value when first argument is NULL. — h_default_value • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,29 +126,37 @@
    -

    Usage

    +

    Usage +

    h_default_value(x, y)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    Object.

    -
    y
    +
    y +

    Object.

    -
    + +
    -

    Details

    +

    Details +

    If x is NULL, returns y. Otherwise return x.

    + + - + + - + + diff --git a/v0.3.14/reference/h_df_1d_bw.html b/v0.3.14/reference/h_df_1d_bw.html index e214f3f06..aff00c0fa 100644 --- a/v0.3.14/reference/h_df_1d_bw.html +++ b/v0.3.14/reference/h_df_1d_bw.html @@ -1,11 +1,27 @@ - -Calculation of Between-Within Degrees of Freedom for One-Dimensional Contrast — h_df_1d_bw • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,31 +123,39 @@
    -

    Usage

    +

    Usage +

    h_df_1d_bw(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    contrast +

    (numeric)
    contrast vector. Note that this should not include elements for singular coefficient estimates, i.e. only refer to the actually estimated coefficients.

    -
    + +
    -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_df_1d_kr.html b/v0.3.14/reference/h_df_1d_kr.html index 419ae119f..ed1c1d994 100644 --- a/v0.3.14/reference/h_df_1d_kr.html +++ b/v0.3.14/reference/h_df_1d_kr.html @@ -1,13 +1,29 @@ - -Calculation of Kenward-Roger Degrees of Freedom for One-Dimensional Contrast — h_df_1d_kr • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,31 +126,39 @@
    -

    Usage

    +

    Usage +

    h_df_1d_kr(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    contrast +

    (numeric)
    contrast vector. Note that this should not include elements for singular coefficient estimates, i.e. only refer to the actually estimated coefficients.

    -
    + +
    -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_df_1d_res.html b/v0.3.14/reference/h_df_1d_res.html index da997fcdc..291b57297 100644 --- a/v0.3.14/reference/h_df_1d_res.html +++ b/v0.3.14/reference/h_df_1d_res.html @@ -1,13 +1,29 @@ - -Calculation of Residual Degrees of Freedom for One-Dimensional Contrast — h_df_1d_res • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,31 +126,39 @@
    -

    Usage

    +

    Usage +

    h_df_1d_res(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    contrast +

    (numeric)
    contrast vector. Note that this should not include elements for singular coefficient estimates, i.e. only refer to the actually estimated coefficients.

    -
    + +
    -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_df_1d_sat.html b/v0.3.14/reference/h_df_1d_sat.html index c1d52ba7d..2a4e90859 100644 --- a/v0.3.14/reference/h_df_1d_sat.html +++ b/v0.3.14/reference/h_df_1d_sat.html @@ -1,13 +1,29 @@ - -Calculation of Satterthwaite Degrees of Freedom for One-Dimensional Contrast — h_df_1d_sat • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,31 +126,39 @@
    -

    Usage

    +

    Usage +

    h_df_1d_sat(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    contrast +

    (numeric)
    contrast vector. Note that this should not include elements for singular coefficient estimates, i.e. only refer to the actually estimated coefficients.

    -
    + +
    -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_df_bw_calc.html b/v0.3.14/reference/h_df_bw_calc.html index 2dd55f79c..f201fb45b 100644 --- a/v0.3.14/reference/h_df_bw_calc.html +++ b/v0.3.14/reference/h_df_bw_calc.html @@ -1,11 +1,27 @@ - -Calculation of Between-Within Degrees of Freedom — h_df_bw_calc • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,27 +123,37 @@
    -

    Usage

    +

    Usage +

    h_df_bw_calc(object)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the fitted MMRM.

    -
    + +
    -

    Value

    -

    List with:

    + + + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_df_md_bw.html b/v0.3.14/reference/h_df_md_bw.html index d859635db..98e9dd40e 100644 --- a/v0.3.14/reference/h_df_md_bw.html +++ b/v0.3.14/reference/h_df_md_bw.html @@ -1,11 +1,27 @@ - -Calculation of Between-Within Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_bw • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,32 +123,40 @@
    -

    Usage

    +

    Usage +

    h_df_md_bw(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    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

    +

    Value +

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

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_df_md_from_1d.html b/v0.3.14/reference/h_df_md_from_1d.html index b1edd3de9..10ae5e194 100644 --- a/v0.3.14/reference/h_df_md_from_1d.html +++ b/v0.3.14/reference/h_df_md_from_1d.html @@ -1,11 +1,27 @@ - -Creating F-Statistic Results from One-Dimensional Contrast — h_df_md_from_1d • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,30 +123,38 @@
    -

    Usage

    +

    Usage +

    h_df_md_from_1d(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    model fit.

    -
    contrast
    +
    contrast +

    (numeric)
    one-dimensional contrast.

    -
    + +
    -

    Value

    +

    Value +

    The one-dimensional degrees of freedom are calculated and then based on that the p-value is calculated.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_df_md_kr.html b/v0.3.14/reference/h_df_md_kr.html index 0325049ac..b2686a5f3 100644 --- a/v0.3.14/reference/h_df_md_kr.html +++ b/v0.3.14/reference/h_df_md_kr.html @@ -1,11 +1,27 @@ - -Calculation of Kenward-Roger Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_kr • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,32 +123,40 @@
    -

    Usage

    +

    Usage +

    h_df_md_kr(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    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

    +

    Value +

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

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_df_md_res.html b/v0.3.14/reference/h_df_md_res.html index d3ffdb9a3..ce38a7e00 100644 --- a/v0.3.14/reference/h_df_md_res.html +++ b/v0.3.14/reference/h_df_md_res.html @@ -1,11 +1,27 @@ - -Calculation of Residual Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_res • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,32 +123,40 @@
    -

    Usage

    +

    Usage +

    h_df_md_res(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    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

    +

    Value +

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

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_df_md_sat.html b/v0.3.14/reference/h_df_md_sat.html index 532696129..370e5a488 100644 --- a/v0.3.14/reference/h_df_md_sat.html +++ b/v0.3.14/reference/h_df_md_sat.html @@ -1,11 +1,27 @@ - -Calculation of Satterthwaite Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_sat • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,32 +123,40 @@
    -

    Usage

    +

    Usage +

    h_df_md_sat(object, contrast)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    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

    +

    Value +

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

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_df_min_bw.html b/v0.3.14/reference/h_df_min_bw.html index a31b34609..2a75bb664 100644 --- a/v0.3.14/reference/h_df_min_bw.html +++ b/v0.3.14/reference/h_df_min_bw.html @@ -1,11 +1,27 @@ - -Assign Minimum Degrees of Freedom Given Involved Coefficients — h_df_min_bw • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,31 +123,39 @@
    -

    Usage

    +

    Usage +

    h_df_min_bw(bw_calc, is_coef_involved)
    -

    Arguments

    +

    Arguments +

    -
    bw_calc
    +
    +
    bw_calc +

    (list)
    from h_df_bw_calc().

    -
    is_coef_involved
    +
    is_coef_involved +

    (logical)
    whether each coefficient is involved in the contrast.

    -
    + +
    -

    Value

    +

    Value +

    The minimum of the degrees of freedom assigned to each involved coefficient according to its between-within categorization.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_df_to_tibble.html b/v0.3.14/reference/h_df_to_tibble.html index 923536c11..84aa65fb0 100644 --- a/v0.3.14/reference/h_df_to_tibble.html +++ b/v0.3.14/reference/h_df_to_tibble.html @@ -1,11 +1,27 @@ - -Coerce a Data Frame to a tibble — h_df_to_tibble • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + +
    @@ -97,24 +124,31 @@
    -

    Usage

    +

    Usage +

    h_df_to_tibble(data)
    -

    Arguments

    +

    Arguments +

    -
    data
    +
    +
    data +

    (data.frame)
    what to coerce.

    -
    + +
    -

    Value

    +

    Value +

    The data as a tibble, potentially with a .rownames column.

    -

    Details

    +

    Details +

    This is only a thin wrapper around tibble::as_tibble(), except giving a useful error message and it checks for rownames and adds them as a new column .rownames if they are not just a numeric sequence as @@ -122,7 +156,8 @@

    Details

    + + - + + - + + diff --git a/v0.3.14/reference/h_drop_covariance_terms.html b/v0.3.14/reference/h_drop_covariance_terms.html index f3b64781f..10b51ffee 100644 --- a/v0.3.14/reference/h_drop_covariance_terms.html +++ b/v0.3.14/reference/h_drop_covariance_terms.html @@ -1,11 +1,27 @@ - -Drop Formula Terms used for Covariance Structure Definition — h_drop_covariance_terms • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,31 +123,39 @@
    -

    Usage

    +

    Usage +

    h_drop_covariance_terms(f)
    -

    Arguments

    +

    Arguments +

    -
    f
    +
    +
    f +

    (formula)
    a formula from which covariance terms should be dropped.

    -
    + +
    -

    Value

    +

    Value +

    The formula without accepted covariance terms.

    -

    Details

    +

    Details +

    terms is used and it will preserve the environment attribute. This ensures the returned formula and the input formula have the same environment.

    + + - + + - + + diff --git a/v0.3.14/reference/h_drop_levels.html b/v0.3.14/reference/h_drop_levels.html index 58407b387..4f697ee06 100644 --- a/v0.3.14/reference/h_drop_levels.html +++ b/v0.3.14/reference/h_drop_levels.html @@ -1,11 +1,27 @@ - -Drop Levels from Dataset — h_drop_levels • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,33 +123,42 @@
    -

    Usage

    +

    Usage +

    h_drop_levels(data, subject_var, visit_var, except)
    -

    Arguments

    +

    Arguments +

    -
    data
    +
    +
    data +

    (data.frame) data to drop levels.

    -
    subject_var
    +
    subject_var +

    (character) subject variable.

    -
    visit_var
    +
    visit_var +

    (character) visit variable.

    -
    except
    +
    except +

    (character) variables to exclude from dropping.

    -
    + + + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_extra_levels.html b/v0.3.14/reference/h_extra_levels.html index 9874ec433..6dab74b12 100644 --- a/v0.3.14/reference/h_extra_levels.html +++ b/v0.3.14/reference/h_extra_levels.html @@ -1,11 +1,27 @@ - -Check if a Factor Should Drop Levels — h_extra_levels • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,21 +123,27 @@
    -

    Usage

    +

    Usage +

    h_extra_levels(x)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (vector) vector to check.

    -
    + + + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_extract_covariance_terms.html b/v0.3.14/reference/h_extract_covariance_terms.html index 58cf54f83..472dcdf77 100644 --- a/v0.3.14/reference/h_extract_covariance_terms.html +++ b/v0.3.14/reference/h_extract_covariance_terms.html @@ -1,11 +1,27 @@ - -Extract Formula Terms used for Covariance Structure Definition — h_extract_covariance_terms • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,26 +123,33 @@
    -

    Usage

    +

    Usage +

    h_extract_covariance_terms(f)
    -

    Arguments

    +

    Arguments +

    -
    f
    +
    +
    f +

    (formula)
    a formula from which covariance terms should be extracted.

    -
    + +
    -

    Value

    +

    Value +

    A list of covariance structure expressions found in f.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_first_contain_categorical.html b/v0.3.14/reference/h_first_contain_categorical.html index b93382991..64b543c17 100644 --- a/v0.3.14/reference/h_first_contain_categorical.html +++ b/v0.3.14/reference/h_first_contain_categorical.html @@ -1,11 +1,27 @@ - -Check if the Effect is the First Categorical Effect — h_first_contain_categorical • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,29 +123,37 @@
    -

    Usage

    +

    Usage +

    h_first_contain_categorical(effect, factors, categorical)
    -

    Arguments

    +

    Arguments +

    -
    effect
    +
    +
    effect +

    (string) name of the effect.

    -
    factors
    +
    factors +

    (matrix) the factor matrix.

    -
    categorical
    +
    categorical +

    (character) names of the categorical values.

    -
    + + + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_get_contrast.html b/v0.3.14/reference/h_get_contrast.html index 02fc37584..adf09cd2e 100644 --- a/v0.3.14/reference/h_get_contrast.html +++ b/v0.3.14/reference/h_get_contrast.html @@ -1,11 +1,27 @@ - -Obtain Contrast for Specified Effect — h_get_contrast • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    h_get_contrast(
       object,
       effect,
    @@ -107,32 +134,41 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the fitted MMRM.

    -
    effect
    +
    effect +

    (string) the name of the effect.

    -
    type
    +
    type +

    (string) type of test, "II", "III", '2', or '3'.

    -
    tol
    +
    tol +

    (numeric) threshold blow which values are treated as 0.

    -
    + +
    -

    Value

    +

    Value +

    A matrix of the contrast.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_get_cov_default.html b/v0.3.14/reference/h_get_cov_default.html index cd952f7b5..605a84dec 100644 --- a/v0.3.14/reference/h_get_cov_default.html +++ b/v0.3.14/reference/h_get_cov_default.html @@ -1,13 +1,29 @@ - -Obtain Default Covariance Method — h_get_cov_default • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,26 +126,33 @@
    -

    Usage

    +

    Usage +

    h_get_cov_default(
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within")
     )
    -

    Arguments

    +

    Arguments +

    -
    method
    +
    +
    method +

    (string)
    degrees of freedom method.

    -
    + +
    -

    Value

    +

    Value +

    String of the default covariance method.

    -

    Details

    +

    Details +

    The default covariance method is different for different degrees of freedom method. For "Satterthwaite" or "Between-Within", "Asymptotic" is returned. For "Kenward-Roger" only, "Kenward-Roger" is returned. @@ -127,7 +160,8 @@

    Details

    + + - + + - + + diff --git a/v0.3.14/reference/h_get_empirical.html b/v0.3.14/reference/h_get_empirical.html index aa4619a6d..db5846d8b 100644 --- a/v0.3.14/reference/h_get_empirical.html +++ b/v0.3.14/reference/h_get_empirical.html @@ -1,15 +1,31 @@ - -Obtain Empirical/Jackknife/Bias-Reduced Covariance — h_get_empirical • mmrm + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,43 +129,57 @@
    -

    Usage

    +

    Usage +

    h_get_empirical(tmb_data, theta, beta, beta_vcov, type)
    -

    Arguments

    +

    Arguments +

    -
    tmb_data
    +
    +
    tmb_data +

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    -
    theta
    +
    theta +

    (numeric)
    theta estimate.

    -
    beta
    +
    beta +

    (numeric)
    beta estimate.

    -
    beta_vcov
    +
    beta_vcov +

    (matrix)
    covariance of beta estimate.

    -
    type
    +
    type +

    (string)
    type of empirical method, including "Empirical", "Empirical-Jackknife" and "Empirical-Bias-Reduced".

    -
    + +
    -

    Value

    -

    Named list with elements:

    • cov: matrix empirical covariance.

    • +

      Value +

      +

      Named list with elements:

      +
        +
      • cov: matrix empirical covariance.

      • df_mat: matrix to calculate Satterthwaite degree of freedom.

      • -
    + + + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_get_index.html b/v0.3.14/reference/h_get_index.html index 8738e432f..4bb33adf8 100644 --- a/v0.3.14/reference/h_get_index.html +++ b/v0.3.14/reference/h_get_index.html @@ -1,11 +1,27 @@ - -Test if the First Vector is Subset of the Second Vector — h_get_index • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_get_index(x, y)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (vector) the first list.

    -
    y
    +
    y +

    (vector) the second list.

    -
    + + + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_get_kr_comp.html b/v0.3.14/reference/h_get_kr_comp.html index 507928344..488edeb64 100644 --- a/v0.3.14/reference/h_get_kr_comp.html +++ b/v0.3.14/reference/h_get_kr_comp.html @@ -1,13 +1,29 @@ - -Obtain Kenward-Roger Adjustment Components — h_get_kr_comp • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,30 +126,41 @@
    -

    Usage

    +

    Usage +

    h_get_kr_comp(tmb_data, theta)
    -

    Arguments

    +

    Arguments +

    -
    tmb_data
    +
    +
    tmb_data +

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    -
    theta
    +
    theta +

    (numeric)
    theta estimate.

    -
    + +
    -

    Value

    -

    Named list with elements:

    • P: matrix of \(P\) component.

    • +

      Value +

      +

      Named list with elements:

      +
        +
      • P: matrix of \(P\) component.

      • Q: matrix of \(Q\) component.

      • R: matrix of \(R\) component.

      • -
    + +
    -

    Details

    +

    Details +

    the function returns a named list, \(P\), \(Q\) and \(R\), which corresponds to the paper in 1997. The matrices are stacked in columns so that \(P\), \(Q\) and \(R\) has the same column number(number of beta parameters). The number of rows, is dependent on @@ -135,7 +172,8 @@

    Details

    + + - + + - + + diff --git a/v0.3.14/reference/h_get_na_action.html b/v0.3.14/reference/h_get_na_action.html index 527db115e..fc87515cc 100644 --- a/v0.3.14/reference/h_get_na_action.html +++ b/v0.3.14/reference/h_get_na_action.html @@ -1,11 +1,27 @@ - -Obtain na.action as Function — h_get_na_action • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,12 +123,14 @@
    -

    Usage

    +

    Usage +

    h_get_na_action(na_action)
    - + + - + + - + + diff --git a/v0.3.14/reference/h_get_optimizers.html b/v0.3.14/reference/h_get_optimizers.html index 151793c3b..7fde7b995 100644 --- a/v0.3.14/reference/h_get_optimizers.html +++ b/v0.3.14/reference/h_get_optimizers.html @@ -1,11 +1,27 @@ - -Obtain Optimizer according to Optimizer String Value — h_get_optimizers • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    h_get_optimizers(
       optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"),
       optimizer_fun = h_optimizer_fun(optimizer),
    @@ -107,49 +134,65 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    optimizer
    +
    +
    optimizer +

    (character)
    names of built-in optimizers to try, subset of "L-BFGS-B", "BFGS", "CG" and "nlminb".

    -
    optimizer_fun
    +
    optimizer_fun +

    (function or list of function)
    alternatively to optimizer, an optimizer function or a list of optimizer functions can be passed directly here.

    -
    optimizer_args
    +
    optimizer_args +

    (list)
    additional arguments for optimizer_fun.

    -
    optimizer_control
    +
    optimizer_control +

    (list)
    passed to argument control in optimizer_fun.

    -
    + +
    -

    Value

    +

    Value +

    Named list of optimizers created by h_partial_fun_args().

    -

    Details

    -

    If you want to use only the built-in optimizers:

    • optimizer is a shortcut to create a list of built-in optimizer functions +

      Details +

      +

      If you want to use only the built-in optimizers:

      +
        +
      • optimizer is a shortcut to create a list of built-in optimizer functions passed to optimizer_fun.

      • Allowed are "L-BFGS-B", "BFGS", "CG" (using stats::optim() with corresponding method) and "nlminb" (using stats::nlminb()).

      • Other arguments should go into optimizer_args.

      • -

      If you want to use your own optimizer function:

      • Make sure that there are three arguments: parameter (start value), objective function +

      +

      If you want to use your own optimizer function:

      +
        +
      • Make sure that there are three arguments: parameter (start value), objective function and gradient function are sequentially in the function arguments.

      • If there are other named arguments in front of these, make sure they are correctly specified through optimizer_args.

      • If the hessian can be used, please make sure its argument name is hessian and please add attribute use_hessian = TRUE to the function, using attr(fun, "use_hessian) <- TRUE.

      • -
    + + + + - + + - + + diff --git a/v0.3.14/reference/h_get_prediction.html b/v0.3.14/reference/h_get_prediction.html index 6d7bd366a..4c5e99d9e 100644 --- a/v0.3.14/reference/h_get_prediction.html +++ b/v0.3.14/reference/h_get_prediction.html @@ -1,11 +1,27 @@ - -Get Prediction — h_get_prediction • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,43 +123,57 @@
    -

    Usage

    +

    Usage +

    h_get_prediction(tmb_data, theta, beta, beta_vcov)
    -

    Arguments

    +

    Arguments +

    -
    tmb_data
    +
    +
    tmb_data +

    (mmrm_tmb_data)
    object.

    -
    theta
    +
    theta +

    (numeric)
    theta value.

    -
    beta
    +
    beta +

    (numeric)
    beta value.

    -
    beta_vcov
    +
    beta_vcov +

    (matrix)
    beta_vcov matrix.

    -
    + +
    -

    Value

    -

    List with:

    • prediction: Matrix with columns fit, conf_var, and var.

    • +

      Value +

      +

      List with:

      +
        +
      • prediction: Matrix with columns fit, conf_var, and var.

      • covariance: List with subject specific covariance matrices.

      • index: List of zero-based subject indices.

      • -
    + +
    -

    Details

    +

    Details +

    See predict function in predict.cpp which is called internally.

    + + - + + - + + diff --git a/v0.3.14/reference/h_get_prediction_variance.html b/v0.3.14/reference/h_get_prediction_variance.html index 54dff1145..cc0762ccf 100644 --- a/v0.3.14/reference/h_get_prediction_variance.html +++ b/v0.3.14/reference/h_get_prediction_variance.html @@ -1,11 +1,27 @@ - -Get Prediction Variance — h_get_prediction_variance • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,29 +123,37 @@
    -

    Usage

    +

    Usage +

    h_get_prediction_variance(object, nsim, tmb_data)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm_tmb)
    the fitted MMRM.

    -
    nsim
    +
    nsim +

    (count)
    number of samples.

    -
    tmb_data
    +
    tmb_data +

    (mmrm_tmb_data)
    object.

    -
    + + + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_get_sim_per_subj.html b/v0.3.14/reference/h_get_sim_per_subj.html index ce431ffd8..ab6829a4f 100644 --- a/v0.3.14/reference/h_get_sim_per_subj.html +++ b/v0.3.14/reference/h_get_sim_per_subj.html @@ -1,11 +1,27 @@ - -Get simulated values by patient. — h_get_sim_per_subj • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,29 +123,37 @@
    -

    Usage

    +

    Usage +

    h_get_sim_per_subj(predict_res, nsub, nsim)
    -

    Arguments

    +

    Arguments +

    -
    predict_res
    +
    +
    predict_res +

    (list)
    from h_get_prediction().

    -
    nsub
    +
    nsub +

    (count)
    number of subjects.

    -
    nsim
    +
    nsim +

    (count)
    number of values to simulate.

    -
    + + + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_get_theta_from_cov.html b/v0.3.14/reference/h_get_theta_from_cov.html index 178d9cf0a..70935dfdb 100644 --- a/v0.3.14/reference/h_get_theta_from_cov.html +++ b/v0.3.14/reference/h_get_theta_from_cov.html @@ -1,11 +1,27 @@ - -Obtain Theta from Covariance Matrix — h_get_theta_from_cov • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,30 +123,38 @@
    -

    Usage

    +

    Usage +

    h_get_theta_from_cov(covariance)
    -

    Arguments

    +

    Arguments +

    -
    covariance
    +
    +
    covariance +

    (matrix) of covariance matrix values.

    -
    + +
    -

    Value

    +

    Value +

    Numeric vector of the theta values.

    -

    Details

    +

    Details +

    If the covariance matrix has NA in some of the elements, they will be replaced by 0 (non-diagonal) and 1 (diagonal). This ensures that the matrix is positive definite.

    + + - + + - + + diff --git a/v0.3.14/reference/h_gradient.html b/v0.3.14/reference/h_gradient.html index 2b8dc0b7c..22bfbaeee 100644 --- a/v0.3.14/reference/h_gradient.html +++ b/v0.3.14/reference/h_gradient.html @@ -1,13 +1,29 @@ - -Computation of a Gradient Given Jacobian and Contrast Vector — h_gradient • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,32 +126,40 @@
    -

    Usage

    +

    Usage +

    h_gradient(jac_list, contrast)
    -

    Arguments

    +

    Arguments +

    -
    jac_list
    +
    +
    jac_list +

    (list)
    Jacobian list produced e.g. by h_jac_list().

    -
    contrast
    +
    contrast +

    (numeric)
    contrast vector, which needs to have the same number of elements as there are rows and columns in each element of jac_list.

    -
    + +
    -

    Value

    +

    Value +

    Numeric vector which contains the quadratic forms of each element of jac_list with the contrast vector.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_jac_list.html b/v0.3.14/reference/h_jac_list.html index b8fbd2e1d..e63e51dc2 100644 --- a/v0.3.14/reference/h_jac_list.html +++ b/v0.3.14/reference/h_jac_list.html @@ -1,11 +1,27 @@ - -Obtain List of Jacobian Matrix Entries for Covariance Matrix — h_jac_list • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,35 +123,44 @@
    -

    Usage

    +

    Usage +

    h_jac_list(tmb_data, theta_est, beta_vcov)
    -

    Arguments

    +

    Arguments +

    -
    tmb_data
    +
    +
    tmb_data +

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    -
    theta_est
    +
    theta_est +

    (numeric)
    variance parameters point estimate.

    -
    beta_vcov
    +
    beta_vcov +

    (matrix)
    vairance covariance matrix of coefficients.

    -
    + +
    -

    Value

    +

    Value +

    List with one element per variance parameter containing a matrix of the same dimensions as the covariance matrix. The values are the derivatives with regards to this variance parameter.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_kr_df.html b/v0.3.14/reference/h_kr_df.html index 428e0ef60..8c7b3bad5 100644 --- a/v0.3.14/reference/h_kr_df.html +++ b/v0.3.14/reference/h_kr_df.html @@ -1,13 +1,29 @@ - -Obtain the Adjusted Kenward-Roger degrees of freedom — h_kr_df • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,38 +126,51 @@
    -

    Usage

    +

    Usage +

    h_kr_df(v0, l, w, p)
    -

    Arguments

    +

    Arguments +

    -
    v0
    +
    +
    v0 +

    (matrix)
    unadjusted covariance matrix.

    -
    l
    +
    l +

    (matrix)
    linear combination matrix.

    -
    w
    +
    w +

    (matrix)
    hessian matrix.

    -
    p
    +
    p +

    (matrix)
    P matrix from h_get_kr_comp().

    -
    + +
    -

    Value

    -

    Named list with elements:

    • m: numeric degrees of freedom.

    • +

      Value +

      +

      Named list with elements:

      +
        +
      • m: numeric degrees of freedom.

      • lambda: numeric F statistic scale parameter.

      • -
    + + + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_md_denom_df.html b/v0.3.14/reference/h_md_denom_df.html index 1e1206c32..8dc0c0e6b 100644 --- a/v0.3.14/reference/h_md_denom_df.html +++ b/v0.3.14/reference/h_md_denom_df.html @@ -1,11 +1,27 @@ - -Calculating Denominator Degrees of Freedom for the Multi-Dimensional Case — h_md_denom_df • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,32 +123,40 @@
    -

    Usage

    +

    Usage +

    h_md_denom_df(t_stat_df)
    -

    Arguments

    +

    Arguments +

    -
    t_stat_df
    +
    +
    t_stat_df +

    (numeric)
    n t-statistic derived degrees of freedom.

    -
    + +
    -

    Value

    +

    Value +

    Usually the calculation is returning 2 * E / (E - n) where E is the sum of t / (t - 2) over all t_stat_df values t.

    -

    Note

    +

    Note +

    If the input values are two similar to each other then just the average of them is returned. If any of the inputs is not larger than 2 then 2 is returned.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_mmrm_tmb_assert_start.html b/v0.3.14/reference/h_mmrm_tmb_assert_start.html index 503cbe75c..0e3d70b7a 100644 --- a/v0.3.14/reference/h_mmrm_tmb_assert_start.html +++ b/v0.3.14/reference/h_mmrm_tmb_assert_start.html @@ -1,11 +1,27 @@ - -Asserting Sane Start Values for TMB Fit — h_mmrm_tmb_assert_start • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_assert_start(tmb_object)
    -

    Arguments

    +

    Arguments +

    -
    tmb_object
    +
    +
    tmb_object +

    (list)
    created with TMB::MakeADFun().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used for assertions.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_mmrm_tmb_check_conv.html b/v0.3.14/reference/h_mmrm_tmb_check_conv.html index 4599939b0..dcce13cc5 100644 --- a/v0.3.14/reference/h_mmrm_tmb_check_conv.html +++ b/v0.3.14/reference/h_mmrm_tmb_check_conv.html @@ -1,11 +1,27 @@ - -Checking the TMB Optimization Result — h_mmrm_tmb_check_conv • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,30 +123,38 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_check_conv(tmb_opt, mmrm_tmb)
    -

    Arguments

    +

    Arguments +

    -
    tmb_opt
    +
    +
    tmb_opt +

    (list)
    optimization result.

    -
    mmrm_tmb
    +
    mmrm_tmb +

    (mmrm_tmb)
    result from h_mmrm_tmb_fit().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used to generate warnings in case that the model did not converge.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_mmrm_tmb_data.html b/v0.3.14/reference/h_mmrm_tmb_data.html index 3a9b2f2ef..d90b1b666 100644 --- a/v0.3.14/reference/h_mmrm_tmb_data.html +++ b/v0.3.14/reference/h_mmrm_tmb_data.html @@ -1,11 +1,27 @@ - -Data for TMB Fit — h_mmrm_tmb_data • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_data(
       formula_parts,
       data,
    @@ -113,47 +140,61 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    formula_parts
    +
    +
    formula_parts +

    (mmrm_tmb_formula_parts)
    list with formula parts from h_mmrm_tmb_formula_parts().

    -
    data
    +
    data +

    (data.frame)
    which contains variables used in formula_parts.

    -
    weights
    +
    weights +

    (vector)
    weights to be used in the fitting process.

    -
    reml
    +
    reml +

    (flag)
    whether restricted maximum likelihood (REML) estimation is used, otherwise maximum likelihood (ML) is used.

    -
    singular
    +
    singular +

    (string)
    choices of method deal with rank-deficient matrices. "error" to stop the function return the error, "drop" to drop these columns, and "keep" to keep all the columns.

    -
    drop_visit_levels
    +
    drop_visit_levels +

    (flag)
    whether to drop levels for visit variable, if visit variable is a factor.

    -
    allow_na_response
    +
    allow_na_response +

    (flag)
    whether NA in response is allowed.

    -
    drop_levels
    +
    drop_levels +

    (flag)
    whether drop levels for covariates. If not dropped could lead to singular matrix.

    -
    + +
    -

    Value

    -

    List of class mmrm_tmb_data with elements:

    • full_frame: data.frame with n rows containing all variables needed in the model.

    • +

      Value +

      +

      List of class mmrm_tmb_data with elements:

      +
        +
      • full_frame: data.frame with n rows containing all variables needed in the model.

      • data: data.frame of input dataset.

      • x_matrix: matrix with n rows and p columns specifying the overall design matrix.

      • x_cols_aliased: logical with potentially more than p elements indicating which @@ -173,9 +214,11 @@

        Value

        reml: int specifying whether REML estimation is used (1), otherwise ML (0).

      • subject_groups: factor specifying the grouping for each subject.

      • n_groups: int with the number of total groups

      • -
    + +
    -

    Details

    +

    Details +

    Note that the subject_var must not be factor but can also be character. If it is character, then it will be converted to factor internally. Here the levels will be the unique values, sorted alphabetically and numerically if there @@ -184,7 +227,8 @@

    Details

    + + - + + - + + diff --git a/v0.3.14/reference/h_mmrm_tmb_extract_cov.html b/v0.3.14/reference/h_mmrm_tmb_extract_cov.html index 0ae1153c1..e2e28f89f 100644 --- a/v0.3.14/reference/h_mmrm_tmb_extract_cov.html +++ b/v0.3.14/reference/h_mmrm_tmb_extract_cov.html @@ -1,13 +1,29 @@ - -Extract covariance matrix from TMB report and input data — h_mmrm_tmb_extract_cov • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,39 +126,49 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_extract_cov(tmb_report, tmb_data, visit_var, is_spatial)
    -

    Arguments

    +

    Arguments +

    -
    tmb_report
    +
    +
    tmb_report +

    (list)
    report created with TMB::MakeADFun() report function.

    -
    tmb_data
    +
    tmb_data +

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    -
    visit_var
    +
    visit_var +

    (character)
    character vector of the visit variable

    -
    is_spatial
    +
    is_spatial +

    (flag)
    indicator whether the covariance structure is spatial.

    -
    + +
    -

    Value

    +

    Value +

    Return a simple covariance matrix if there is no grouping, or a named list of estimated grouped covariance matrices, with its name equal to the group levels.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_mmrm_tmb_fit.html b/v0.3.14/reference/h_mmrm_tmb_fit.html index 1df4ffabe..effca18aa 100644 --- a/v0.3.14/reference/h_mmrm_tmb_fit.html +++ b/v0.3.14/reference/h_mmrm_tmb_fit.html @@ -1,13 +1,29 @@ - -Build TMB Fit Result List — h_mmrm_tmb_fit • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,34 +126,45 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_fit(tmb_object, tmb_opt, formula_parts, tmb_data)
    -

    Arguments

    +

    Arguments +

    -
    tmb_object
    +
    +
    tmb_object +

    (list)
    created with TMB::MakeADFun().

    -
    tmb_opt
    +
    tmb_opt +

    (list)
    optimization result.

    -
    formula_parts
    +
    formula_parts +

    (mmrm_tmb_formula_parts)
    produced by h_mmrm_tmb_formula_parts().

    -
    tmb_data
    +
    tmb_data +

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    -
    + +
    -

    Value

    -

    List of class mmrm_tmb with:

    • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

    • +

      Value +

      +

      List of class mmrm_tmb with:

      +
        +
      • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

      • beta_est: vector of coefficient estimates.

      • beta_vcov: Variance-covariance matrix for coefficient estimates.

      • beta_vcov_inv_L: Lower triangular matrix L of the inverse variance-covariance matrix decomposition.

      • @@ -142,16 +179,19 @@

        Value

        opt_details: list with optimization details including convergence code.

      • tmb_object: original TMB object created with TMB::MakeADFun().

      • tmb_data: input.

      • -
    + +
    -

    Details

    +

    Details +

    Instead of inverting or decomposing beta_vcov, it can be more efficient to use its robust Cholesky decomposition LDL^T, therefore we return the corresponding two components L and D as well since they have been available on the C++ side already.

    + + - + + - + + diff --git a/v0.3.14/reference/h_mmrm_tmb_formula_parts.html b/v0.3.14/reference/h_mmrm_tmb_formula_parts.html index 0a8950ec8..0d06f7fe7 100644 --- a/v0.3.14/reference/h_mmrm_tmb_formula_parts.html +++ b/v0.3.14/reference/h_mmrm_tmb_formula_parts.html @@ -1,11 +1,27 @@ - -Processing the Formula for TMB Fit — h_mmrm_tmb_formula_parts • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_formula_parts(
       formula,
       covariance = as.cov_struct(formula, warn_partial = FALSE)
    @@ -105,21 +132,29 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    formula
    +
    +
    formula +

    (formula)
    Original formula.

    -
    covariance
    +
    covariance +

    (cov_struct)
    A covariance structure from which additional formula parts should be added.

    -
    + +
    -

    Value

    -

    List of class mmrm_tmb_formula_parts with elements:

    • formula: the original input.

    • +

      Value +

      +

      List of class mmrm_tmb_formula_parts with elements:

      +
        +
      • formula: the original input.

      • model_formula: formula with the covariance term is removed.

      • model_formula: formula with the covariance term removed.

      • full_formula: same as model_formula but includes the covariance @@ -132,10 +167,12 @@

        Value

        group_var: string with the group variable name. If no group specified, this element is NULL.

      • model_var: character with the variables names of the formula, except subject_var.

      • -
    + + + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_mmrm_tmb_parameters.html b/v0.3.14/reference/h_mmrm_tmb_parameters.html index 6262c852c..f10906e53 100644 --- a/v0.3.14/reference/h_mmrm_tmb_parameters.html +++ b/v0.3.14/reference/h_mmrm_tmb_parameters.html @@ -1,11 +1,27 @@ - -Start Parameters for TMB Fit — h_mmrm_tmb_parameters • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,40 +123,50 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_parameters(formula_parts, tmb_data, start, n_groups = 1L)
    -

    Arguments

    +

    Arguments +

    -
    formula_parts
    +
    +
    formula_parts +

    (mmrm_tmb_formula_parts)
    produced by h_mmrm_tmb_formula_parts().

    -
    tmb_data
    +
    tmb_data +

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    -
    start
    +
    start +

    (numeric or NULL)
    optional start values for variance parameters.

    -
    n_groups
    +
    n_groups +

    (int)
    number of groups.

    -
    + +
    -

    Value

    +

    Value +

    List with element theta containing the start values for the variance parameters.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_newdata_add_pred.html b/v0.3.14/reference/h_newdata_add_pred.html index 276d386cf..bc59c3df0 100644 --- a/v0.3.14/reference/h_newdata_add_pred.html +++ b/v0.3.14/reference/h_newdata_add_pred.html @@ -1,11 +1,27 @@ - -Add Prediction Results to New Data — h_newdata_add_pred • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,44 +123,55 @@
    -

    Usage

    +

    Usage +

    h_newdata_add_pred(x, newdata, se_fit, interval, ...)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (mmrm)
    fit.

    -
    newdata
    +
    newdata +

    (data.frame)
    data to predict.

    -
    se_fit
    +
    se_fit +

    (flag)
    whether to return standard error of prediction, can only be used when interval is not "none".

    -
    interval
    +
    interval +

    (string)
    type of interval.

    -
    ...
    +
    ... +

    passed to predict.mmrm_tmb().

    -
    + +
    -

    Value

    +

    Value +

    The newdata as a tibble with additional columns .fitted, .lower, .upper (if interval is not none) and .se.fit (if se_fit requested).

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_obtain_lvls.html b/v0.3.14/reference/h_obtain_lvls.html index a9030ed77..8a2274cb4 100644 --- a/v0.3.14/reference/h_obtain_lvls.html +++ b/v0.3.14/reference/h_obtain_lvls.html @@ -1,11 +1,27 @@ - -Obtain Levels Prior and Posterior — h_obtain_lvls • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,33 +123,42 @@
    -

    Usage

    +

    Usage +

    h_obtain_lvls(var, additional_vars, xlev, factors)
    -

    Arguments

    +

    Arguments +

    -
    var
    +
    +
    var +

    (string) name of the effect.

    -
    additional_vars
    +
    additional_vars +

    (character) names of additional variables.

    -
    xlev
    +
    xlev +

    (list) named list of character levels.

    -
    factors
    +
    factors +

    (matrix) the factor matrix.

    -
    + + + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_optimizer_fun.html b/v0.3.14/reference/h_optimizer_fun.html index 73b5e3ebc..2c22ae1da 100644 --- a/v0.3.14/reference/h_optimizer_fun.html +++ b/v0.3.14/reference/h_optimizer_fun.html @@ -1,11 +1,27 @@ - -Obtain Optimizer Function with Character — h_optimizer_fun • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_optimizer_fun(optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"))
    -

    Arguments

    +

    Arguments +

    -
    optimizer
    +
    +
    optimizer +

    (character)
    vector of optimizers.

    -
    + +
    -

    Value

    +

    Value +

    A (list)
    of optimizer functions generated from h_partial_fun_args().

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_partial_fun_args.html b/v0.3.14/reference/h_partial_fun_args.html index f71fc7956..ddf8dc9f8 100644 --- a/v0.3.14/reference/h_partial_fun_args.html +++ b/v0.3.14/reference/h_partial_fun_args.html @@ -1,11 +1,27 @@ - -Create Partial Functions — h_partial_fun_args • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,33 +123,42 @@
    -

    Usage

    +

    Usage +

    h_partial_fun_args(fun, ..., additional_attr = list())
    -

    Arguments

    +

    Arguments +

    -
    fun
    +
    +
    fun +

    (function)
    to be wrapped.

    -
    ...
    +
    ... +

    Additional arguments for fun.

    -
    additional_attr
    +
    additional_attr +

    (list)
    of additional attributes to apply to the result.

    -
    + +
    -

    Value

    +

    Value +

    Object with S3 class "partial", a function with args attribute (and possibly more attributes from additional_attr).

    -

    Details

    +

    Details +

    This function add args attribute to the original function, and add an extra class partial to the function. args is the argument for the function, and elements in ... will override the existing @@ -131,7 +166,8 @@

    Details

    + + - + + - + + diff --git a/v0.3.14/reference/h_print_aic_list.html b/v0.3.14/reference/h_print_aic_list.html index ceb60cce8..d638fbdea 100644 --- a/v0.3.14/reference/h_print_aic_list.html +++ b/v0.3.14/reference/h_print_aic_list.html @@ -1,11 +1,27 @@ - -Printing AIC and other Model Fit Criteria — h_print_aic_list • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_print_aic_list(aic_list, digits = 1)
    -

    Arguments

    +

    Arguments +

    -
    aic_list
    +
    +
    aic_list +

    (list)
    list as part of from summary.mmrm().

    -
    digits
    +
    digits +

    (number)
    number of decimal places used with round().

    -
    + + + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_print_call.html b/v0.3.14/reference/h_print_call.html index be1c6fa90..772021560 100644 --- a/v0.3.14/reference/h_print_call.html +++ b/v0.3.14/reference/h_print_call.html @@ -1,11 +1,27 @@ - -Printing MMRM Function Call — h_print_call • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,33 +123,42 @@
    -

    Usage

    +

    Usage +

    h_print_call(call, n_obs, n_subjects, n_timepoints)
    -

    Arguments

    +

    Arguments +

    -
    call
    +
    +
    call +

    (call)
    original mmrm() function call.

    -
    n_obs
    +
    n_obs +

    (int)
    number of observations.

    -
    n_subjects
    +
    n_subjects +

    (int)
    number of subjects.

    -
    n_timepoints
    +
    n_timepoints +

    (int)
    number of timepoints.

    -
    + + + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_print_cov.html b/v0.3.14/reference/h_print_cov.html index b160d4cc6..04423919f 100644 --- a/v0.3.14/reference/h_print_cov.html +++ b/v0.3.14/reference/h_print_cov.html @@ -1,11 +1,27 @@ - -Printing MMRM Covariance Type — h_print_cov • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,29 +123,37 @@
    -

    Usage

    +

    Usage +

    h_print_cov(cov_type, n_theta, n_groups)
    -

    Arguments

    +

    Arguments +

    -
    cov_type
    +
    +
    cov_type +

    (string)
    covariance structure abbreviation.

    -
    n_theta
    +
    n_theta +

    (count)
    number of variance parameters.

    -
    n_groups
    +
    n_groups +

    (count)
    number of groups.

    -
    + + + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_quad_form.html b/v0.3.14/reference/h_quad_form.html index fd5763eac..5bfc6b3d5 100644 --- a/v0.3.14/reference/h_quad_form.html +++ b/v0.3.14/reference/h_quad_form.html @@ -1,13 +1,29 @@ - -Quadratic Form Calculations — h_quad_form • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,43 +126,54 @@
    -

    Usage

    +

    Usage +

    h_quad_form_vec(vec, center)
     
     h_quad_form_mat(mat, center)
    -

    Arguments

    +

    Arguments +

    -
    vec
    +
    +
    vec +

    (numeric)
    interpreted as a row vector.

    -
    center
    +
    center +

    (matrix)
    square numeric matrix with the same dimensions as x as the center of the quadratic form.

    -
    mat
    +
    mat +

    (matrix)
    numeric matrix to be multiplied left and right of center, therefore needs to have as many columns as there are rows and columns in center.

    -
    + +
    -

    Functions

    +

    Functions +

    -
    • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) +

        +
      • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) as a numeric (not a matrix).

      • h_quad_form_mat(): calculates the quadratic form mat %*% center %*% t(mat) as a matrix, the result is square and has dimensions identical to the number of rows in mat.

      • -
    + + + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_reconcile_cov_struct.html b/v0.3.14/reference/h_reconcile_cov_struct.html index b107b182d..4d809a91b 100644 --- a/v0.3.14/reference/h_reconcile_cov_struct.html +++ b/v0.3.14/reference/h_reconcile_cov_struct.html @@ -1,11 +1,27 @@ - -Reconcile Possible Covariance Structure Inputs — h_reconcile_cov_struct • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,34 +123,42 @@
    -

    Usage

    +

    Usage +

    h_reconcile_cov_struct(formula = NULL, covariance = NULL)
    -

    Arguments

    +

    Arguments +

    -
    formula
    +
    +
    formula +

    (formula)
    the model formula, see details.

    -
    covariance
    +
    covariance +

    (cov_struct)
    a covariance structure type definition as produced with cov_struct(), or value that can be coerced to a covariance structure using as.cov_struct(). If no value is provided, a structure is derived from the provided formula.

    -
    + +
    -

    Value

    +

    Value +

    The value covariance if it's provided or a covariance structure derived from the provided formula otherwise. An error is raised of both are provided.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_record_all_output.html b/v0.3.14/reference/h_record_all_output.html index e34355c78..2675b2ace 100644 --- a/v0.3.14/reference/h_record_all_output.html +++ b/v0.3.14/reference/h_record_all_output.html @@ -1,15 +1,31 @@ - -Capture all Output — h_record_all_output • mmrm + + + + + +Capture all Output — h_record_all_output • mmrm + + + + + + + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,41 +129,53 @@
    -

    Usage

    +

    Usage +

    h_record_all_output(expr, remove = list(), divergence = list())
    -

    Arguments

    +

    Arguments +

    -
    expr
    +
    +
    expr +

    (expression)
    to be executed.

    -
    remove
    +
    remove +

    (list)
    optional list with elements warnings, errors, messages which can be character vectors, which will be removed from the results if specified.

    -
    divergence
    +
    divergence +

    (list)
    optional list similar as remove, but these character vectors will be moved to the divergence result and signal that the fit did not converge.

    -
    + +
    -

    Value

    -

    A list containing

    • result: The object returned by expr or list() if an error was thrown.

    • +

      Value +

      +

      A list containing

      +
        +
      • result: The object returned by expr or list() if an error was thrown.

      • warnings: NULL or a character vector if warnings were thrown.

      • errors: NULL or a string if an error was thrown.

      • messages: NULL or a character vector if messages were produced.

      • divergence: NULL or a character vector if divergence messages were caught.

      • -
    + + + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_register_s3.html b/v0.3.14/reference/h_register_s3.html index 84a50a7af..d2e1bc3b5 100644 --- a/v0.3.14/reference/h_register_s3.html +++ b/v0.3.14/reference/h_register_s3.html @@ -1,13 +1,29 @@ - -Register S3 Method Register S3 method to a generic. — h_register_s3 • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,37 +126,47 @@
    -

    Usage

    +

    Usage +

    h_register_s3(pkg, generic, class, envir = parent.frame())
    -

    Arguments

    +

    Arguments +

    -
    pkg
    +
    +
    pkg +

    (string) name of the package name.

    -
    generic
    +
    generic +

    (string) name of the generic.

    -
    class
    +
    class +

    (string) class name the function want to dispatch.

    -
    envir
    +
    envir +

    (environment) the location the method is defined.

    -
    + +
    -

    Details

    +

    Details +

    This function is adapted from emmeans:::register_s3_method().

    + + - + + - + + diff --git a/v0.3.14/reference/h_residuals_normalized.html b/v0.3.14/reference/h_residuals_normalized.html index 98d5b149c..45446a6bd 100644 --- a/v0.3.14/reference/h_residuals_normalized.html +++ b/v0.3.14/reference/h_residuals_normalized.html @@ -1,11 +1,27 @@ - -Calculate normalized residuals — h_residuals_normalized • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_residuals_normalized(object)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_residuals_pearson.html b/v0.3.14/reference/h_residuals_pearson.html index da4f0c031..9d2c050e3 100644 --- a/v0.3.14/reference/h_residuals_pearson.html +++ b/v0.3.14/reference/h_residuals_pearson.html @@ -1,11 +1,27 @@ - -Calculate Pearson Residuals — h_residuals_pearson • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_residuals_pearson(object)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_residuals_response.html b/v0.3.14/reference/h_residuals_response.html index 6aa7307b0..a5f29a013 100644 --- a/v0.3.14/reference/h_residuals_response.html +++ b/v0.3.14/reference/h_residuals_response.html @@ -1,11 +1,27 @@ - -Calculate response residuals. — h_residuals_response • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_residuals_response(object)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_split_control.html b/v0.3.14/reference/h_split_control.html index 51a2a00a5..83897fcac 100644 --- a/v0.3.14/reference/h_split_control.html +++ b/v0.3.14/reference/h_split_control.html @@ -1,13 +1,29 @@ - -Split Control List — h_split_control • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,29 +126,37 @@
    -

    Usage

    +

    Usage +

    h_split_control(control, ...)
    -

    Arguments

    +

    Arguments +

    -
    control
    +
    +
    control +

    (mmrm_control)
    object.

    -
    ...
    +
    ... +

    additional parameters to update the control object.

    -
    + +
    -

    Value

    +

    Value +

    A list of mmrm_control entries.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_summarize_all_fits.html b/v0.3.14/reference/h_summarize_all_fits.html index 84f69913d..928756218 100644 --- a/v0.3.14/reference/h_summarize_all_fits.html +++ b/v0.3.14/reference/h_summarize_all_fits.html @@ -1,11 +1,27 @@ - -Summarizing List of Fits — h_summarize_all_fits • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_summarize_all_fits(all_fits)
    -

    Arguments

    +

    Arguments +

    -
    all_fits
    +
    +
    all_fits +

    (list of mmrm_fit or try-error)
    list of fits.

    -
    + +
    -

    Value

    +

    Value +

    List with warnings, messages, log_liks and converged results.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_tbl_confint_terms.html b/v0.3.14/reference/h_tbl_confint_terms.html index 9f69d182a..d4649cc23 100644 --- a/v0.3.14/reference/h_tbl_confint_terms.html +++ b/v0.3.14/reference/h_tbl_confint_terms.html @@ -1,11 +1,27 @@ - -Extract tibble with Confidence Intervals and Term Names — h_tbl_confint_terms • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,29 +123,37 @@
    -

    Usage

    +

    Usage +

    h_tbl_confint_terms(x, ...)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (mmrm)
    fit object.

    -
    ...
    +
    ... +

    passed to stats::confint(), hence not used at the moment.

    -
    + +
    -

    Value

    +

    Value +

    A tibble with term, conf.low, conf.high columns.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_test_1d.html b/v0.3.14/reference/h_test_1d.html index 5e48de9d3..c7ad254ad 100644 --- a/v0.3.14/reference/h_test_1d.html +++ b/v0.3.14/reference/h_test_1d.html @@ -1,13 +1,29 @@ - -Creating T-Statistic Test Results For One-Dimensional Contrast — h_test_1d • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,35 +126,44 @@
    -

    Usage

    +

    Usage +

    h_test_1d(object, contrast, df)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    contrast +

    (numeric)
    contrast vector. Note that this should not include elements for singular coefficient estimates, i.e. only refer to the actually estimated coefficients.

    -
    df
    +
    df +

    (number)
    degrees of freedom for the one-dimensional contrast.

    -
    + +
    -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val (2-sided p-value).

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_test_md.html b/v0.3.14/reference/h_test_md.html index 185e5bb01..84db56a4f 100644 --- a/v0.3.14/reference/h_test_md.html +++ b/v0.3.14/reference/h_test_md.html @@ -1,13 +1,29 @@ - -Creating F-Statistic Test Results For Multi-Dimensional Contrast — h_test_md • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,37 +126,47 @@
    -

    Usage

    +

    Usage +

    h_test_md(object, contrast, df, f_stat_factor = 1)
    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the MMRM fit.

    -
    contrast
    +
    contrast +

    (matrix)
    numeric contrast matrix.

    -
    df
    +
    df +

    (number)
    denominator degrees of freedom for the multi-dimensional contrast.

    -
    f_stat_factor
    +
    f_stat_factor +

    (number)
    optional scaling factor on top of the standard F-statistic.

    -
    + +
    -

    Value

    +

    Value +

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

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_tmb_warn_non_deterministic.html b/v0.3.14/reference/h_tmb_warn_non_deterministic.html index f3ec4d29d..7d98cf636 100644 --- a/v0.3.14/reference/h_tmb_warn_non_deterministic.html +++ b/v0.3.14/reference/h_tmb_warn_non_deterministic.html @@ -1,15 +1,31 @@ - -Warn if TMB is Configured to Use Non-Deterministic Hash for Tape Optimizer — h_tmb_warn_non_deterministic • mmrm + + + + + +Warn if TMB is Configured to Use Non-Deterministic Hash for Tape Optimizer — h_tmb_warn_non_deterministic • mmrm + + + + + + + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,17 +129,20 @@
    -

    Usage

    +

    Usage +

    h_tmb_warn_non_deterministic()
    -

    Value

    +

    Value +

    No return value, called for side effects.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_tr.html b/v0.3.14/reference/h_tr.html index 14cce5b06..3e009c181 100644 --- a/v0.3.14/reference/h_tr.html +++ b/v0.3.14/reference/h_tr.html @@ -1,11 +1,27 @@ - -Trace of a Matrix — h_tr • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    h_tr(x)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (matrix)
    square matrix input.

    -
    + +
    -

    Value

    +

    Value +

    The trace of the square matrix.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_valid_formula.html b/v0.3.14/reference/h_valid_formula.html index c347d5f3d..690d05ff4 100644 --- a/v0.3.14/reference/h_valid_formula.html +++ b/v0.3.14/reference/h_valid_formula.html @@ -1,11 +1,27 @@ - -Validate mmrm Formula — h_valid_formula • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,26 +123,33 @@
    -

    Usage

    +

    Usage +

    h_valid_formula(formula)
    -

    Arguments

    +

    Arguments +

    -
    formula
    +
    +
    formula +

    (formula)
    to check.

    -
    + +
    -

    Details

    +

    Details +

    In mmrm models, . is not allowed as it introduces ambiguity of covariates to be used, so it is not allowed to be in formula.

    + + - + + - + + diff --git a/v0.3.14/reference/h_var_adj.html b/v0.3.14/reference/h_var_adj.html index f36aeae7d..32f96a4c7 100644 --- a/v0.3.14/reference/h_var_adj.html +++ b/v0.3.14/reference/h_var_adj.html @@ -1,15 +1,31 @@ - -Obtain the Adjusted Covariance Matrix — h_var_adj • mmrm + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,45 +129,57 @@
    -

    Usage

    +

    Usage +

    h_var_adj(v, w, p, q, r, linear = FALSE)
    -

    Arguments

    +

    Arguments +

    -
    v
    +
    +
    v +

    (matrix)
    unadjusted covariance matrix.

    -
    w
    +
    w +

    (matrix)
    hessian matrix.

    -
    p
    +
    p +

    (matrix)
    P matrix from h_get_kr_comp().

    -
    q
    +
    q +

    (matrix)
    Q matrix from h_get_kr_comp().

    -
    r
    +
    r +

    (matrix)
    R matrix from h_get_kr_comp().

    -
    linear
    +
    linear +

    (flag)
    whether to use linear Kenward-Roger approximation.

    -
    + +
    -

    Value

    +

    Value +

    The matrix of adjusted covariance matrix.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/h_warn_na_action.html b/v0.3.14/reference/h_warn_na_action.html index f63364b46..cdd88f942 100644 --- a/v0.3.14/reference/h_warn_na_action.html +++ b/v0.3.14/reference/h_warn_na_action.html @@ -1,11 +1,27 @@ - -Warn on na.action — h_warn_na_action • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,12 +123,14 @@
    -

    Usage

    +

    Usage +

    h_warn_na_action()
    - + + - + + - + + diff --git a/v0.3.14/reference/h_within_or_between.html b/v0.3.14/reference/h_within_or_between.html index 20e7a9f56..a52d51ff9 100644 --- a/v0.3.14/reference/h_within_or_between.html +++ b/v0.3.14/reference/h_within_or_between.html @@ -1,13 +1,29 @@ - -Determine Within or Between for each Design Matrix Column — h_within_or_between • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,30 +126,38 @@
    -

    Usage

    +

    Usage +

    h_within_or_between(x_matrix, subject_ids)
    -

    Arguments

    +

    Arguments +

    -
    x_matrix
    +
    +
    x_matrix +

    (matrix)
    the design matrix with column names.

    -
    subject_ids
    +
    subject_ids +

    (factor)
    the subject IDs.

    -
    + +
    -

    Value

    +

    Value +

    Character vector with "intercept", "within" or "between" for each design matrix column identified via the names of the vector.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/index.html b/v0.3.14/reference/index.html index 030773a49..c307b8eff 100644 --- a/v0.3.14/reference/index.html +++ b/v0.3.14/reference/index.html @@ -1,11 +1,25 @@ - -Package index • mmrm + + + + + + + + + Skip to contents @@ -21,10 +35,12 @@ + + + + + @@ -91,217 +115,284 @@
    -

    Package

    +

    Package +

    -
    +
    +
    -
    +
    +
    mmrm-package
    -
    mmrm Package
    -
    -

    Functions

    +
    +mmrm Package
    + +
    +
    +

    Functions +

    -
    +
    +
    -
    +
    +
    mmrm() stable
    Fit an MMRM
    -
    +
    +
    +
    fit_mmrm() stable
    Low-Level Fitting Function for MMRM
    -
    +
    +
    +
    mmrm_control() stable
    Control Parameters for Fitting an MMRM
    -
    +
    +
    +
    fit_single_optimizer() stable
    Fitting an MMRM with Single Optimizer
    -
    +
    +
    +
    refit_multiple_optimizers() stable
    Refitting MMRM with Multiple Optimizers
    -
    +
    +
    +
    df_1d() stable
    Calculation of Degrees of Freedom for One-Dimensional Contrast
    -
    +
    +
    +
    df_md() stable
    Calculation of Degrees of Freedom for Multi-Dimensional Contrast
    -
    +
    +
    +
    component() stable
    Component Access for mmrm_tmb Objects
    -
    -

    Start Values

    + +
    +
    +

    Start Values +

    -
    +
    +
    -
    +
    +
    std_start()
    Standard Starting Value
    -
    +
    +
    +
    emp_start()
    Empirical Starting Value
    -
    -

    Methods

    + +
    +
    +

    Methods +

    -
    +
    +
    -

    Covariance Structures

    + +
    +
    +

    Covariance Structures +

    -
    +
    +
    -
    +
    +
    cov_struct() stable
    Define a Covariance Structure
    -
    +
    +
    +
    as.cov_struct() stable
    Coerce into a Covariance Structure Definition
    -
    +
    +
    +
    format(<cov_struct>)
    Format Covariance Structure Object
    -
    +
    +
    +
    print(<cov_struct>)
    Print a Covariance Structure Object
    -
    +
    +
    +
    cov_types() stable
    Covariance Types
    -
    -

    Estimate Marginal Means

    + +
    +
    +

    Estimate Marginal Means +

    -
    +
    +
    -
    +
    +
    emmeans_support stable
    -
    Support for emmeans
    -
    -

    Datasets

    +
    Support for emmeans +
    + +
    +
    +

    Datasets +

    -
    +
    +
    -
    +
    +
    fev_data stable
    Example Data on FEV1
    -
    +
    +
    +
    bcva_data stable
    Example Data on BCVA
    -
    + + + + - + + - + + diff --git a/v0.3.14/reference/is_infix.html b/v0.3.14/reference/is_infix.html index 16d216d90..3cebbc430 100644 --- a/v0.3.14/reference/is_infix.html +++ b/v0.3.14/reference/is_infix.html @@ -1,11 +1,27 @@ - -Test Whether a Symbol is an Infix Operator — is_infix • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,30 +123,41 @@
    -

    Usage

    +

    Usage +

    is_infix(name)
    -

    Arguments

    +

    Arguments +

    -
    name
    +
    +
    name +

    (symbol or name or string)
    a possible reference to an infix operator to check.

    -
    + +
    -

    Value

    +

    Value +

    A logical indicating whether the name is the name of an infix operator.

    -

    is_infix(as.name("|"))
    +

    +
    +
    is_infix(as.name("|"))
     is_infix("|")
    -is_infix("c")

    +is_infix("c")
    +

    +
    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/mmrm-package.html b/v0.3.14/reference/mmrm-package.html index 7d4cf94bb..2c5efca54 100644 --- a/v0.3.14/reference/mmrm-package.html +++ b/v0.3.14/reference/mmrm-package.html @@ -1,11 +1,27 @@ - -mmrm Package — mmrm-package • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + +
    @@ -98,15 +125,23 @@
    -

    See also

    -
    -

    Author

    +

    Author +

    Maintainer: Daniel Sabanes Bove daniel.sabanes_bove@rconis.com (ORCID)

    -

    Authors:

    + +
    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/mmrm.html b/v0.3.14/reference/mmrm.html index ee8a81559..ce6e5290e 100644 --- a/v0.3.14/reference/mmrm.html +++ b/v0.3.14/reference/mmrm.html @@ -1,13 +1,29 @@ - -Fit an MMRM — mmrm • mmrm + + + + + + + + + + + Skip to contents @@ -23,10 +39,12 @@ + + + + + @@ -100,7 +126,8 @@
    -

    Usage

    +

    Usage +

    mmrm(
       formula,
       data,
    @@ -113,49 +140,61 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    formula
    +
    +
    formula +

    (formula)
    the model formula, see details.

    -
    data
    +
    data +

    (data)
    the data to be used for the model.

    -
    weights
    +
    weights +

    (vector)
    an optional vector of weights to be used in the fitting process. Should be NULL or a numeric vector.

    -
    covariance
    +
    covariance +

    (cov_struct)
    a covariance structure type definition as produced with cov_struct(), or value that can be coerced to a covariance structure using as.cov_struct(). If no value is provided, a structure is derived from the provided formula.

    -
    reml
    +
    reml +

    (flag)
    whether restricted maximum likelihood (REML) estimation is used, otherwise maximum likelihood (ML) is used.

    -
    control
    +
    control +

    (mmrm_control)
    fine-grained fitting specifications list created with mmrm_control().

    -
    ...
    +
    ... +

    arguments passed to mmrm_control().

    -
    + +
    -

    Value

    +

    Value +

    An mmrm object.

    -

    Details

    +

    Details +

    The formula typically looks like: FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID) so specifies response and covariates as usual, and exactly one special term @@ -181,15 +220,19 @@

    Detailsmmrm.

    -

    Note

    +

    Note +

    The mmrm object is also an mmrm_fit and an mmrm_tmb object, therefore corresponding methods also work (see mmrm_tmb_methods).

    -

    Additional contents depend on the choice of the adjustment method:

    • If Satterthwaite adjustment is used, the Jacobian information jac_list +

      Additional contents depend on the choice of the adjustment method:

      +
        +
      • If Satterthwaite adjustment is used, the Jacobian information jac_list is included.

      • If Kenward-Roger adjustment is used, kr_comp contains necessary components and beta_vcov_adj includes the adjusted coefficients covariance matrix.

      • -

      Use of the package emmeans is supported, see emmeans_support.

      +
    +

    Use of the package emmeans is supported, see emmeans_support.

    NA values are always omitted regardless of na.action setting.

    When the number of visit levels is large, it usually requires large memory to create the covariance matrix. By default, the maximum allowed visit levels is 100, and if there are more @@ -200,7 +243,8 @@

    Note

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -224,7 +268,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/v0.3.14/reference/mmrm_control.html b/v0.3.14/reference/mmrm_control.html index c391242c3..27a338e3f 100644 --- a/v0.3.14/reference/mmrm_control.html +++ b/v0.3.14/reference/mmrm_control.html @@ -1,15 +1,31 @@ - -Control Parameters for Fitting an MMRM — mmrm_control • mmrm + + + + + +Control Parameters for Fitting an MMRM — mmrm_control • mmrm + + + + + + + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,7 +129,8 @@
    -

    Usage

    +

    Usage +

    mmrm_control(
       n_cores = 1L,
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within"),
    @@ -117,50 +144,63 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    n_cores
    +
    +
    n_cores +

    (count)
    number of cores to be used.

    -
    method
    +
    method +

    (string)
    adjustment method for degrees of freedom.

    -
    vcov
    +
    vcov +

    (string)
    coefficients covariance matrix adjustment method.

    -
    start
    +
    start +

    (NULL, numeric or function)
    optional start values for variance parameters. See details for more information.

    -
    accept_singular
    +
    accept_singular +

    (flag)
    whether singular design matrices are reduced to full rank automatically and additional coefficient estimates will be missing.

    -
    drop_visit_levels
    +
    drop_visit_levels +

    (flag)
    whether to drop levels for visit variable, if visit variable is a factor, see details.

    -
    ...
    +
    ... +

    additional arguments passed to h_get_optimizers().

    -
    optimizers
    +
    optimizers +

    (list)
    optimizer specification, created with h_get_optimizers().

    -
    + +
    -

    Value

    +

    Value +

    List of class mmrm_control with the control parameters.

    -

    Details

    +

    Details +

    For example, if the data only has observations at visits VIS1, VIS3 and VIS4, by default they are treated to be equally spaced, the distance from VIS1 to VIS3, and from VIS3 to VIS4, are identical. However, you can manually convert this visit into a factor, with @@ -168,14 +208,45 @@

    DetailsVIS1 to VIS3 will be double, as VIS2 is a valid visit. However, please be cautious because this can lead to convergence failure when using an unstructured covariance matrix and there are no observations -at the missing visits.

    + +
    -

    Examples

    +

    Examples +

    mmrm_control(
       optimizer_fun = stats::optim,
       optimizer_args = list(method = "L-BFGS-B")
    @@ -311,7 +384,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/v0.3.14/reference/mmrm_methods.html b/v0.3.14/reference/mmrm_methods.html index 6a21a3ade..49e87e122 100644 --- a/v0.3.14/reference/mmrm_methods.html +++ b/v0.3.14/reference/mmrm_methods.html @@ -1,11 +1,27 @@ - -Methods for mmrm Objects — mmrm_methods • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for class 'mmrm'
     summary(object, ...)
     
    @@ -114,52 +141,71 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm)
    the fitted MMRM including Jacobian and call etc.

    -
    ...
    +
    ... +

    not used.

    -
    + +
    -

    Value

    +

    Value +

    Depends on the method, see Details and Functions.

    -

    Details

    -

    While printing the summary of (mmrm)
    object, the following will be displayed:

    1. Formula. The formula used in the model.

    2. +

      Details +

      +

      While printing the summary of (mmrm)
      object, the following will be displayed:

      +
        +
      1. Formula. The formula used in the model.

      2. Data. The data used for analysis, including number of subjects, number of valid observations.

      3. Covariance. The covariance structure and number of variance parameters.

      4. Method. Restricted maximum likelihood(REML) or maximum likelihood(ML).

      5. Model selection criteria. AIC, BIC, log likelihood and deviance.

      6. Coefficients. Coefficients of the covariates.

      7. -
      8. Covariance estimate. The covariance estimate(for each group).

        1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available +

        2. +

          Covariance estimate. The covariance estimate(for each group).

          +
            +
          1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available in data will be displayed.

          2. If the covariance structure is spatial, the covariance matrix of two time points with unit distance will be displayed.

          3. -
        3. -

        confint is used to obtain the confidence intervals for the coefficients. +

      + +
    +

    confint is used to obtain the confidence intervals for the coefficients. Please note that this is different from the confidence interval of difference of least square means from emmeans.

    -

    Functions

    +

    Functions +

    -
    • summary(mmrm): summarizes the MMRM fit results.

    • +
        +
      • summary(mmrm): summarizes the MMRM fit results.

      • print(summary.mmrm): prints the MMRM fit summary.

      • confint(mmrm): obtain the confidence intervals for the coefficients.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_tmb_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- mmrm(formula, fev_data)
     # Summary:
    @@ -230,7 +276,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/v0.3.14/reference/mmrm_tidiers.html b/v0.3.14/reference/mmrm_tidiers.html index 13e64e0e3..eedd3e0ec 100644 --- a/v0.3.14/reference/mmrm_tidiers.html +++ b/v0.3.14/reference/mmrm_tidiers.html @@ -1,15 +1,31 @@ - -Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm + + + + + +Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm + + + + + + + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,7 +129,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for class 'mmrm'
     tidy(x, conf.int = FALSE, conf.level = 0.95, ...)
     
    @@ -122,56 +149,72 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (mmrm)
    fitted model.

    -
    conf.int
    +
    conf.int +

    (flag)
    if TRUE columns for the lower (conf.low) and upper bounds (conf.high) of coefficient estimates are included.

    -
    conf.level
    +
    conf.level +

    (number)
    defines the range of the optional confidence internal.

    -
    ...
    +
    ... +

    only used by augment() to pass arguments to the predict.mmrm_tmb() method.

    -
    newdata
    +
    newdata +

    (data.frame or NULL)
    optional new data frame.

    -
    interval
    +
    interval +

    (string)
    type of interval calculation.

    -
    se_fit
    +
    se_fit +

    (flag)
    whether to return standard errors of fit.

    -
    type.residuals
    +
    type.residuals +

    (string)
    passed on to residuals.mmrm_tmb().

    -
    + +
    -

    Functions

    +

    Functions +

    -
    • tidy(mmrm): derives tidy tibble from an mmrm object.

    • +
        +
      • tidy(mmrm): derives tidy tibble from an mmrm object.

      • glance(mmrm): derives glance tibble from an mmrm object.

      • augment(mmrm): derives augment tibble from an mmrm object.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tmb_methods for additional methods.

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -263,7 +306,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/v0.3.14/reference/mmrm_tmb_methods.html b/v0.3.14/reference/mmrm_tmb_methods.html index 74ee9246e..bd400e74f 100644 --- a/v0.3.14/reference/mmrm_tmb_methods.html +++ b/v0.3.14/reference/mmrm_tmb_methods.html @@ -1,11 +1,27 @@ - -Methods for mmrm_tmb Objects — mmrm_tmb_methods • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for class 'mmrm_tmb'
     coef(object, complete = TRUE, ...)
     
    @@ -171,110 +198,137 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    object
    +
    +
    object +

    (mmrm_tmb)
    the fitted MMRM object.

    -
    complete
    +
    complete +

    (flag)
    whether to include potential non-estimable coefficients.

    -
    ...
    +
    ... +

    mostly not used; Exception is model.matrix() passing ... to the default method.

    -
    newdata
    +
    newdata +

    (data.frame)
    optional new data, otherwise data from object is used.

    -
    se.fit
    +
    se.fit +

    (flag)
    indicator if standard errors are required.

    -
    interval
    +
    interval +

    (string)
    type of interval calculation. Can be abbreviated.

    -
    level
    +
    level +

    (number)
    tolerance/confidence level.

    -
    nsim
    +
    nsim +

    (count)
    number of simulations to use.

    -
    conditional
    +
    conditional +

    (flag)
    indicator if the prediction is conditional on the observation or not.

    -
    formula
    +
    formula +

    (mmrm_tmb)
    same as object.

    -
    data
    +
    data +

    (data.frame)
    object in which to construct the frame.

    -
    include
    +
    include +

    (character)
    names of variable types to include. Must be NULL or one or more of c("subject_var", "visit_var", "group_var", "response_var").

    -
    full
    +
    full +

    (flag)
    indicator whether to return full model frame (deprecated).

    -
    na.action
    +
    na.action +

    (string)
    na action.

    -
    use_response
    +
    use_response +

    (flag)
    whether to use the response for complete rows.

    -
    x
    +
    x +

    (mmrm_tmb)
    same as object.

    -
    sigma
    +
    sigma +

    cannot be used (this parameter does not exist in MMRM).

    -
    corrected
    +
    corrected +

    (flag)
    whether corrected AIC should be calculated.

    -
    k
    +
    k +

    (number)
    the penalty per parameter to be used; default k = 2 is the classical AIC.

    -
    type
    +
    type +

    (string)
    unscaled (response), pearson or normalized. Default is response, and this is the only type available for use with models with a spatial covariance structure.

    -
    seed
    +
    seed +

    unused argument from stats::simulate().

    -
    method
    +
    method +

    (string)
    simulation method to use. If "conditional", simulated values are sampled given the estimated covariance matrix of object. If "marginal", the variance of the estimated covariance matrix is taken into account.

    -
    + +
    -

    Value

    +

    Value +

    Depends on the method, see Functions.

    -

    Details

    +

    Details +

    include argument controls the variables the returned model frame will include. Possible options are "response_var", "subject_var", "visit_var" and "group_var", representing the response variable, subject variable, visit variable or group variable. @@ -282,9 +336,11 @@

    Detailsmodel.matrix.

    -

    Functions

    +

    Functions +

    -
    • coef(mmrm_tmb): obtains the estimated coefficients.

    • +
        +
      • coef(mmrm_tmb): obtains the estimated coefficients.

      • fitted(mmrm_tmb): obtains the fitted values.

      • predict(mmrm_tmb): predict conditional means for new data; optionally with standard errors and confidence or prediction intervals. @@ -317,21 +373,29 @@

        Functions -

        References

        +

        References +

        -
        • hurvich1989regressionmmrm

        • +
            +
          • hurvich1989regressionmmrm

          • burnham1998practicalmmrm

          • -
          • galecki2013linearmmrm

          • -
    + +
      +
    • galecki2013linearmmrm

    • +
    +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- fit_mmrm(formula, fev_data, weights = rep(1, nrow(fev_data)))
     # Estimated coefficients:
    @@ -3870,7 +3934,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/v0.3.14/reference/parsnip_add_mmrm.html b/v0.3.14/reference/parsnip_add_mmrm.html index e3c35c51d..7a2452ca2 100644 --- a/v0.3.14/reference/parsnip_add_mmrm.html +++ b/v0.3.14/reference/parsnip_add_mmrm.html @@ -1,11 +1,27 @@ - -Register mmrm For Use With tidymodels — parsnip_add_mmrm • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + +
    @@ -97,30 +124,38 @@
    -

    Usage

    +

    Usage +

    parsnip_add_mmrm(quietly = FALSE)
    -

    Arguments

    +

    Arguments +

    -
    quietly
    +
    +
    quietly +

    logical: should progress and error messages be suppressed?

    -
    + +
    -

    Value

    +

    Value +

    A logical value indicating whether registration was successful.

    -

    Details

    +

    Details +

    We can use parsnip::show_model_info("linear_reg") to check the registration with parsnip and thus the wider tidymodels ecosystem.

    + + - + + - + + diff --git a/v0.3.14/reference/position_symbol.html b/v0.3.14/reference/position_symbol.html index 3dfcc412c..91d476b54 100644 --- a/v0.3.14/reference/position_symbol.html +++ b/v0.3.14/reference/position_symbol.html @@ -1,15 +1,31 @@ - -Search For the Position of a Symbol — position_symbol • mmrm + + + + + +Search For the Position of a Symbol — position_symbol • mmrm + + + + + + + + + + Skip to contents @@ -25,10 +41,12 @@ + + + + + @@ -103,36 +129,45 @@
    -

    Usage

    +

    Usage +

    position_symbol(x, sym, ...)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (list of language)
    a list of language objects in which to search for a specific symbol.

    -
    sym
    +
    sym +

    (name or symbol or character)
    a symbol to search for in x.

    -
    ...
    +
    ... +

    Additional arguments passed to Position().

    -
    + +
    -

    Value

    +

    Value +

    The position of the symbol if found, or the nomatch value otherwise.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/print.cov_struct.html b/v0.3.14/reference/print.cov_struct.html index ceddccebe..63c2502a2 100644 --- a/v0.3.14/reference/print.cov_struct.html +++ b/v0.3.14/reference/print.cov_struct.html @@ -1,11 +1,27 @@ - -Print a Covariance Structure Object — print.cov_struct • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,30 +123,38 @@
    -

    Usage

    +

    Usage +

    # S3 method for class 'cov_struct'
     print(x, ...)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (cov_struct)
    a covariance structure object.

    -
    ...
    +
    ... +

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    x invisibly.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/reexports.html b/v0.3.14/reference/reexports.html index 911ec47bc..00f7586c9 100644 --- a/v0.3.14/reference/reexports.html +++ b/v0.3.14/reference/reexports.html @@ -1,25 +1,41 @@ - -Objects exported from other packages — reexports • mmrm + + + + + +Objects exported from other packages — reexports • mmrm + + + + + + + + + + Skip to contents @@ -35,10 +51,12 @@ + + + + + @@ -109,15 +135,18 @@

    These objects are imported from other packages. Follow the links below to see their documentation.

    -
    generics
    +
    +
    generics

    augment, glance, tidy

    -
    + + - + +
    -
    - + + - + + diff --git a/v0.3.14/reference/refit_multiple_optimizers.html b/v0.3.14/reference/refit_multiple_optimizers.html index 66ab9efaf..bef2ce738 100644 --- a/v0.3.14/reference/refit_multiple_optimizers.html +++ b/v0.3.14/reference/refit_multiple_optimizers.html @@ -1,11 +1,27 @@ - -Refitting MMRM with Multiple Optimizers — refit_multiple_optimizers • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,37 +123,47 @@
    -

    Usage

    +

    Usage +

    refit_multiple_optimizers(fit, ..., control = mmrm_control(...))
    -

    Arguments

    +

    Arguments +

    -
    fit
    +
    +
    fit +

    (mmrm_fit)
    original model fit from fit_single_optimizer().

    -
    ...
    +
    ... +

    Additional arguments passed to mmrm_control().

    -
    control
    +
    control +

    (mmrm_control)
    object.

    -
    + +
    -

    Value

    +

    Value +

    The best (in terms of log likelihood) fit which converged.

    -

    Note

    +

    Note +

    For Windows, no parallel computations are currently implemented.

    -

    Examples

    +

    Examples +

    fit <- fit_single_optimizer(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data,
    @@ -138,7 +174,8 @@ 

    Examples

    + +
    - + + - + + diff --git a/v0.3.14/reference/register_on_load.html b/v0.3.14/reference/register_on_load.html index 3b9239572..cb9cb1680 100644 --- a/v0.3.14/reference/register_on_load.html +++ b/v0.3.14/reference/register_on_load.html @@ -1,11 +1,27 @@ - -Helper Function for Registering Functionality With Suggests Packages — register_on_load • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,7 +123,8 @@
    -

    Usage

    +

    Usage +

    register_on_load(
       pkg,
       ver = c(NA_character_, NA_character_),
    @@ -107,39 +134,48 @@ 

    Usage

    -

    Arguments

    +

    Arguments +

    -
    pkg
    +
    +
    pkg +

    (string)
    package name.

    -
    ver
    +
    ver +

    (character)
    of length 2 whose elements can be provided to numeric_version(), representing a minimum and maximum (inclusive) version requirement for interoperability. When NA, no version requirement is imposed. Defaults to no version requirement.

    -
    callback
    +
    callback +

    (function(...) ANY)
    a callback to execute upon package load. Note that no arguments are passed to this function. Any necessary data must be provided upon construction.

    -
    message
    +
    message +

    (NULL or string)
    an optional message to print after the callback is executed upon successful registration.

    -
    + +
    -

    Value

    +

    Value +

    A logical (invisibly) indicating whether registration was successful. If not, a onLoad hook was set for the next time the package is loaded.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/std_start.html b/v0.3.14/reference/std_start.html index 55fc22f86..53e49cf43 100644 --- a/v0.3.14/reference/std_start.html +++ b/v0.3.14/reference/std_start.html @@ -1,11 +1,27 @@ - -Standard Starting Value — std_start • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,36 +123,46 @@
    -

    Usage

    +

    Usage +

    std_start(cov_type, n_visits, n_groups, ...)
    -

    Arguments

    +

    Arguments +

    -
    cov_type
    +
    +
    cov_type +

    (string)
    name of the covariance structure.

    -
    n_visits
    +
    n_visits +

    (int)
    number of visits.

    -
    n_groups
    +
    n_groups +

    (int)
    number of groups.

    -
    ...
    +
    ... +

    not used.

    -
    + +
    -

    Value

    +

    Value +

    A numeric vector of starting values.

    -

    Details

    +

    Details +

    std_start will try to provide variance parameter from identity matrix. However, for ar1 and ar1h the corresponding values are not ideal because the \(\rho\) is usually a positive number thus using 0 as starting value can lead to @@ -134,7 +170,8 @@

    Details

    + + - + + - + + diff --git a/v0.3.14/reference/tmb_cov_type.html b/v0.3.14/reference/tmb_cov_type.html index e02f932fc..d72b8911f 100644 --- a/v0.3.14/reference/tmb_cov_type.html +++ b/v0.3.14/reference/tmb_cov_type.html @@ -1,11 +1,27 @@ - -Produce A Covariance Identifier Passing to TMB — tmb_cov_type • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    tmb_cov_type(cov)
    -

    Arguments

    +

    Arguments +

    -
    cov
    +
    +
    cov +

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    A string used for method dispatch when passed to TMB.

    + +
    -
    - + + - + + diff --git a/v0.3.14/reference/validate_cov_struct.html b/v0.3.14/reference/validate_cov_struct.html index 82a476e42..facc0f77b 100644 --- a/v0.3.14/reference/validate_cov_struct.html +++ b/v0.3.14/reference/validate_cov_struct.html @@ -1,11 +1,27 @@ - -Validate Covariance Structure Data — validate_cov_struct • mmrm + + + + + + + + + + + Skip to contents @@ -21,10 +37,12 @@ + + + + + @@ -97,25 +123,32 @@
    -

    Usage

    +

    Usage +

    validate_cov_struct(x)
    -

    Arguments

    +

    Arguments +

    -
    x
    +
    +
    x +

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    x if successful, or an error is thrown otherwise.

    + +
    -
    - + + - + + diff --git a/v0.3.2/404.html b/v0.3.2/404.html index cdbfaee46..26d4d9ec1 100644 --- a/v0.3.2/404.html +++ b/v0.3.2/404.html @@ -1,5 +1,4 @@ - - + @@ -81,11 +80,10 @@ Changelog +v0.2.2 + + - + + - + @@ -110,46 +136,66 @@

    Thank you for your interest in contributing to this repo! Your contribution is highly valued. Please go through this document for guidance on how to contribute.

    -

    Programming conventions

    +

    Programming conventions +

    Please follow the programming conventions to ensure a consistent programming style across the package.

    Generally we follow the tidyverse style guide. Some specific conventions that deviate from this are explained below.

    -

    Functions

    -
    1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
    2. +

      Functions +

      +
        +
      1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
      2. Functions starting with h_ are helper functions and they should not be exported.
      3. Functions should be well documented using roxygen2 (even when they are not exported).
      4. Functions must be unit tested (even when they are not exported).
      5. -
    + +
    -

    Imports

    +

    Imports +

    In package mmrm, we follow the following convention in package imports.

    -
    1. When only a few functions from another package are needed: -
      1. In DESCRIPTION, add that package into Imports.
      2. +
          +
        1. When only a few functions from another package are needed: +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we add a importFrom with a single function from the package. -
            1. The function imported can be any random function within the package.
            2. -
          3. +
              +
            1. The function imported can be any random function within the package.
            2. +
            +
          4. Always use package::function style wherever you need to use the function.
          5. Example: stats.
          6. -
        2. +
        +
      3. When many functions from another package are needed: -
        1. In DESCRIPTION, add that package into Imports.
        2. +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we use a import to import every function.
          3. Use the functions directly without prefix.
          4. Example: checkmate.
          5. -
          -
    + + + +
    -

    Comments

    -
    • Comments should always follow sentence style.
    • +

      Comments +

      +
        +
      • Comments should always follow sentence style.
      • Comments should be as minimal as possible: Generally the code and variable names should be clear enough to not need any comments. Only use them when needed and explain the “Why” and not the “What”.
      • -
    + +
    -

    Documentation

    -
    • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

    • +

      Documentation +

      +
        +
      • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

      • Exported objects must have a lifecycle badge to clarify the maturity.

        -
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • -
      • +
          +
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • +
        +
      • Use Title Style for the title of the documentation.

      • Always include a @description part with at least one sentence describing the object.

      • @@ -161,38 +207,55 @@

        Documentationwebsite.

      • In vignettes, you cannot directly reference help pages but only pkgdown web pages. Note that this includes only exported objects. To make it look similar to the help page references, please here also use function() style.

      • mmrm_review_methods.Rmd is a large vignette and we precompute this vignette to make the GitHub actions faster. Run the script vignettes/precompile.R to regenerate the precomputed vignette and subsequently update it in GitHub. Before every release we need to run this again. Please note you need to install the package and then compile the vignette because efficiency is better after installation to provide a fair comparison.

      • -
    + +
    -

    Github conventions

    +

    Github conventions +

    When using GitHub to collaborate, the following conventions are needed:

    -
    1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. -
      • If you are going to work on this issue, please assign yourself.
      • -
    2. +
        +
      1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. +
          +
        • If you are going to work on this issue, please assign yourself.
        • +
        +
      2. Please create a branch in the mmrm repository, instead of creating forks, unless you are not yet a team member. -
        • Branches should be associated with a GitHub issue and linked to an issue id.
        • +
            +
          • Branches should be associated with a GitHub issue and linked to an issue id.
          • The name of a branch should be of the form: <issue_id>_<short_discription>.
          • -
          +
        +
      3. Add changes to the branch and push it to GitHub. -
        • Please use clear commit messages.
        • +
            +
          • Please use clear commit messages.
          • Please keep your changes focused on the issue. If there are independent changes, please separate it into another PR linking to another issue.
          • -
          +
        +
      4. Please create a Pull Request when you think your code changes are ready: -
        • Functions are well documented.
        • +
            +
          • Functions are well documented.
          • Functions have corresponding unit tests.
          • Changes pass all the GitHub action checks.
          • The checklist in the corresponding issue is completed.
          • -
          +
        +
      5. Address all the comments you receive. -
        • at least one approval is needed to merge.
        • -
      6. -
    +
      +
    • at least one approval is needed to merge.
    • +
    + + +
    -

    Contribution tips

    +

    Contribution tips +

    -

    Development environment Set-up

    +

    Development environment Set-up +

    The development this mmrm package is based on the latest R version and C++ compilers. The package dependencies are the most recent versions from CRAN. We recommend that your working environment is set up in the same way. Additionally, there are some tools we recommend you to install:

    -
    1. +
        +
      1. RTools if you work on a Windows operating system. Alternatively you can use docker to separate the operating system and the development system.
      2. GitKraken is a very useful user interface for git including visualization of git commit graphs, file history, etc.
      3. @@ -200,43 +263,82 @@

        Development environment Set-uplintr will allow you to perform static code analysis.
      4. pre-commit is a Python module that allows you to identify issues before you commit locally.
      5. -

    + +
    -

    Issue labels

    +

    Issue labels +

    The issues are categorized with several labels:

    - +
    Label name
    ++++ + + - + + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + -
    Label name Description
    SPx
    SPx SP (story points) indicate complexity, and the larger the subsequent number, the more time consuming the issue is expected to be
    priority
    priority Issues with this label should be completed with higher priority
    good first issue
    good first issue Good choices for new team members
    blocked
    blocked Blocked by other issues
    bug
    bug Something isn’t working
    devops
    devops Development and Operation
    discussion
    discussion Discussion needed
    documentation
    documentation Improvement of documentation is needed
    duplicate
    duplicate The issue already exists
    enhancement
    enhancement New feature or request
    help wanted
    help wanted Extra attention is needed
    invalid
    invalid This doesn’t seem right
    question
    question Further information needed

    Please choose an issue based on your interest, issue complexity, and priority.

    + + + +

    Please choose an issue based on your interest, issue complexity, and priority.

    -

    Add new unit tests

    +

    Add new unit tests +

    To add a new unit test, you need to first identify the test scope. Does the test fit in the scope of existing tests? If so, please modify the existing test files under tests/testthat/ folder or src/ folder, depending on whether the code to be tested is R or C++. Otherwise please create a new test file, with a name prefix of “test-”.

    In each test case, use the following structure:

    @@ -249,19 +351,25 @@ 

    Add new unit tests -

    Add integration tests

    +

    Add integration tests +

    Integration tests compare the results of SAS and R and assures the quality of our code. To add an integration test, you need to do the following:

    -
    1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
    2. +
        +
      1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
      2. Save the results in .txt format in the design/SAS/ folder.
      3. Decide the key outputs that are needed for comparison.
      4. Add a unit test verifying that the R implementation of the same model has the same results (conversion may be needed).
      5. -
    + +
    -

    Get started with C++

    +

    Get started with C++ +

    If you have no experience with C++, it is totally fine: TMB has provided us with many high-level functionalities that is very similar to R. Here we only list the most important things that you need to go through before you begin C++ programming.

    -
    1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
    2. +
        +
      1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
      2. Types. C++ is a strong type programming language and all objects need to be declared with type. Sometimes you can combine the declaration and definition. -
        1. +
            +
          1. int i = 1; This works, as we declare i as int and define it to be 1.
          2. i = 1; This fails, because i is not declared yet.
          3. @@ -269,53 +377,70 @@

            Get started with C++
          4. in R, if (TRUE) { a = '123' }; print(a) is legal.
          5. +
              +
            1. in R, if (TRUE) { a = '123' }; print(a) is legal.
            2. in C++, if (1) {string a = '123'}; std::stdout << a << std::endl; is illegal, because object a is terminated already.
            3. in C++, string a; if (1) {a = '123'}; std::stdout << a << std::endl; is legal, a is declared prior to if statement.
            4. -
            +

          +
        2. Polymorphism. Unlike in R, where function arguments have no explicitly defined types, in C++ the type of each argument of a function must be pre-specified. -
          1. +
              +
            1. Template is a special function that works with generic argument type. We could imagine a single function that could work on arguments of arbitrary type, and template functions make this possible through separation of function logic from the argument declaration. In this way we can use template functions and avoid the need to replicate the whole code for each type.
            2. -
          2. -

          With these points in mind, you are about ready to go.

          +
        +
      3. +
      +

      With these points in mind, you are about ready to go.

    -

    Get started with TMB

    +

    Get started with TMB +

    In mmrm we are not including any latent variables and so the Laplace approximation aspect of TMB is not used. We only use the automatic differentiation part of TMB. For detailed documentation of TMB, visit the TMB reference.

    One important feature of TMB are the R style matrix/array calculations. This is important because we mainly use this part to conduct our calculations. See matrix_arrays.cpp for examples.

    -

    Add a new covariance structure

    +

    Add a new covariance structure +

    To add a new covariance structure, you need to do the following:

    -
    1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
    2. +
        +
      1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
      2. Implement the covariance structure on the C++ side and the corresponding R interface.
      3. Add unit tests to make sure the new covariance structure is working as expected.
      4. Add integration tests under design/SAS/ folder to make sure SAS and R produce similar results (within tolerance).
      5. -
    + +
    -

    Add additional data

    +

    Add additional data +

    To add additional data to mmrm, please follow the next steps:

    -
    1. Make sure the data is needed.
    2. +
        +
      1. Make sure the data is needed.
      2. Document the data in R/data.R.
      3. Use save to create an rda data only containing this dataset. Here the function usethis::use_data can also be helpful.
      4. -
    + +
    -

    Communications within team

    +

    Communications within team +

    There are several communication channels, please use appropriate ones.

    -

    GitHub

    +

    GitHub +

    GitHub issues and pull requests are where implementations are discussed and reviewed. Feature requests, bugs, enhancements, technical implementations can be discussed here. When you have ideas that needs to be documented, it is better to have them in GitHub.

    -

    Slack

    +

    Slack +

    Slack is a messaging tool and we have the mmrm channel under the rinpharma space. You can put anything in the slack channel, e.g., you have completed a issue and are waiting for review, or you have some questions and don’t want to wait until the next stand-up meeting.

    To join the slack channel, please make sure you have a slack account, and send the email address to any team member.

    -

    Stand-up meetings

    +

    Stand-up meetings +

    We have stand-up meetings currently three times a week. The purpose of stand-up meetings is for team members to discuss the current work progress and raise any issue/questions for team discussion if needed.

    You don’t need to join all three meetings.

    @@ -323,22 +448,26 @@

    Stand-up meetings

    + + + + - - + + diff --git a/v0.3.2/PULL_REQUEST_TEMPLATE.html b/v0.3.2/PULL_REQUEST_TEMPLATE.html index b186fb0cc..c26007f01 100644 --- a/v0.3.2/PULL_REQUEST_TEMPLATE.html +++ b/v0.3.2/PULL_REQUEST_TEMPLATE.html @@ -1,5 +1,23 @@ - -Description • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +44,8 @@ + - + + - + @@ -111,22 +137,26 @@ - + +
    -
    + + - - + + diff --git a/v0.3.2/articles/algorithm.html b/v0.3.2/articles/algorithm.html index 7a2342df9..60b499923 100644 --- a/v0.3.2/articles/algorithm.html +++ b/v0.3.2/articles/algorithm.html @@ -1,5 +1,4 @@ - - + @@ -83,11 +82,10 @@ Changelog +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + - + + - + @@ -109,73 +135,101 @@

    Introduction

    -
    Package Introduction
    +
    +
    Package Introduction
    -
    Mixed Models for Repeated Measures
    + +
    Mixed Models for Repeated Measures
    -
    Comparison with other software
    + +
    Comparison with other software
    -
    + +
    +

    Covariance Structures

    -
    Covariance Structures
    +
    +
    Covariance Structures
    -
    + + + + + + + + + + + + + + + + +
    -
    + + - - + + diff --git a/v0.3.2/articles/introduction.html b/v0.3.2/articles/introduction.html index fa8004489..6d54ccca5 100644 --- a/v0.3.2/articles/introduction.html +++ b/v0.3.2/articles/introduction.html @@ -1,5 +1,4 @@ - - + @@ -83,11 +82,10 @@ Changelog +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + - + + - + @@ -108,7 +134,8 @@

    Authors

    -
    • +
        +
      • Daniel Sabanes Bove. Author, maintainer.

      • @@ -180,7 +207,8 @@

        Authors

        AstraZeneca plc. Copyright holder, funder.

        -
    + +

    Citation

    @@ -199,22 +227,26 @@

    Citation

    }
    + +
    -
    + + - - + + diff --git a/v0.3.2/index.html b/v0.3.2/index.html index d371e9d84..c692d586a 100644 --- a/v0.3.2/index.html +++ b/v0.3.2/index.html @@ -1,5 +1,4 @@ - - + @@ -107,11 +106,10 @@ Changelog +v0.2.2 + + - + + - + @@ -107,10 +133,13 @@
    -

    mmrm 0.3.2

    +

    mmrm 0.3.2 +

    -

    New Features

    -
    • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
    • +

      New Features +

      +
        +
      • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
      • Add empirical, empirical Jackknife and empirical bias-reduced adjusted coefficients covariance estimates, which can be specified via the new vcov argument of mmrm().
      • Add residual and between-within degrees of freedom methods.
      • Add Kenward-Roger support for spatial covariance structures.
      • @@ -121,74 +150,103 @@

        New FeaturesAdd tidy(), glance() and augment() methods to tidy the fit results into summary tables.
      • Add tidymodels framework support via a parsnip interface.
      • Add argument covariance to mmrm() to allow for easier programmatic access to specifying the model’s covariance structure and to expose covariance customization through the tidymodels interface.
      • -

    + +
    -

    Bug Fixes

    -
    • Previously mmrm() follows the global option na.action and if it is set other than "na.omit" an assertion would fail. This is now fixed and hence NA values are always removed prior to model fitting, independent of the global na.action option.
    • +

      Bug Fixes +

      +
        +
      • Previously mmrm() follows the global option na.action and if it is set other than "na.omit" an assertion would fail. This is now fixed and hence NA values are always removed prior to model fitting, independent of the global na.action option.
      • Previously a model.frame() call on an mmrm object with transformed terms, or new data, e.g. model.frame(mmrm(Y ~ log(X) + ar1(VISIT|ID), data = new_data), would fail. This is now fixed.
      • Previously mmrm() always required a data argument. Now fitting mmrm can also use environment variables instead of requiring data argument. (Note that fit_mmrm is not affected.)
      • Previously emmeans() failed when using transformed terms or not including the visit variable in the model formula. This is now fixed.
      • Previously mmrm() might provide non-finite values in the Jacobian calculations, leading to errors in the Satterthwaite degrees of freedom calculations. This will raise an error now and thus alert the user that the model fit was not successful.
      • -
    + +
    -

    Miscellaneous

    -
    • Use automatic differentiation to calculate Satterthwaite adjusted degrees of freedom, resulting in 10-fold speed-up of the Satterthwaite calculations after the initial model fit.
    • +

      Miscellaneous +

      +
        +
      • Use automatic differentiation to calculate Satterthwaite adjusted degrees of freedom, resulting in 10-fold speed-up of the Satterthwaite calculations after the initial model fit.
      • Add an interactive confirmation step if the number of visit levels is too large for non-spatial covariance structures. Use options(mmrm.max_visits = ) to specify the maximum number of visits allowed in non-interactive mode.
      • Removed free_cores() in favor of parallelly::availableCores(omit = 1).
      • The model.frame() method has been updated: The full argument is deprecated and the include argument can be used instead; by default all relevant variables are returned. Furthermore, it returns a data.frame the size of the number of observations utilized in the model for all combinations of the include argument when na.action= "na.omit".
      • -
    + +
    -

    mmrm 0.2.2

    CRAN release: 2022-12-20

    +

    mmrm 0.2.2 +

    +

    CRAN release: 2022-12-20

    -

    New Features

    -
    • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
    • +

      New Features +

      +
        +
      • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
      • Update the mmrm arguments to allow users more fine-grained control, e.g. mmrm(..., start = start, optimizer = c("BFGS", "nlminb")) to set the starting values for the variance estimates and to choose the available optimizers. These arguments will be passed to the new function mmrm_control.
      • Add new argument drop_visit_levels to allow users to keep all levels in visits, even when they are not observed in the data. Dropping unobserved levels was done silently previously, and now a message will be given. See ?mmrm_control for more details.
      • -
    + +
    -

    Bug Fixes

    -
    • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
    • +

      Bug Fixes +

      +
        +
      • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
      • Previously in mmrm calls, the weights object in the environment where the formula is defined was replaced by the weights used internally. Now this behavior is removed and your variable weights e.g. in the global environment will no longer be replaced.
      • -
    + +
    -

    Miscellaneous

    -
    • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
    • +

      Miscellaneous +

      +
        +
      • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
      • Deprecated optimizer = "automatic" in favor of not specifying the optimizer. By default, all remaining optimizers will be tried if the first optimizer fails to reach convergence.
      • -
    + +
    -

    mmrm 0.1.5

    CRAN release: 2022-10-18

    -
    • First CRAN version of the package.
    • +

      mmrm 0.1.5 +

      +

      CRAN release: 2022-10-18

      +
        +
      • First CRAN version of the package.
      • The package fits mixed models for repeated measures (MMRM) based on the marginal linear model without random effects.
      • The motivation for this package is to have a fast, reliable (in terms of convergence behavior) and feature complete implementation of MMRM in R.
      • -
      -

      New Features

      -
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • +
      +
      +

      New Features +

      +
        +
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • Fast C++ implementation of Maximum Likelihood (ML) and Restricted Maximum Likelihood (REML) estimation.
      • Currently Satterthwaite adjusted degrees of freedom calculation is supported.
      • Interface to the emmeans package for computing estimated marginal means (also called least-square means) for the coefficients.
      • Multiple optimizers are run to reach convergence in as many cases as possible.
      • Flexible formula based model specification and support for standard S3 methods such as summary, logLik, etc.
      • -
      +
    +
    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/COV_TYPES.html b/v0.3.2/reference/COV_TYPES.html index 8a03eecc2..57ce9ab78 100644 --- a/v0.3.2/reference/COV_TYPES.html +++ b/v0.3.2/reference/COV_TYPES.html @@ -1,5 +1,25 @@ - -Covariance Type Database — COV_TYPES • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,14 +140,17 @@
    -

    Usage

    +

    Usage +

    COV_TYPES
    -

    Format

    +

    Format +

    A data frame with 5 variables and one record per covariance type:

    -
    name
    +
    +
    name

    The long-form name of the covariance structure type

    abbr
    @@ -138,25 +169,30 @@

    Format<

    A logical value indicating whether the covariance structure is spatial.

    -

    + + + +
    -
    + + - - + + diff --git a/v0.3.2/reference/as.cov_struct.html b/v0.3.2/reference/as.cov_struct.html index 4e9fcb6b0..f33c15820 100644 --- a/v0.3.2/reference/as.cov_struct.html +++ b/v0.3.2/reference/as.cov_struct.html @@ -1,5 +1,25 @@ - -Coerce into a Covariance Structure Definition — as.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    as.cov_struct(x, ...)
     
     # S3 method for formula
    @@ -120,8 +149,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    an object from which to derive a covariance structure. See object specific sections for details.

    @@ -134,44 +165,66 @@

    Arguments -

    Value

    +

    Value +

    A cov_struct() object.

    -

    Details

    +

    Details +

    A covariance structure can be parsed from a model definition formula or call. Generally, covariance structures defined using non-standard evaluation take the following form:

    -

    type( (visit, )* visit | (group /)? subject )

    +

    +
    +
    type( (visit, )* visit | (group /)? subject )
    +

    +

    For example, formulas may include terms such as

    -

    us(time | subject)
    +

    +
    +
    us(time | subject)
     cp(time | group / subject)
    -sp_exp(coord1, coord2 | group / subject)

    +sp_exp(coord1, coord2 | group / subject)
    +

    +

    Note that only sp_exp (spatial) covariance structures may provide multiple coordinates, which identify the Euclidean distance between the time points.

    -

    Methods (by class)

    +

    Methods (by class) +

    -
    • as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be +

        +
      • +

        as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be covariance structure definitions and must follow the form:

        -

        y ~ xs + type( (visit, )* visit | (group /)? subject )

        +

        +
        +
        y ~ xs + type( (visit, )* visit | (group /)? subject )
        +

        +

        Any component on the right hand side of a formula is considered when -searching for a covariance definition.

      • -
    +searching for a covariance definition.

    + + +
    -

    See also

    +

    See also +

    Other covariance types: cov_struct(), covariance_types

    -

    Examples

    +

    Examples +

    # provide a covariance structure as a right-sided formula
     as.cov_struct(~ csh(visit | group / subject))
     #> <covariance structure>
    @@ -191,22 +244,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.2/reference/bcva_data.html b/v0.3.2/reference/bcva_data.html index 4e56ccdf6..c0e96a331 100644 --- a/v0.3.2/reference/bcva_data.html +++ b/v0.3.2/reference/bcva_data.html @@ -1,5 +1,25 @@ - -Example Data on BCVA — bcva_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,48 +140,59 @@
    -

    Usage

    +

    Usage +

    bcva_data
    -

    Format

    -

    A tibble with 10,000 rows and 7 variables:

    • USUBJID: subject ID.

    • +

      Format +

      +

      A tibble with 10,000 rows and 7 variables:

      +
        +
      • USUBJID: subject ID.

      • VISITN: visit number (numeric).

      • AVISIT: visit number (factor).

      • ARMCD: treatment, TRT or CTL.

      • RACE: 3-category race.

      • BCVA_BL: BCVA at baseline.

      • BCVA_CHG: Change in BCVA at study visits.

      • -
    + +
    -

    Source

    +

    Source +

    This is an artificial dataset.

    -

    Note

    +

    Note +

    Measurements of BCVA (best corrected visual acuity) is a measure of how how many letters a person can read off of an eye chart using corrective lenses or contacts. This a common endpoint in ophthalmology trials.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/cached_mmrm_results.html b/v0.3.2/reference/cached_mmrm_results.html index df35ddd81..360de9f55 100644 --- a/v0.3.2/reference/cached_mmrm_results.html +++ b/v0.3.2/reference/cached_mmrm_results.html @@ -1,5 +1,25 @@ - -Cache Data for mmrm Model Comparison — cached_mmrm_results • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,25 +140,32 @@
    -

    Usage

    +

    Usage +

    cached_mmrm_results
    -

    Format

    -

    A list with following elements:

    • conv_time_fev: Convergence time on FEV data.

    • +

      Format +

      +

      A list with following elements:

      +
        +
      • conv_time_fev: Convergence time on FEV data.

      • conv_time_bcva: Convergence time on BCVA data.

      • rel_diff_ests_tbl_fev: Relative difference in estimates on FEV data.

      • rel_diff_ests_tbl_bcva: Relative difference in estimates on BCVA data.

      • conv_rate: Convergence rate on data with different missing levels.

      • df_missingness: Summary of missingness on simulated data.

      • -
    + +
    -

    Source

    +

    Source +

    This is created based on simulations on FEV data and BCVA data.

    -

    Note

    +

    Note +

    The cached data for comparison is used for the vignettes generation. Please make sure that this data is refreshed before each package release by running the script data-raw/mmrm_review.R. @@ -139,22 +174,26 @@

    Note

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/check_package_version.html b/v0.3.2/reference/check_package_version.html index fb6da9095..84d126129 100644 --- a/v0.3.2/reference/check_package_version.html +++ b/v0.3.2/reference/check_package_version.html @@ -1,5 +1,25 @@ - -Check Suggested Dependency Against Version Requirements — check_package_version • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    check_package_version(pkg, ver = c(NA_character_, NA_character_))
    -

    Arguments

    -
    pkg
    +

    Arguments +

    +
    +
    pkg

    (string)
    package name.

    @@ -128,9 +159,11 @@

    Arguments -

    Value

    +

    Value +

    A logical (invisibly) indicating whether the loaded package meets @@ -138,22 +171,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/component.html b/v0.3.2/reference/component.html index b45ecd2b4..785808044 100644 --- a/v0.3.2/reference/component.html +++ b/v0.3.2/reference/component.html @@ -1,5 +1,25 @@ - -Component Access for mmrm_tmb Objects — component • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    component(
       object,
       name = c("cov_type", "subject_var", "n_theta", "n_subjects", "n_timepoints", "n_obs",
    @@ -124,24 +153,31 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    name

    (character)
    the component(s) to be retrieved.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding component of the object, see details.

    -

    Details

    -

    Available component() names are as follows:

    • call: low-level function call which generated the model.

    • +

      Details +

      +

      Available component() names are as follows:

      +
    + +
    -

    See also

    +

    See also +

    In the lme4 package there is a similar function getME().

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -3079,22 +3118,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.2/reference/cov_struct.html b/v0.3.2/reference/cov_struct.html index 70f76ba00..a3c052e30 100644 --- a/v0.3.2/reference/cov_struct.html +++ b/v0.3.2/reference/cov_struct.html @@ -1,5 +1,25 @@ - -Define a Covariance Structure — cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    cov_struct(
       type = cov_types(),
       visits,
    @@ -123,8 +152,10 @@ 

    Usage

    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    the name of the covariance structure type to use. For available options, see cov_types(). If a type abbreviation is used that implies heterogeneity (e.g. cph) and no value is provided to @@ -150,22 +181,26 @@

    Arguments -

    Value

    +

    Value +

    A cov_struct object.

    -

    See also

    +

    See also +

    Other covariance types: as.cov_struct(), covariance_types

    -

    Examples

    +

    Examples +

    cov_struct("csh", "AVISITN", "USUBJID")
     #> <covariance structure>
     #> heterogeneous compound symmetry:
    @@ -182,22 +217,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.2/reference/cov_type_abbr.html b/v0.3.2/reference/cov_type_abbr.html index 69ed96bc3..501868b0b 100644 --- a/v0.3.2/reference/cov_type_abbr.html +++ b/v0.3.2/reference/cov_type_abbr.html @@ -1,5 +1,25 @@ - -Retrieve Associated Abbreviated Covariance Structure Type Name — cov_type_abbr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    cov_type_abbr(type)
    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    either a full name or abbreviate covariance structure type name to collapse into an abbreviated type.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding abbreviated covariance type name.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/cov_type_name.html b/v0.3.2/reference/cov_type_name.html index db3fe56a8..152c98ea7 100644 --- a/v0.3.2/reference/cov_type_name.html +++ b/v0.3.2/reference/cov_type_name.html @@ -1,5 +1,25 @@ - -Retrieve Associated Full Covariance Structure Type Name — cov_type_name • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    cov_type_name(type)
    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    either a full name or abbreviate covariance structure type name to convert to a long-form type.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding abbreviated covariance type name.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/covariance_types.html b/v0.3.2/reference/covariance_types.html index 7a3141a85..55c36880b 100644 --- a/v0.3.2/reference/covariance_types.html +++ b/v0.3.2/reference/covariance_types.html @@ -1,5 +1,25 @@ - -Covariance Types — covariance_types • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    cov_types(
       form = c("name", "abbr", "habbr"),
       filter = c("heterogeneous", "spatial")
    @@ -120,8 +149,10 @@ 

    Usage

    -

    Arguments

    -
    form
    +

    Arguments +

    +
    +
    form

    (character)
    covariance structure type name form. One or more of "name", "abbr" (abbreviation), or "habbr" (heterogeneous abbreviation).

    @@ -131,67 +162,155 @@

    Arguments or "spatial".

    -

    + +
    -

    Value

    +

    Value +

    A character vector of accepted covariance structure type names and abbreviations.

    -

    Note

    +

    Note +

    The ante-dependence covariance structure in this package refers to homogeneous ante-dependence, while the ante-dependence covariance structure from SAS PROC MIXED refers to heterogeneous ante-dependence and the homogeneous version is not available in SAS.

    For all non-spatial covariance structures, the time variable must -be coded as a factor.

    -

    Spatial Covariance structures:

    +be coded as a factor.

    +
    +

    Spatial Covariance structures: +

    -
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)

    where \(d_{ij}\) denotes the Euclidean distance between time points + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)
    +

    where \(d_{ij}\) denotes the Euclidean distance between time points \(i\) and \(j\).

    -

    Abbreviations for Covariance Structures

    +

    Abbreviations for Covariance Structures +

    -

    Common Covariance Structures:

    +

    Common Covariance Structures: +

    -
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)
    +

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, respectively, out of total \(m\) time points, \(1 \leq i, j \leq m\).

    -

    See also

    +

    See also +

    Other covariance types: as.cov_struct(), cov_struct()

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/df_1d.html b/v0.3.2/reference/df_1d.html index b1efafcce..8b2389e77 100644 --- a/v0.3.2/reference/df_1d.html +++ b/v0.3.2/reference/df_1d.html @@ -1,9 +1,29 @@ - - + + + + + +Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm +Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    df_1d(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -133,16 +164,19 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -168,22 +202,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.2/reference/df_md.html b/v0.3.2/reference/df_md.html index a7ce6224e..28316a143 100644 --- a/v0.3.2/reference/df_md.html +++ b/v0.3.2/reference/df_md.html @@ -1,11 +1,31 @@ - - + + + + + +Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm +Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -121,13 +149,16 @@
    -

    Usage

    +

    Usage +

    df_md(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -137,16 +168,19 @@

    Arguments -

    Value

    +

    Value +

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

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -169,22 +203,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.2/reference/drop_elements.html b/v0.3.2/reference/drop_elements.html index 687a87afb..036ebf4d4 100644 --- a/v0.3.2/reference/drop_elements.html +++ b/v0.3.2/reference/drop_elements.html @@ -1,5 +1,25 @@ - -Drop Items from an Indexible — drop_elements • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    drop_elements(x, n)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    Any object that can be consumed by seq_along() and indexed by a logical vector of the same length.

    @@ -126,31 +157,37 @@

    Arguments -

    Value

    +

    Value +

    A subset of x.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/emit_tidymodels_register_msg.html b/v0.3.2/reference/emit_tidymodels_register_msg.html index d53f59794..bd93f839a 100644 --- a/v0.3.2/reference/emit_tidymodels_register_msg.html +++ b/v0.3.2/reference/emit_tidymodels_register_msg.html @@ -1,5 +1,25 @@ - -Format a Message to Emit When Tidymodels is Loaded — emit_tidymodels_register_msg • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,12 +140,14 @@
    -

    Usage

    +

    Usage +

    emit_tidymodels_register_msg()
    -

    Value

    +

    Value +

    A character message to emit. Either a ansi-formatted cli output if @@ -125,22 +155,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/emmeans_support.html b/v0.3.2/reference/emmeans_support.html index 5da5ea203..158abd3ef 100644 --- a/v0.3.2/reference/emmeans_support.html +++ b/v0.3.2/reference/emmeans_support.html @@ -1,11 +1,31 @@ - - + + + + + +Support for emmeans — emmeans_support • mmrm +Support for emmeans — emmeans_support • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - +
    @@ -123,7 +152,8 @@
    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -156,22 +186,26 @@ 

    Examples#> Confidence level used: 0.95

    -
    + +
    + + - - + + diff --git a/v0.3.2/reference/fev_data.html b/v0.3.2/reference/fev_data.html index edeed99de..57e02fe9c 100644 --- a/v0.3.2/reference/fev_data.html +++ b/v0.3.2/reference/fev_data.html @@ -1,5 +1,25 @@ - -Example Data on FEV1 — fev_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,17 @@
    -

    Usage

    +

    Usage +

    fev_data
    -

    Format

    -

    A tibble with 800 rows and 7 variables:

    • USUBJID: subject ID.

    • +

      Format +

      +

      A tibble with 800 rows and 7 variables:

      +
        +
      • USUBJID: subject ID.

      • AVISIT: visit number.

      • ARMCD: treatment, TRT or PBO.

      • RACE: 3-category race.

      • @@ -126,35 +158,42 @@

        Format<
      • FEV1_BL: FEV1 at baseline (%).

      • FEV1: FEV1 at study visits.

      • WEIGHT: weighting variable.

      • -

    + +
    -

    Source

    +

    Source +

    This is an artificial dataset.

    -

    Note

    +

    Note +

    Measurements of FEV1 (forced expired volume in one second) is a measure of how quickly the lungs can be emptied. Low levels of FEV1 may indicate chronic obstructive pulmonary disease (COPD).

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/fill_names.html b/v0.3.2/reference/fill_names.html index bc948e6ca..fb357492a 100644 --- a/v0.3.2/reference/fill_names.html +++ b/v0.3.2/reference/fill_names.html @@ -1,5 +1,25 @@ - -Complete character Vector Names From Values — fill_names • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    fill_names(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character or list)
    value whose names should be completed from element values.

    -
    + +
    -

    Value

    +

    Value +

    A named vector or list.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/fit_mmrm.html b/v0.3.2/reference/fit_mmrm.html index 51228a8b3..34ac77183 100644 --- a/v0.3.2/reference/fit_mmrm.html +++ b/v0.3.2/reference/fit_mmrm.html @@ -1,11 +1,31 @@ - - + + + + + +Low-Level Fitting Function for MMRM — fit_mmrm • mmrm +Low-Level Fitting Function for MMRM — fit_mmrm • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -121,7 +149,8 @@
    -

    Usage

    +

    Usage +

    fit_mmrm(
       formula,
       data,
    @@ -135,8 +164,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    model formula with exactly one special term specifying the visits within subjects, see details.

    @@ -175,15 +206,18 @@

    Argumentsmmrm_control().

    -

    + +
    -

    Value

    +

    Value +

    List of class mmrm_tmb, see h_mmrm_tmb_fit() for details.

    + + - - + + diff --git a/v0.3.2/reference/fit_single_optimizer.html b/v0.3.2/reference/fit_single_optimizer.html index 6ea29e696..533dbe206 100644 --- a/v0.3.2/reference/fit_single_optimizer.html +++ b/v0.3.2/reference/fit_single_optimizer.html @@ -1,9 +1,29 @@ - - + + + + + +Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm +Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,7 +146,8 @@
    -

    Usage

    +

    Usage +

    fit_single_optimizer(
       formula,
       data,
    @@ -133,8 +162,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -174,9 +205,11 @@

    Arguments -

    Value

    +

    Value +

    The mmrm_fit object, with additional attributes containing warnings, @@ -184,7 +217,8 @@

    Value

    mmrm_tmb
    contents.

    + +
    - - + + diff --git a/v0.3.2/reference/flat_expr.html b/v0.3.2/reference/flat_expr.html index 6cf37bd85..33c2b1622 100644 --- a/v0.3.2/reference/flat_expr.html +++ b/v0.3.2/reference/flat_expr.html @@ -1,11 +1,31 @@ - - + + + + + +Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm +Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -121,61 +149,86 @@
    -

    Usage

    +

    Usage +

    flatten_call(call)
     
     flatten_expr(expr)
    -

    Arguments

    -
    call, expr
    +

    Arguments +

    +
    +
    call, expr

    (language)
    a language object to flatten.

    -
    + +
    -

    Value

    +

    Value +

    A list of atomic values, symbols, infix operator names and subexpressions.

    -

    Details

    +

    Details +

    Where 1 + 2 | 3 in R's syntax tree is (|, (+, 1, 2), 3), flattening it into its visual order produces (1, +, 2, |, 3), which makes for more fluent interpretation of non-standard grammar rules used in formulas.

    -

    Functions

    +

    Functions +

    -
    • flatten_call(): Flatten a call into a list of names and argument expressions.

      +
        +
      • +

        flatten_call(): Flatten a call into a list of names and argument expressions.

        The call name and all arguments are flattened into the same list, meaning a call of the form sp_exp(a, b, c | d / e) produces a list of the form (sp_exp, a, b, c, |, d, /, e).

        -

        flatten_call(quote(sp_exp(a, b, c | d / e)))

      • -
      • flatten_expr(): Flatten nested expressions

        -

        flatten_expr(quote(1 + 2 + 3 | 4))

      • -
    +

    +
    +
    flatten_call(quote(sp_exp(a, b, c | d / e)))
    +

    +
    + +
  • +

    flatten_expr(): Flatten nested expressions

    +

    +
    +
    flatten_expr(quote(1 + 2 + 3 | 4))
    +

    +
    +
  • + + + +
    -
    + + - - + + diff --git a/v0.3.2/reference/format.cov_struct.html b/v0.3.2/reference/format.cov_struct.html index 1e67c4d89..aa65d9ffb 100644 --- a/v0.3.2/reference/format.cov_struct.html +++ b/v0.3.2/reference/format.cov_struct.html @@ -1,5 +1,25 @@ - -Format Covariance Structure Object — format.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,45 +140,54 @@
    -

    Usage

    +

    Usage +

    # S3 method for cov_struct
     format(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    ...

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string for x.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/format_symbols.html b/v0.3.2/reference/format_symbols.html index 9708aaf7f..021c4a6c0 100644 --- a/v0.3.2/reference/format_symbols.html +++ b/v0.3.2/reference/format_symbols.html @@ -1,7 +1,27 @@ - -Format Symbol Objects — format_symbols • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,40 +143,49 @@
    -

    Usage

    +

    Usage +

    format_symbols(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character) A vector of variable names.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string of comma-separated variables.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/formula_rhs.html b/v0.3.2/reference/formula_rhs.html index e630cf7ae..6055b9212 100644 --- a/v0.3.2/reference/formula_rhs.html +++ b/v0.3.2/reference/formula_rhs.html @@ -1,5 +1,25 @@ - -Extract Right-Hand-Side (rhs) from Formula — formula_rhs • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,47 +140,60 @@
    -

    Usage

    +

    Usage +

    formula_rhs(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula.

    -
    + +
    -

    Value

    +

    Value +

    A formula without a response, derived from the right-hand-side of the formula, f.

    -

    formula_rhs(a ~ b + c)
    -formula_rhs(~ b + c)

    +

    +
    +
    formula_rhs(a ~ b + c)
    +formula_rhs(~ b + c)
    +

    +
    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_add_covariance_terms.html b/v0.3.2/reference/h_add_covariance_terms.html index fb78c8f4a..1336eab8c 100644 --- a/v0.3.2/reference/h_add_covariance_terms.html +++ b/v0.3.2/reference/h_add_covariance_terms.html @@ -1,5 +1,25 @@ - -Add Individual Covariance Variables As Terms to Formula — h_add_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_add_covariance_terms(f, covariance)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula to which covariance structure terms should be added.

    @@ -127,37 +158,44 @@

    Arguments -

    Value

    +

    Value +

    A new formula with included covariance terms.

    -

    Details

    +

    Details +

    stats::update() is used to append the covariance structure and the environment attribute will not be changed. This ensures the returned formula and the input formula have the same environment.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_add_terms.html b/v0.3.2/reference/h_add_terms.html index bfa8c737b..8bc5537e0 100644 --- a/v0.3.2/reference/h_add_terms.html +++ b/v0.3.2/reference/h_add_terms.html @@ -1,5 +1,25 @@ - -Add Formula Terms with Character — h_add_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_add_terms(f, adds, drop_response = FALSE)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula to be updated.

    @@ -129,37 +160,44 @@

    Arguments -

    Value

    +

    Value +

    A new formula with elements in drops removed.

    -

    Details

    +

    Details +

    Elements in adds will be added from the formula, while the environment of the formula is unchanged. If adds is NULL or character(0), the formula is unchanged.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_coef_table.html b/v0.3.2/reference/h_coef_table.html index 9b26ba461..269665ded 100644 --- a/v0.3.2/reference/h_coef_table.html +++ b/v0.3.2/reference/h_coef_table.html @@ -1,5 +1,25 @@ - -Coefficients Table for MMRM Fit — h_coef_table • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,18 +140,23 @@
    -

    Usage

    +

    Usage +

    h_coef_table(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    model fit.

    -
    + +
    -

    Value

    +

    Value +

    Matrix with one row per coefficient and columns @@ -131,22 +164,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_confirm_large_levels.html b/v0.3.2/reference/h_confirm_large_levels.html index 1c1c1194a..dd7afcb4e 100644 --- a/v0.3.2/reference/h_confirm_large_levels.html +++ b/v0.3.2/reference/h_confirm_large_levels.html @@ -1,7 +1,27 @@ - -Ask for Confirmation on Large Visit Levels — h_confirm_large_levels • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,34 +143,42 @@
    -

    Usage

    +

    Usage +

    h_confirm_large_levels(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (numeric)
    number of visit levels.

    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_construct_model_frame_inputs.html b/v0.3.2/reference/h_construct_model_frame_inputs.html index 5556bd208..080f6bf76 100644 --- a/v0.3.2/reference/h_construct_model_frame_inputs.html +++ b/v0.3.2/reference/h_construct_model_frame_inputs.html @@ -1,13 +1,33 @@ - - + + + + + +Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm +Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -32,7 +54,8 @@ + - + + - + @@ -124,7 +152,8 @@
    -

    Usage

    +

    Usage +

    h_construct_model_frame_inputs(
       formula,
       data,
    @@ -135,8 +164,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (mmrm)
    mmrm fit object.

    @@ -152,36 +183,45 @@

    Arguments -

    Value

    +

    Value +

    -

    named list with four elements:

    • "formula": the formula including the columns requested in the include= argument.

    • +

      named list with four elements:

      +
        +
      • "formula": the formula including the columns requested in the include= argument.

      • "formula_full": the formula including all columns

      • "data": a data frame including all columns where factor and character columns have been processed with h_factor_ref().

      • "is_full": a logical scalar indicating if the formula and full formula are identical

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_default_value.html b/v0.3.2/reference/h_default_value.html index 6818ea772..a668df357 100644 --- a/v0.3.2/reference/h_default_value.html +++ b/v0.3.2/reference/h_default_value.html @@ -1,9 +1,29 @@ - -Default Value on NULL -Return default value when first argument is NULL. — h_default_value • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,42 +146,51 @@
    -

    Usage

    +

    Usage +

    h_default_value(x, y)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    Object.

    y

    Object.

    -
    + +
    -

    Details

    +

    Details +

    If x is NULL, returns y. Otherwise return x.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_df_1d_bw.html b/v0.3.2/reference/h_df_1d_bw.html index 8158f36c8..4f1f17b3f 100644 --- a/v0.3.2/reference/h_df_1d_bw.html +++ b/v0.3.2/reference/h_df_1d_bw.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom for One-Dimensional Contrast — h_df_1d_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_bw(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -127,31 +158,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_df_1d_kr.html b/v0.3.2/reference/h_df_1d_kr.html index 7cfa61095..0a5ebf0de 100644 --- a/v0.3.2/reference/h_df_1d_kr.html +++ b/v0.3.2/reference/h_df_1d_kr.html @@ -1,7 +1,27 @@ - -Calculation of Kenward-Roger Degrees of Freedom for One-Dimensional Contrast — h_df_1d_kr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_kr(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -130,31 +161,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_df_1d_res.html b/v0.3.2/reference/h_df_1d_res.html index 393f7a593..8902fd01a 100644 --- a/v0.3.2/reference/h_df_1d_res.html +++ b/v0.3.2/reference/h_df_1d_res.html @@ -1,7 +1,27 @@ - -Calculation of Residual Degrees of Freedom for One-Dimensional Contrast — h_df_1d_res • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_res(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -130,31 +161,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_df_1d_sat.html b/v0.3.2/reference/h_df_1d_sat.html index 76f5b3961..2da8ee176 100644 --- a/v0.3.2/reference/h_df_1d_sat.html +++ b/v0.3.2/reference/h_df_1d_sat.html @@ -1,7 +1,27 @@ - -Calculation of Satterthwaite Degrees of Freedom for One-Dimensional Contrast — h_df_1d_sat • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_sat(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -130,31 +161,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_df_bw_calc.html b/v0.3.2/reference/h_df_bw_calc.html index 1b48b5d7a..926215494 100644 --- a/v0.3.2/reference/h_df_bw_calc.html +++ b/v0.3.2/reference/h_df_bw_calc.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom — h_df_bw_calc • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,42 +140,54 @@
    -

    Usage

    +

    Usage +

    h_df_bw_calc(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    -

    List with:

    + + + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_df_md_bw.html b/v0.3.2/reference/h_df_md_bw.html index 7aa489ff0..488067c47 100644 --- a/v0.3.2/reference/h_df_md_bw.html +++ b/v0.3.2/reference/h_df_md_bw.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_bw(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_df_md_from_1d.html b/v0.3.2/reference/h_df_md_from_1d.html index 75f7dd7cc..49f8e62b7 100644 --- a/v0.3.2/reference/h_df_md_from_1d.html +++ b/v0.3.2/reference/h_df_md_from_1d.html @@ -1,5 +1,25 @@ - -Creating F-Statistic Results from One-Dimensional Contrast — h_df_md_from_1d • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,22 +140,27 @@
    -

    Usage

    +

    Usage +

    h_df_md_from_1d(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    model fit.

    contrast

    (numeric)
    one-dimensional contrast.

    -
    + +
    -

    Value

    +

    Value +

    The one-dimensional degrees of freedom are calculated and then @@ -135,22 +168,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_df_md_kr.html b/v0.3.2/reference/h_df_md_kr.html index b9c86d283..ad850c296 100644 --- a/v0.3.2/reference/h_df_md_kr.html +++ b/v0.3.2/reference/h_df_md_kr.html @@ -1,5 +1,25 @@ - -Calculation of Kenward-Roger Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_kr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_kr(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_df_md_res.html b/v0.3.2/reference/h_df_md_res.html index d6fb122de..c23fac0e8 100644 --- a/v0.3.2/reference/h_df_md_res.html +++ b/v0.3.2/reference/h_df_md_res.html @@ -1,5 +1,25 @@ - -Calculation of Residual Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_res • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_res(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_df_md_sat.html b/v0.3.2/reference/h_df_md_sat.html index d94d8148e..f5b6fb8ed 100644 --- a/v0.3.2/reference/h_df_md_sat.html +++ b/v0.3.2/reference/h_df_md_sat.html @@ -1,5 +1,25 @@ - -Calculation of Satterthwaite Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_sat • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_sat(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_df_min_bw.html b/v0.3.2/reference/h_df_min_bw.html index db31d2809..8b41112d7 100644 --- a/v0.3.2/reference/h_df_min_bw.html +++ b/v0.3.2/reference/h_df_min_bw.html @@ -1,5 +1,25 @@ - -Assign Minimum Degrees of Freedom Given Involved Coefficients — h_df_min_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_min_bw(bw_calc, is_coef_involved)
    -

    Arguments

    -
    bw_calc
    +

    Arguments +

    +
    +
    bw_calc

    (list)
    from h_df_bw_calc().

    @@ -126,9 +157,11 @@

    Arguments -

    Value

    +

    Value +

    The minimum of the degrees of freedom assigned to each involved @@ -136,22 +169,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_df_to_tibble.html b/v0.3.2/reference/h_df_to_tibble.html index dbdd281cd..757773c44 100644 --- a/v0.3.2/reference/h_df_to_tibble.html +++ b/v0.3.2/reference/h_df_to_tibble.html @@ -1,5 +1,25 @@ - -Coerce a Data Frame to a tibble — h_df_to_tibble • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -112,24 +141,30 @@
    -

    Usage

    +

    Usage +

    h_df_to_tibble(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (data.frame)
    what to coerce.

    -
    + +
    -

    Value

    +

    Value +

    The data as a tibble, potentially with a .rownames column.

    -

    Details

    +

    Details +

    This is only a thin wrapper around tibble::as_tibble(), except giving a useful error message and it checks for rownames and adds them as a new column .rownames if they are not just a numeric sequence as @@ -137,22 +172,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.2/reference/h_drop_covariance_terms.html b/v0.3.2/reference/h_drop_covariance_terms.html index 1dfa001bc..4f8032aa2 100644 --- a/v0.3.2/reference/h_drop_covariance_terms.html +++ b/v0.3.2/reference/h_drop_covariance_terms.html @@ -1,5 +1,25 @@ - -Drop Formula Terms used for Covariance Structure Definition — h_drop_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,46 +140,56 @@
    -

    Usage

    +

    Usage +

    h_drop_covariance_terms(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula from which covariance terms should be dropped.

    -
    + +
    -

    Value

    +

    Value +

    The formula without accepted covariance terms.

    -

    Details

    +

    Details +

    terms is used and it will preserve the environment attribute. This ensures the returned formula and the input formula have the same environment.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_extract_covariance_terms.html b/v0.3.2/reference/h_extract_covariance_terms.html index 8958e683a..08d354a39 100644 --- a/v0.3.2/reference/h_extract_covariance_terms.html +++ b/v0.3.2/reference/h_extract_covariance_terms.html @@ -1,5 +1,25 @@ - -Extract Formula Terms used for Covariance Structure Definition — h_extract_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    h_extract_covariance_terms(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula from which covariance terms should be extracted.

    -
    + +
    -

    Value

    +

    Value +

    A list of covariance structure expressions found in f.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_factor_ref.html b/v0.3.2/reference/h_factor_ref.html index c014307f5..02f39add7 100644 --- a/v0.3.2/reference/h_factor_ref.html +++ b/v0.3.2/reference/h_factor_ref.html @@ -1,5 +1,25 @@ - -Convert Character to Factor Following Reference — h_factor_ref • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_factor_ref(x, ref, var_name = vname(x))
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character or factor)
    input.

    @@ -129,31 +160,37 @@

    Arguments -

    Details

    +

    Details +

    Use ref to convert x into factor with the same levels. This is needed even if x and ref are both character because in model.matrix if x only has one level there could be errors.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_get_cov_default.html b/v0.3.2/reference/h_get_cov_default.html index e353d1f71..9b6357d70 100644 --- a/v0.3.2/reference/h_get_cov_default.html +++ b/v0.3.2/reference/h_get_cov_default.html @@ -1,7 +1,27 @@ - -Obtain Default Covariance Method — h_get_cov_default • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,20 +143,25 @@
    -

    Usage

    +

    Usage +

    h_get_cov_default(
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within")
     )
    -

    Arguments

    -
    method
    +

    Arguments +

    +
    +
    method

    (string)
    degrees of freedom method.

    -
    + +
    -

    Details

    +

    Details +

    The default covariance method is different for different degrees of freedom method. For "Satterthwaite" or "Between-Within", "Asymptotic" is returned. For "Kenward-Roger" only, "Kenward-Roger" is returned. @@ -136,22 +169,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.2/reference/h_get_empirical.html b/v0.3.2/reference/h_get_empirical.html index 9a1a83d24..0c3cf5052 100644 --- a/v0.3.2/reference/h_get_empirical.html +++ b/v0.3.2/reference/h_get_empirical.html @@ -1,9 +1,29 @@ - -Obtain Empirical/Jackknife/Bias-Reduced Covariance — h_get_empirical • mmrm +Obtain Empirical/Jackknife/Bias-Reduced Covariance — h_get_empirical • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    h_get_empirical(tmb_data, theta, beta, beta_vcov, type)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    @@ -144,32 +175,41 @@

    Arguments -

    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • cov: matrix empirical covariance.

    • +

      Named list with elements:

      +
        +
      • cov: matrix empirical covariance.

      • df_mat: matrix to calculate Satterthwaite degree of freedom.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_get_kr_comp.html b/v0.3.2/reference/h_get_kr_comp.html index da64e0f71..d9261e177 100644 --- a/v0.3.2/reference/h_get_kr_comp.html +++ b/v0.3.2/reference/h_get_kr_comp.html @@ -1,7 +1,27 @@ - -Obtain Kenward-Roger Adjustment Components — h_get_kr_comp • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,30 +143,39 @@
    -

    Usage

    +

    Usage +

    h_get_kr_comp(tmb_data, theta)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    theta

    (numeric)
    theta estimate.

    -
    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • P: matrix of \(P\) component.

    • +

      Named list with elements:

      +
        +
      • P: matrix of \(P\) component.

      • Q: matrix of \(Q\) component.

      • R: matrix of \(R\) component.

      • -
    + +
    -

    Details

    +

    Details +

    the function returns a named list, \(P\), \(Q\) and \(R\), which corresponds to the paper in 1997. The matrices are stacked in columns so that \(P\), \(Q\) and \(R\) has the same column number(number of beta parameters). The number of rows, is dependent on @@ -150,22 +187,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.2/reference/h_get_optimizers.html b/v0.3.2/reference/h_get_optimizers.html index c5ccff71a..d6c86f74d 100644 --- a/v0.3.2/reference/h_get_optimizers.html +++ b/v0.3.2/reference/h_get_optimizers.html @@ -1,5 +1,25 @@ - -Obtain Optimizer according to Optimizer String Value — h_get_optimizers • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    h_get_optimizers(
       optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"),
       optimizer_fun = h_optimizer_fun(optimizer),
    @@ -122,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    optimizer
    +

    Arguments +

    +
    +
    optimizer

    (character)
    names of built-in optimizers to try, subset of "L-BFGS-B", "BFGS", "CG" and "nlminb".

    @@ -140,46 +171,59 @@

    Arguments -

    Value

    +

    Value +

    Named list of optimizers created by h_partial_fun_args().

    -

    Details

    -

    If you want to use only the built-in optimizers:

    • optimizer is a shortcut to create a list of built-in optimizer functions +

      Details +

      +

      If you want to use only the built-in optimizers:

      +
        +
      • optimizer is a shortcut to create a list of built-in optimizer functions passed to optimizer_fun.

      • Allowed are "L-BFGS-B", "BFGS", "CG" (using stats::optim() with corresponding method) and "nlminb" (using stats::nlminb()).

      • Other arguments should go into optimizer_args.

      • -

      If you want to use your own optimizer function:

      • Make sure that there are three arguments: parameter (start value), objective function +

      +

      If you want to use your own optimizer function:

      +
        +
      • Make sure that there are three arguments: parameter (start value), objective function and gradient function are sequentially in the function arguments.

      • If there are other named arguments in front of these, make sure they are correctly specified through optimizer_args.

      • If the hessian can be used, please make sure its argument name is hessian and please add attribute use_hessian = TRUE to the function, using attr(fun, "use_hessian) <- TRUE.

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_get_prediction.html b/v0.3.2/reference/h_get_prediction.html index c19324762..7dd64b732 100644 --- a/v0.3.2/reference/h_get_prediction.html +++ b/v0.3.2/reference/h_get_prediction.html @@ -1,5 +1,25 @@ - -Get Prediction — h_get_prediction • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_get_prediction(tmb_data, theta, beta, beta_vcov)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    object.

    @@ -133,37 +164,47 @@

    Arguments -

    Value

    +

    Value +

    -

    List with:

    • prediction: Matrix with columns fit, conf_var, and var.

    • +

      List with:

      +
        +
      • prediction: Matrix with columns fit, conf_var, and var.

      • covariance: List with subject specific covariance matrices.

      • index: List of zero-based subject indices.

      • -
    + +
    -

    Details

    +

    Details +

    See predict function in predict.cpp which is called internally.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_get_prediction_variance.html b/v0.3.2/reference/h_get_prediction_variance.html index 57a5c3da0..4643ad404 100644 --- a/v0.3.2/reference/h_get_prediction_variance.html +++ b/v0.3.2/reference/h_get_prediction_variance.html @@ -1,5 +1,25 @@ - -Get Prediction Variance — h_get_prediction_variance • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_get_prediction_variance(object, nsim, tmb_data)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    @@ -129,25 +160,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.2/reference/h_get_sim_per_subj.html b/v0.3.2/reference/h_get_sim_per_subj.html index 5541fe268..645ab1d30 100644 --- a/v0.3.2/reference/h_get_sim_per_subj.html +++ b/v0.3.2/reference/h_get_sim_per_subj.html @@ -1,5 +1,25 @@ - -Get simulated values by patient. — h_get_sim_per_subj • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_get_sim_per_subj(predict_res, nsub, nsim)
    -

    Arguments

    -
    predict_res
    +

    Arguments +

    +
    +
    predict_res

    (list)
    from h_get_prediction().

    @@ -129,25 +160,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.2/reference/h_gradient.html b/v0.3.2/reference/h_gradient.html index e0b9490c1..8a0f5f4c6 100644 --- a/v0.3.2/reference/h_gradient.html +++ b/v0.3.2/reference/h_gradient.html @@ -1,7 +1,27 @@ - -Computation of a Gradient Given Jacobian and Contrast Vector — h_gradient • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_gradient(jac_list, contrast)
    -

    Arguments

    -
    jac_list
    +

    Arguments +

    +
    +
    jac_list

    (list)
    Jacobian list produced e.g. by h_jac_list().

    @@ -130,9 +161,11 @@

    Arguments -

    Value

    +

    Value +

    Numeric vector which contains the quadratic forms of each element of @@ -140,22 +173,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_jac_list.html b/v0.3.2/reference/h_jac_list.html index 33b85095d..4128ebcc4 100644 --- a/v0.3.2/reference/h_jac_list.html +++ b/v0.3.2/reference/h_jac_list.html @@ -1,5 +1,25 @@ - -Obtain List of Jacobian Matrix Entries for Covariance Matrix — h_jac_list • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_jac_list(tmb_data, theta_est, beta_vcov)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    @@ -129,9 +160,11 @@

    Arguments -

    Value

    +

    Value +

    List with one element per variance parameter containing a matrix @@ -140,22 +173,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_kr_df.html b/v0.3.2/reference/h_kr_df.html index 7de99c23c..530285a5f 100644 --- a/v0.3.2/reference/h_kr_df.html +++ b/v0.3.2/reference/h_kr_df.html @@ -1,7 +1,27 @@ - -Obtain the Adjusted Kenward-Roger degrees of freedom — h_kr_df • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_kr_df(v0, l, w, p)
    -

    Arguments

    -
    v0
    +

    Arguments +

    +
    +
    v0

    (matrix)
    unadjusted covariance matrix.

    @@ -136,32 +167,41 @@

    Argumentsh_get_kr_comp().

    -

    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • m: numeric degrees of freedom.

    • +

      Named list with elements:

      +
        +
      • m: numeric degrees of freedom.

      • lambda: numeric F statistic scale parameter.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_md_denom_df.html b/v0.3.2/reference/h_md_denom_df.html index 095af2566..f0c08e75f 100644 --- a/v0.3.2/reference/h_md_denom_df.html +++ b/v0.3.2/reference/h_md_denom_df.html @@ -1,5 +1,25 @@ - -Calculating Denominator Degrees of Freedom for the Multi-Dimensional Case — h_md_denom_df • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,47 +140,57 @@
    -

    Usage

    +

    Usage +

    h_md_denom_df(t_stat_df)
    -

    Arguments

    -
    t_stat_df
    +

    Arguments +

    +
    +
    t_stat_df

    (numeric)
    n t-statistic derived degrees of freedom.

    -
    + +
    -

    Value

    +

    Value +

    Usually the calculation is returning 2 * E / (E - n) where E is the sum of t / (t - 2) over all t_stat_df values t.

    -

    Note

    +

    Note +

    If the input values are two similar to each other then just the average of them is returned. If any of the inputs is not larger than 2 then 2 is returned.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_mmrm_tmb_assert_start.html b/v0.3.2/reference/h_mmrm_tmb_assert_start.html index 784690148..24a873095 100644 --- a/v0.3.2/reference/h_mmrm_tmb_assert_start.html +++ b/v0.3.2/reference/h_mmrm_tmb_assert_start.html @@ -1,5 +1,25 @@ - -Asserting Sane Start Values for TMB Fit — h_mmrm_tmb_assert_start • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_assert_start(tmb_object)
    -

    Arguments

    -
    tmb_object
    +

    Arguments +

    +
    +
    tmb_object

    (list)
    created with TMB::MakeADFun().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used for assertions.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_mmrm_tmb_check_conv.html b/v0.3.2/reference/h_mmrm_tmb_check_conv.html index a8cdbc22d..12d2bb0fb 100644 --- a/v0.3.2/reference/h_mmrm_tmb_check_conv.html +++ b/v0.3.2/reference/h_mmrm_tmb_check_conv.html @@ -1,5 +1,25 @@ - -Checking the TMB Optimization Result — h_mmrm_tmb_check_conv • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,22 +140,27 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_check_conv(tmb_opt, mmrm_tmb)
    -

    Arguments

    -
    tmb_opt
    +

    Arguments +

    +
    +
    tmb_opt

    (list)
    optimization result.

    mmrm_tmb

    (mmrm_tmb)
    result from h_mmrm_tmb_fit().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used to generate warnings in case that the model @@ -135,22 +168,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_mmrm_tmb_data.html b/v0.3.2/reference/h_mmrm_tmb_data.html index c0c6c7611..791f5d730 100644 --- a/v0.3.2/reference/h_mmrm_tmb_data.html +++ b/v0.3.2/reference/h_mmrm_tmb_data.html @@ -1,5 +1,25 @@ - -Data for TMB Fit — h_mmrm_tmb_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_data(
       formula_parts,
       data,
    @@ -126,8 +155,10 @@ 

    Usage

    -

    Arguments

    -
    formula_parts
    +

    Arguments +

    +
    +
    formula_parts

    (mmrm_tmb_formula_parts)
    list with formula parts from h_mmrm_tmb_formula_parts().

    @@ -161,12 +192,16 @@

    Arguments -

    Value

    +

    Value +

    -

    List of class mmrm_tmb_data with elements:

    • full_frame: data.frame with n rows containing all variables needed in the model.

    • +

      List of class mmrm_tmb_data with elements:

      +
        +
      • full_frame: data.frame with n rows containing all variables needed in the model.

      • data: data.frame of input dataset.

      • x_matrix: matrix with n rows and p columns specifying the overall design matrix.

      • x_cols_aliased: logical with potentially more than p elements indicating which @@ -187,9 +222,11 @@

        Value

        reml: int specifying whether REML estimation is used (1), otherwise ML (0).

      • subject_groups: factor specifying the grouping for each subject.

      • n_groups: int with the number of total groups

      • -
    + +
    -

    Details

    +

    Details +

    Note that the subject_var must not be factor but can also be character. If it is character, then it will be converted to factor internally. Here the levels will be the unique values, sorted alphabetically and numerically if there @@ -198,22 +235,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.2/reference/h_mmrm_tmb_extract_cov.html b/v0.3.2/reference/h_mmrm_tmb_extract_cov.html index bc350d667..4c2a885af 100644 --- a/v0.3.2/reference/h_mmrm_tmb_extract_cov.html +++ b/v0.3.2/reference/h_mmrm_tmb_extract_cov.html @@ -1,7 +1,27 @@ - -Extract covariance matrix from TMB report and input data — h_mmrm_tmb_extract_cov • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_extract_cov(tmb_report, tmb_data, visit_var, is_spatial)
    -

    Arguments

    -
    tmb_report
    +

    Arguments +

    +
    +
    tmb_report

    (list)
    report created with TMB::MakeADFun() report function.

    @@ -136,9 +167,11 @@

    Arguments -

    Value

    +

    Value +

    Return a simple covariance matrix if there is no grouping, or a named @@ -147,22 +180,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_mmrm_tmb_fit.html b/v0.3.2/reference/h_mmrm_tmb_fit.html index 65caeb7b2..513148ae3 100644 --- a/v0.3.2/reference/h_mmrm_tmb_fit.html +++ b/v0.3.2/reference/h_mmrm_tmb_fit.html @@ -1,7 +1,27 @@ - -Build TMB Fit Result List — h_mmrm_tmb_fit • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_fit(tmb_object, tmb_opt, formula_parts, tmb_data)
    -

    Arguments

    -
    tmb_object
    +

    Arguments +

    +
    +
    tmb_object

    (list)
    created with TMB::MakeADFun().

    @@ -137,12 +168,16 @@

    Argumentsh_mmrm_tmb_data().

    -

    + +
    -

    Value

    +

    Value +

    -

    List of class mmrm_tmb with:

    • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

    • +

      List of class mmrm_tmb with:

      +
        +
      • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

      • beta_est: vector of coefficient estimates.

      • beta_vcov: Variance-covariance matrix for coefficient estimates.

      • beta_vcov_inv_L: Lower triangular matrix L of the inverse variance-covariance matrix decomposition.

      • @@ -157,31 +192,37 @@

        Value

        opt_details: list with optimization details including convergence code.

      • tmb_object: original TMB object created with TMB::MakeADFun().

      • tmb_data: input.

      • -
    + +
    -

    Details

    +

    Details +

    Instead of inverting or decomposing beta_vcov, it can be more efficient to use its robust Cholesky decomposition LDL^T, therefore we return the corresponding two components L and D as well since they have been available on the C++ side already.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_mmrm_tmb_formula_parts.html b/v0.3.2/reference/h_mmrm_tmb_formula_parts.html index b8c023085..b75b5ae86 100644 --- a/v0.3.2/reference/h_mmrm_tmb_formula_parts.html +++ b/v0.3.2/reference/h_mmrm_tmb_formula_parts.html @@ -1,5 +1,25 @@ - -Processing the Formula for TMB Fit — h_mmrm_tmb_formula_parts • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_formula_parts(
       formula,
       covariance = as.cov_struct(formula, warn_partial = FALSE)
    @@ -120,8 +149,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    Original formula.

    @@ -129,12 +160,16 @@

    Arguments -

    Value

    +

    Value +

    -

    List of class mmrm_tmb_formula_parts with elements:

    • formula: the original input.

    • +

      List of class mmrm_tmb_formula_parts with elements:

      +
        +
      • formula: the original input.

      • model_formula: formula with the covariance term is removed.

      • model_formula: formula with the covariance term removed.

      • full_formula: same as model_formula but includes the covariance @@ -146,25 +181,30 @@

        Value

        subject_var: string with the subject variable name.

      • group_var: string with the group variable name. If no group specified, this element is NULL.

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_mmrm_tmb_parameters.html b/v0.3.2/reference/h_mmrm_tmb_parameters.html index 898b7b9ab..a1ab0700b 100644 --- a/v0.3.2/reference/h_mmrm_tmb_parameters.html +++ b/v0.3.2/reference/h_mmrm_tmb_parameters.html @@ -1,5 +1,25 @@ - -Start Parameters for TMB Fit — h_mmrm_tmb_parameters • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_parameters(formula_parts, tmb_data, start, n_groups = 1L)
    -

    Arguments

    -
    formula_parts
    +

    Arguments +

    +
    +
    formula_parts

    (mmrm_tmb_formula_parts)
    produced by h_mmrm_tmb_formula_parts().

    @@ -135,9 +166,11 @@

    Arguments -

    Value

    +

    Value +

    List with element theta containing the start values for the variance @@ -145,22 +178,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_newdata_add_pred.html b/v0.3.2/reference/h_newdata_add_pred.html index 6ae7d3095..aa921c752 100644 --- a/v0.3.2/reference/h_newdata_add_pred.html +++ b/v0.3.2/reference/h_newdata_add_pred.html @@ -1,5 +1,25 @@ - -Add Prediction Results to New Data — h_newdata_add_pred • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_newdata_add_pred(x, newdata, se_fit, interval, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fit.

    @@ -138,9 +169,11 @@

    Argumentspredict.mmrm_tmb().

    -

    + +
    -

    Value

    +

    Value +

    The newdata as a tibble with additional columns .fitted, @@ -151,22 +184,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_optimizer_fun.html b/v0.3.2/reference/h_optimizer_fun.html index 853e513c0..12b20ea1c 100644 --- a/v0.3.2/reference/h_optimizer_fun.html +++ b/v0.3.2/reference/h_optimizer_fun.html @@ -1,5 +1,25 @@ - -Obtain Optimizer Function with Character — h_optimizer_fun • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_optimizer_fun(optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"))
    -

    Arguments

    -
    optimizer
    +

    Arguments +

    +
    +
    optimizer

    (character)
    vector of optimizers.

    -
    + +
    -

    Value

    +

    Value +

    A (list)
    of optimizer functions generated from h_partial_fun_args().

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_partial_fun_args.html b/v0.3.2/reference/h_partial_fun_args.html index 24f6c2b96..c67f1d01a 100644 --- a/v0.3.2/reference/h_partial_fun_args.html +++ b/v0.3.2/reference/h_partial_fun_args.html @@ -1,5 +1,25 @@ - -Create Partial Functions — h_partial_fun_args • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_partial_fun_args(fun, ..., additional_attr = list())
    -

    Arguments

    -
    fun
    +

    Arguments +

    +
    +
    fun

    (function)
    to be wrapped.

    @@ -129,16 +160,19 @@

    Arguments -

    Value

    +

    Value +

    Object with S3 class "partial", a function with args attribute (and possibly more attributes from additional_attr).

    -

    Details

    +

    Details +

    This function add args attribute to the original function, and add an extra class partial to the function. args is the argument for the function, and elements in ... will override the existing @@ -146,22 +180,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.2/reference/h_print_aic_list.html b/v0.3.2/reference/h_print_aic_list.html index 86e07bd7e..4a59c660c 100644 --- a/v0.3.2/reference/h_print_aic_list.html +++ b/v0.3.2/reference/h_print_aic_list.html @@ -1,5 +1,25 @@ - -Printing AIC and other Model Fit Criteria — h_print_aic_list • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,38 +140,46 @@
    -

    Usage

    +

    Usage +

    h_print_aic_list(aic_list, digits = 1)
    -

    Arguments

    -
    aic_list
    +

    Arguments +

    +
    +
    aic_list

    (list)
    list as part of from summary.mmrm().

    digits

    (number)
    number of decimal places used with round().

    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_print_call.html b/v0.3.2/reference/h_print_call.html index 52abd6061..d62898289 100644 --- a/v0.3.2/reference/h_print_call.html +++ b/v0.3.2/reference/h_print_call.html @@ -1,5 +1,25 @@ - -Printing MMRM Function Call — h_print_call • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_print_call(call, n_obs, n_subjects, n_timepoints)
    -

    Arguments

    -
    call
    +

    Arguments +

    +
    +
    call

    (call)
    original mmrm() function call.

    @@ -133,25 +164,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.2/reference/h_print_cov.html b/v0.3.2/reference/h_print_cov.html index a724ec539..0072fa902 100644 --- a/v0.3.2/reference/h_print_cov.html +++ b/v0.3.2/reference/h_print_cov.html @@ -1,5 +1,25 @@ - -Printing MMRM Covariance Type — h_print_cov • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_print_cov(cov_type, n_theta, n_groups)
    -

    Arguments

    -
    cov_type
    +

    Arguments +

    +
    +
    cov_type

    (string)
    covariance structure abbreviation.

    @@ -129,25 +160,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.2/reference/h_quad_form.html b/v0.3.2/reference/h_quad_form.html index 7a08d8f72..da2da8b3c 100644 --- a/v0.3.2/reference/h_quad_form.html +++ b/v0.3.2/reference/h_quad_form.html @@ -1,7 +1,27 @@ - -Quadratic Form Calculations — h_quad_form • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,15 +143,18 @@
    -

    Usage

    +

    Usage +

    h_quad_form_vec(vec, center)
     
     h_quad_form_mat(mat, center)
    -

    Arguments

    -
    vec
    +

    Arguments +

    +
    +
    vec

    (numeric)
    interpreted as a row vector.

    @@ -137,34 +168,42 @@

    Arguments -

    Functions

    +

    Functions +

    -
    • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) +

        +
      • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) as a numeric (not a matrix).

      • h_quad_form_mat(): calculates the quadratic form mat %*% center %*% t(mat) as a matrix, the result is square and has dimensions identical to the number of rows in mat.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_reconcile_cov_struct.html b/v0.3.2/reference/h_reconcile_cov_struct.html index dcebe411a..998c8217e 100644 --- a/v0.3.2/reference/h_reconcile_cov_struct.html +++ b/v0.3.2/reference/h_reconcile_cov_struct.html @@ -1,5 +1,25 @@ - -Reconcile Possible Covariance Structure Inputs — h_reconcile_cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_reconcile_cov_struct(formula = NULL, covariance = NULL)
    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -128,9 +159,11 @@

    Argumentsas.cov_struct(). If no value is provided, a structure is derived from the provided formula.

    -

    + +
    -

    Value

    +

    Value +

    The value covariance if it's provided or a covariance structure @@ -139,22 +172,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_record_all_output.html b/v0.3.2/reference/h_record_all_output.html index b551d2e2a..4fc6b2202 100644 --- a/v0.3.2/reference/h_record_all_output.html +++ b/v0.3.2/reference/h_record_all_output.html @@ -1,9 +1,29 @@ - - + + + + + +Capture all Output — h_record_all_output • mmrm +Capture all Output — h_record_all_output • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    h_record_all_output(expr, remove = list(), divergence = list())
    -

    Arguments

    -
    expr
    +

    Arguments +

    +
    +
    expr

    (expression)
    to be executed.

    @@ -139,35 +170,44 @@

    Arguments -

    Value

    +

    Value +

    -

    A list containing

    • result: The object returned by expr or list() if an error was thrown.

    • +

      A list containing

      +
        +
      • result: The object returned by expr or list() if an error was thrown.

      • warnings: NULL or a character vector if warnings were thrown.

      • errors: NULL or a string if an error was thrown.

      • messages: NULL or a character vector if messages were produced.

      • divergence: NULL or a character vector if divergence messages were caught.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_residuals_normalized.html b/v0.3.2/reference/h_residuals_normalized.html index 5d9b54089..2edc4cf09 100644 --- a/v0.3.2/reference/h_residuals_normalized.html +++ b/v0.3.2/reference/h_residuals_normalized.html @@ -1,5 +1,25 @@ - -Calculate normalized residuals — h_residuals_normalized • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_normalized(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_residuals_pearson.html b/v0.3.2/reference/h_residuals_pearson.html index 35fd83ca8..b56a8228d 100644 --- a/v0.3.2/reference/h_residuals_pearson.html +++ b/v0.3.2/reference/h_residuals_pearson.html @@ -1,5 +1,25 @@ - -Calculate Pearson Residuals — h_residuals_pearson • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_pearson(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_residuals_response.html b/v0.3.2/reference/h_residuals_response.html index e2307902b..4d97c1dd1 100644 --- a/v0.3.2/reference/h_residuals_response.html +++ b/v0.3.2/reference/h_residuals_response.html @@ -1,5 +1,25 @@ - -Calculate response residuals. — h_residuals_response • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_response(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_split_control.html b/v0.3.2/reference/h_split_control.html index 16682706c..296f26898 100644 --- a/v0.3.2/reference/h_split_control.html +++ b/v0.3.2/reference/h_split_control.html @@ -1,7 +1,27 @@ - -Split Control List — h_split_control • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,44 +143,53 @@
    -

    Usage

    +

    Usage +

    h_split_control(control, ...)
    -

    Arguments

    -
    control
    +

    Arguments +

    +
    +
    control

    (mmrm_control)
    object.

    ...

    additional parameters to update the control object.

    -
    + +
    -

    Value

    +

    Value +

    A list of mmrm_control entries.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_summarize_all_fits.html b/v0.3.2/reference/h_summarize_all_fits.html index 817a35578..dc5af7803 100644 --- a/v0.3.2/reference/h_summarize_all_fits.html +++ b/v0.3.2/reference/h_summarize_all_fits.html @@ -1,5 +1,25 @@ - -Summarizing List of Fits — h_summarize_all_fits • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_summarize_all_fits(all_fits)
    -

    Arguments

    -
    all_fits
    +

    Arguments +

    +
    +
    all_fits

    (list of mmrm_fit or try-error)
    list of fits.

    -
    + +
    -

    Value

    +

    Value +

    List with warnings, messages, log_liks and converged results.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_tbl_confint_terms.html b/v0.3.2/reference/h_tbl_confint_terms.html index e62be009b..3cea074e9 100644 --- a/v0.3.2/reference/h_tbl_confint_terms.html +++ b/v0.3.2/reference/h_tbl_confint_terms.html @@ -1,5 +1,25 @@ - -Extract tibble with Confidence Intervals and Term Names — h_tbl_confint_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,44 +140,53 @@
    -

    Usage

    +

    Usage +

    h_tbl_confint_terms(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fit object.

    ...

    passed to stats::confint(), hence not used at the moment.

    -
    + +
    -

    Value

    +

    Value +

    A tibble with term, conf.low, conf.high columns.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_test_1d.html b/v0.3.2/reference/h_test_1d.html index 5614abb12..516217220 100644 --- a/v0.3.2/reference/h_test_1d.html +++ b/v0.3.2/reference/h_test_1d.html @@ -1,7 +1,27 @@ - -Creating T-Statistic Test Results For One-Dimensional Contrast — h_test_1d • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_test_1d(object, contrast, df)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -134,31 +165,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val (2-sided p-value).

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_test_md.html b/v0.3.2/reference/h_test_md.html index 2955bf200..9b9f5eceb 100644 --- a/v0.3.2/reference/h_test_md.html +++ b/v0.3.2/reference/h_test_md.html @@ -1,7 +1,27 @@ - -Creating F-Statistic Test Results For Multi-Dimensional Contrast — h_test_md • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_test_md(object, contrast, df, f_stat_factor = 1)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -136,31 +167,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_tr.html b/v0.3.2/reference/h_tr.html index 51ebb212c..ea484b5c8 100644 --- a/v0.3.2/reference/h_tr.html +++ b/v0.3.2/reference/h_tr.html @@ -1,5 +1,25 @@ - -Trace of a Matrix — h_tr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_tr(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (matrix)
    square matrix input.

    -
    + +
    -

    Value

    +

    Value +

    The trace of the square matrix.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_valid_formula.html b/v0.3.2/reference/h_valid_formula.html index d52ffb9f7..ceaad4347 100644 --- a/v0.3.2/reference/h_valid_formula.html +++ b/v0.3.2/reference/h_valid_formula.html @@ -1,5 +1,25 @@ - -Validate mmrm Formula — h_valid_formula • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,39 +140,48 @@
    -

    Usage

    +

    Usage +

    h_valid_formula(formula)
    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    to check.

    -
    + +
    -

    Details

    +

    Details +

    In mmrm models, . is not allowed as it introduces ambiguity of covariates to be used, so it is not allowed to be in formula.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_var_adj.html b/v0.3.2/reference/h_var_adj.html index 5fdfd58a4..a3402af4b 100644 --- a/v0.3.2/reference/h_var_adj.html +++ b/v0.3.2/reference/h_var_adj.html @@ -1,9 +1,29 @@ - -Obtain the Adjusted Covariance Matrix — h_var_adj • mmrm +Obtain the Adjusted Covariance Matrix — h_var_adj • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    h_var_adj(v, w, p, q, r, linear = FALSE)
    -

    Arguments

    -
    v
    +

    Arguments +

    +
    +
    v

    (matrix)
    unadjusted covariance matrix.

    @@ -147,31 +178,37 @@

    Arguments -

    Value

    +

    Value +

    The matrix of adjusted covariance matrix.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_warn_na_action.html b/v0.3.2/reference/h_warn_na_action.html index ae8fbefeb..c04975c29 100644 --- a/v0.3.2/reference/h_warn_na_action.html +++ b/v0.3.2/reference/h_warn_na_action.html @@ -1,5 +1,25 @@ - -Warn on na.action — h_warn_na_action • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,27 +140,32 @@
    -

    Usage

    +

    Usage +

    h_warn_na_action()
    - + +
    -
    + + - - + + diff --git a/v0.3.2/reference/h_within_or_between.html b/v0.3.2/reference/h_within_or_between.html index 8310bc82f..8ded2fb49 100644 --- a/v0.3.2/reference/h_within_or_between.html +++ b/v0.3.2/reference/h_within_or_between.html @@ -1,7 +1,27 @@ - -Determine Within or Between for each Design Matrix Column — h_within_or_between • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,22 +143,27 @@
    -

    Usage

    +

    Usage +

    h_within_or_between(x_matrix, subject_ids)
    -

    Arguments

    -
    x_matrix
    +

    Arguments +

    +
    +
    x_matrix

    (matrix)
    the design matrix with column names.

    subject_ids

    (factor)
    the subject IDs.

    -
    + +
    -

    Value

    +

    Value +

    Character vector with "intercept", "within" or "between" for each @@ -138,22 +171,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/index.html b/v0.3.2/reference/index.html index 029124912..022e748be 100644 --- a/v0.3.2/reference/index.html +++ b/v0.3.2/reference/index.html @@ -1,5 +1,23 @@ - -Function reference • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +44,8 @@ + - + + - + @@ -106,189 +132,252 @@
    -

    Package

    +

    Package +

    -
    +
    +
    -
    +
    +
    mmrm-package _PACKAGE
    -
    mmrm Package
    -
    -

    Functions

    +
    +mmrm Package
    + +
    +
    +

    Functions +

    -
    +
    +
    -
    +
    +
    mmrm()
    Fit an MMRM
    -
    +
    +
    +
    fit_mmrm()
    Low-Level Fitting Function for MMRM
    -
    +
    +
    +
    mmrm_control()
    Control Parameters for Fitting an MMRM
    -
    +
    +
    +
    fit_single_optimizer()
    Fitting an MMRM with Single Optimizer
    -
    +
    +
    +
    refit_multiple_optimizers()
    Refitting MMRM with Multiple Optimizers
    -
    +
    +
    +
    df_1d()
    Calculation of Degrees of Freedom for One-Dimensional Contrast
    -
    +
    +
    +
    df_md()
    Calculation of Degrees of Freedom for Multi-Dimensional Contrast
    -
    +
    +
    +
    component()
    Component Access for mmrm_tmb Objects
    -
    -

    Methods

    + +
    +
    +

    Methods +

    -
    +
    +
    -

    Covariance Structures

    + +
    +
    +

    Covariance Structures +

    -
    +
    +
    -
    +
    +
    cov_struct()
    Define a Covariance Structure
    -
    +
    +
    +
    as.cov_struct()
    Coerce into a Covariance Structure Definition
    -
    +
    +
    +
    format(<cov_struct>)
    Format Covariance Structure Object
    -
    +
    +
    +
    print(<cov_struct>)
    Print a Covariance Structure Object
    -
    +
    +
    +
    cov_types()
    Covariance Types
    -
    -

    Estimate Marginal Means

    + +
    +
    +

    Estimate Marginal Means +

    -
    +
    +
    -
    +
    +
    emmeans_support
    -
    Support for emmeans
    -
    -

    Datasets

    +
    Support for emmeans +
    + +
    +
    +

    Datasets +

    -
    +
    +
    -
    +
    +
    fev_data
    Example Data on FEV1
    -
    +
    +
    +
    bcva_data
    Example Data on BCVA
    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.2/reference/is_infix.html b/v0.3.2/reference/is_infix.html index 239306603..5263895c4 100644 --- a/v0.3.2/reference/is_infix.html +++ b/v0.3.2/reference/is_infix.html @@ -1,5 +1,25 @@ - -Test Whether a Symbol is an Infix Operator — is_infix • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,49 +140,62 @@
    -

    Usage

    +

    Usage +

    is_infix(name)
    -

    Arguments

    -
    name
    +

    Arguments +

    +
    +
    name

    (symbol or name or string)
    a possible reference to an infix operator to check.

    -
    + +
    -

    Value

    +

    Value +

    A logical indicating whether the name is the name of an infix operator.

    -

    is_infix(as.name("|"))
    +

    +
    +
    is_infix(as.name("|"))
     is_infix("|")
    -is_infix("c")

    +is_infix("c")
    +

    +
    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/mmrm-package.html b/v0.3.2/reference/mmrm-package.html index 29b1a278d..2aac9f7b9 100644 --- a/v0.3.2/reference/mmrm-package.html +++ b/v0.3.2/reference/mmrm-package.html @@ -1,5 +1,25 @@ - -mmrm Package — mmrm-package • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -113,15 +142,23 @@
    -

    See also

    -
    -

    Author

    +

    Author +

    Maintainer: Daniel Sabanes Bove daniel.sabanes_bove@roche.com

    -

    Authors:

    + +
    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/mmrm.html b/v0.3.2/reference/mmrm.html index 525f795e6..2cc3a7ba1 100644 --- a/v0.3.2/reference/mmrm.html +++ b/v0.3.2/reference/mmrm.html @@ -1,7 +1,27 @@ - -Fit an MMRM — mmrm • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,7 +143,8 @@
    -

    Usage

    +

    Usage +

    mmrm(
       formula,
       data,
    @@ -128,8 +157,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -162,15 +193,18 @@

    Argumentsmmrm_control().

    -

    + +
    -

    Value

    +

    Value +

    An mmrm object.

    -

    Details

    +

    Details +

    The formula typically looks like: FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID) so specifies response and covariates as usual, and exactly one special term @@ -196,15 +230,19 @@

    Detailsmmrm.

    -

    Note

    +

    Note +

    The mmrm object is also an mmrm_fit and an mmrm_tmb object, therefore corresponding methods also work (see mmrm_tmb_methods).

    -

    Additional contents depend on the choice of the adjustment method:

    • If Satterthwaite adjustment is used, the Jacobian information jac_list +

      Additional contents depend on the choice of the adjustment method:

      +
        +
      • If Satterthwaite adjustment is used, the Jacobian information jac_list is included.

      • If Kenward-Roger adjustment is used, kr_comp contains necessary components and beta_vcov_adj includes the adjusted coefficients covariance matrix.

      • -

      Use of the package emmeans is supported, see emmeans_support.

      +
    +

    Use of the package emmeans is supported, see emmeans_support.

    NA values are always omitted regardless of na.action setting.

    When the number of visit levels is large, it usually requires large memory to create the covariance matrix. By default, the maximum allowed visit levels is 100, and if there are more @@ -215,7 +253,8 @@

    Note

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -239,22 +278,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.2/reference/mmrm_control.html b/v0.3.2/reference/mmrm_control.html index 01fed8c18..a107d95bd 100644 --- a/v0.3.2/reference/mmrm_control.html +++ b/v0.3.2/reference/mmrm_control.html @@ -1,9 +1,29 @@ - - + + + + + +Control Parameters for Fitting an MMRM — mmrm_control • mmrm +Control Parameters for Fitting an MMRM — mmrm_control • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,7 +146,8 @@
    -

    Usage

    +

    Usage +

    mmrm_control(
       n_cores = 1L,
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within"),
    @@ -132,8 +161,10 @@ 

    Usage

    -

    Arguments

    -
    n_cores
    +

    Arguments +

    +
    +
    n_cores

    (count)
    number of cores to be used.

    @@ -167,15 +198,18 @@

    Argumentsh_get_optimizers().

    -

    + +
    -

    Value

    +

    Value +

    List of class mmrm_control with the control parameters.

    + +
    -

    Examples

    +

    Examples +

    mmrm_control(
       optimizer_fun = stats::optim,
       optimizer_args = list(method = "L-BFGS-B")
    @@ -308,22 +346,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.2/reference/mmrm_methods.html b/v0.3.2/reference/mmrm_methods.html index c1f4e5a69..9dd1ec0cb 100644 --- a/v0.3.2/reference/mmrm_methods.html +++ b/v0.3.2/reference/mmrm_methods.html @@ -1,5 +1,25 @@ - -Methods for mmrm Objects — mmrm_methods • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm
     summary(object, ...)
     
    @@ -126,48 +155,65 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the fitted MMRM including Jacobian and call etc.

    ...

    not used.

    -
    + +
    -

    Value

    +

    Value +

    Depends on the method, see Details and Functions.

    -

    Details

    -

    While printing the summary of (mmrm)
    object, the following will be displayed:

    1. Formula. The formula used in the model.

    2. +

      Details +

      +

      While printing the summary of (mmrm)
      object, the following will be displayed:

      +
        +
      1. Formula. The formula used in the model.

      2. Data. The data used for analysis, including number of subjects, number of valid observations.

      3. Covariance. The covariance structure and number of variance parameters.

      4. Method. Restricted maximum likelihood(REML) or maximum likelihood(ML).

      5. Model selection criteria. AIC, BIC, log likelihood and deviance.

      6. Coefficients. Coefficients of the covariates.

      7. -
      8. Covariance estimate. The covariance estimate(for each group).

        1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available +

        2. +

          Covariance estimate. The covariance estimate(for each group).

          +
            +
          1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available in data will be displayed.

          2. If the covariance structure is spatial, the covariance matrix of two time points with unit distance will be displayed.

          3. -
        3. -
    + + + +
    -

    Functions

    +

    Functions +

    -
    • summary(mmrm): summarizes the MMRM fit results.

    • +
        +
      • summary(mmrm): summarizes the MMRM fit results.

      • print(summary.mmrm): prints the MMRM fit summary.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_tmb_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- mmrm(formula, fev_data)
     # Summary:
    @@ -224,22 +270,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.2/reference/mmrm_tidiers.html b/v0.3.2/reference/mmrm_tidiers.html index 838af4202..2b74f9b9b 100644 --- a/v0.3.2/reference/mmrm_tidiers.html +++ b/v0.3.2/reference/mmrm_tidiers.html @@ -1,9 +1,29 @@ - - + + + + + +Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm +Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,7 +146,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm
     tidy(x, conf.int = FALSE, conf.level = 0.95, ...)
     
    @@ -137,8 +166,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fitted model.

    @@ -170,21 +201,27 @@

    Argumentsresiduals.mmrm_tmb().

    -

    + +
    -

    Functions

    +

    Functions +

    -
    • tidy(mmrm): derives tidy tibble from an mmrm object.

    • +
        +
      • tidy(mmrm): derives tidy tibble from an mmrm object.

      • glance(mmrm): derives glance tibble from an mmrm object.

      • augment(mmrm): derives augment tibble from an mmrm object.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tmb_methods for additional methods.

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -276,22 +313,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.2/reference/mmrm_tmb_methods.html b/v0.3.2/reference/mmrm_tmb_methods.html index 7df60c3dd..85d06c605 100644 --- a/v0.3.2/reference/mmrm_tmb_methods.html +++ b/v0.3.2/reference/mmrm_tmb_methods.html @@ -1,5 +1,25 @@ - -Methods for mmrm_tmb Objects — mmrm_tmb_methods • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm_tmb
     coef(object, complete = TRUE, ...)
     
    @@ -185,8 +214,10 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM object.

    @@ -272,15 +303,18 @@

    Arguments -

    + +
    -

    Value

    +

    Value +

    Depends on the method, see Functions.

    -

    Details

    +

    Details +

    include argument controls the variables the returned model frame will include. Possible options are "response_var", "subject_var", "visit_var" and "group_var", representing the response variable, subject variable, visit variable or group variable. @@ -288,9 +322,11 @@

    Detailsmodel.matrix.

    -

    Functions

    +

    Functions +

    -
    • coef(mmrm_tmb): obtains the estimated coefficients.

    • +
        +
      • coef(mmrm_tmb): obtains the estimated coefficients.

      • fitted(mmrm_tmb): obtains the fitted values.

      • predict(mmrm_tmb): predict conditional means for new data; optionally with standard errors and confidence or prediction intervals. @@ -324,11 +360,14 @@

        Functions -

        References

        +

        References +

        -
        • Hurvich CM, Tsai C (1989). +

          • Gałecki A, Burzykowski T (2013). +

          +
            +
          • Gałecki A, Burzykowski T (2013). “Linear mixed-effects model.” In Linear mixed-effects models using R, 245--273. Springer.

          • -
    + +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- fit_mmrm(formula, fev_data, weights = rep(1, nrow(fev_data)))
     # Estimated coefficients:
    @@ -3863,22 +3907,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.2/reference/parsnip_add_mmrm.html b/v0.3.2/reference/parsnip_add_mmrm.html index 339faab8f..26c788e93 100644 --- a/v0.3.2/reference/parsnip_add_mmrm.html +++ b/v0.3.2/reference/parsnip_add_mmrm.html @@ -1,5 +1,25 @@ - -Register mmrm For Use With tidymodels — parsnip_add_mmrm • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -112,45 +141,55 @@
    -

    Usage

    +

    Usage +

    parsnip_add_mmrm(quietly = FALSE)
    -

    Arguments

    -
    quietly
    +

    Arguments +

    +
    +
    quietly

    logical: should progress and error messages be suppressed?

    -
    + +
    -

    Value

    +

    Value +

    A logical value indicating whether registration was successful.

    -

    Details

    +

    Details +

    We can use parsnip::show_model_info("linear_reg") to check the registration with parsnip and thus the wider tidymodels ecosystem.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/position_symbol.html b/v0.3.2/reference/position_symbol.html index dcf6e9d15..446d6e832 100644 --- a/v0.3.2/reference/position_symbol.html +++ b/v0.3.2/reference/position_symbol.html @@ -1,9 +1,29 @@ - - + + + + + +Search For the Position of a Symbol — position_symbol • mmrm +Search For the Position of a Symbol — position_symbol • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    position_symbol(x, sym, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (list of language)
    a list of language objects in which to search for a specific symbol.

    @@ -137,9 +168,11 @@

    ArgumentsPosition().

    -

    + +
    -

    Value

    +

    Value +

    The position of the symbol if found, or the nomatch value @@ -147,22 +180,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/print.cov_struct.html b/v0.3.2/reference/print.cov_struct.html index 8987928dd..a6637463c 100644 --- a/v0.3.2/reference/print.cov_struct.html +++ b/v0.3.2/reference/print.cov_struct.html @@ -1,5 +1,25 @@ - -Print a Covariance Structure Object — print.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,45 +140,54 @@
    -

    Usage

    +

    Usage +

    # S3 method for cov_struct
     print(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    ...

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    x invisibly.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/reexports.html b/v0.3.2/reference/reexports.html index e3ce53ffb..25b649899 100644 --- a/v0.3.2/reference/reexports.html +++ b/v0.3.2/reference/reexports.html @@ -1,19 +1,39 @@ - - + + + + + +Objects exported from other packages — reexports • mmrm +Objects exported from other packages — reexports • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -38,7 +60,8 @@ + - + + - + @@ -124,30 +152,36 @@

    These objects are imported from other packages. Follow the links below to see their documentation.

    -
    generics
    +
    +
    generics

    augment, glance, tidy

    -
    + + - + +
    -
    + + - - + + diff --git a/v0.3.2/reference/refit_multiple_optimizers.html b/v0.3.2/reference/refit_multiple_optimizers.html index 207f66bd7..ce6eef334 100644 --- a/v0.3.2/reference/refit_multiple_optimizers.html +++ b/v0.3.2/reference/refit_multiple_optimizers.html @@ -1,5 +1,25 @@ - -Refitting MMRM with Multiple Optimizers — refit_multiple_optimizers • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    refit_multiple_optimizers(fit, ..., control = mmrm_control(...))
    -

    Arguments

    -
    fit
    +

    Arguments +

    +
    +
    fit

    (mmrm_fit)
    original model fit from fit_single_optimizer().

    @@ -129,20 +160,24 @@

    Arguments -

    Value

    +

    Value +

    The best (in terms of log likelihood) fit which converged.

    -

    Note

    +

    Note +

    For Windows, no parallel computations are currently implemented.

    -

    Examples

    +

    Examples +

    fit <- fit_single_optimizer(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data,
    @@ -153,22 +188,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.2/reference/register_on_load.html b/v0.3.2/reference/register_on_load.html index a67e81655..5ae0370be 100644 --- a/v0.3.2/reference/register_on_load.html +++ b/v0.3.2/reference/register_on_load.html @@ -1,5 +1,25 @@ - -Helper Function for Registering Functionality With Suggests Packages — register_on_load • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    register_on_load(
       pkg,
       ver = c(NA_character_, NA_character_),
    @@ -122,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    pkg
    +

    Arguments +

    +
    +
    pkg

    (string)
    package name.

    @@ -144,9 +175,11 @@

    Arguments -

    Value

    +

    Value +

    A logical (invisibly) indicating whether registration was successful. @@ -154,22 +187,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/tmb_cov_type.html b/v0.3.2/reference/tmb_cov_type.html index 656929efd..09dda4bdc 100644 --- a/v0.3.2/reference/tmb_cov_type.html +++ b/v0.3.2/reference/tmb_cov_type.html @@ -1,5 +1,25 @@ - -Produce A Covariance Identifier Passing to TMB — tmb_cov_type • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    tmb_cov_type(cov)
    -

    Arguments

    -
    cov
    +

    Arguments +

    +
    +
    cov

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    A string used for method dispatch when passed to TMB.

    + +
    -
    + + - - + + diff --git a/v0.3.2/reference/validate_cov_struct.html b/v0.3.2/reference/validate_cov_struct.html index f494d8f75..67832c89c 100644 --- a/v0.3.2/reference/validate_cov_struct.html +++ b/v0.3.2/reference/validate_cov_struct.html @@ -1,5 +1,25 @@ - -Validate Covariance Structure Data — validate_cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    validate_cov_struct(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    x if successful, or an error is thrown otherwise.

    + +
    -
    + + - - + + diff --git a/v0.3.3/404.html b/v0.3.3/404.html index 87dab87ef..2f98596c0 100644 --- a/v0.3.3/404.html +++ b/v0.3.3/404.html @@ -1,5 +1,4 @@ - - + @@ -81,11 +80,10 @@ Changelog +v0.2.2 + + - + + - + @@ -110,46 +136,66 @@

    Thank you for your interest in contributing to this repo! Your contribution is highly valued. Please go through this document for guidance on how to contribute.

    -

    Programming conventions

    +

    Programming conventions +

    Please follow the programming conventions to ensure a consistent programming style across the package.

    Generally we follow the tidyverse style guide. Some specific conventions that deviate from this are explained below.

    -

    Functions

    -
    1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
    2. +

      Functions +

      +
        +
      1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
      2. Functions starting with h_ are helper functions and they should not be exported.
      3. Functions should be well documented using roxygen2 (even when they are not exported).
      4. Functions must be unit tested (even when they are not exported).
      5. -
    + +
    -

    Imports

    +

    Imports +

    In package mmrm, we follow the following convention in package imports.

    -
    1. When only a few functions from another package are needed: -
      1. In DESCRIPTION, add that package into Imports.
      2. +
          +
        1. When only a few functions from another package are needed: +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we add a importFrom with a single function from the package. -
            1. The function imported can be any random function within the package.
            2. -
          3. +
              +
            1. The function imported can be any random function within the package.
            2. +
            +
          4. Always use package::function style wherever you need to use the function.
          5. Example: stats.
          6. -
        2. +
        +
      3. When many functions from another package are needed: -
        1. In DESCRIPTION, add that package into Imports.
        2. +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we use a import to import every function.
          3. Use the functions directly without prefix.
          4. Example: checkmate.
          5. -
          -
    + + + +
    -

    Comments

    -
    • Comments should always follow sentence style.
    • +

      Comments +

      +
        +
      • Comments should always follow sentence style.
      • Comments should be as minimal as possible: Generally the code and variable names should be clear enough to not need any comments. Only use them when needed and explain the “Why” and not the “What”.
      • -
    + +
    -

    Documentation

    -
    • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

    • +

      Documentation +

      +
        +
      • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

      • Exported objects must have a lifecycle badge to clarify the maturity.

        -
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • -
      • +
          +
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • +
        +
      • Use Title Style for the title of the documentation.

      • Always include a @description part with at least one sentence describing the object.

      • @@ -161,38 +207,55 @@

        Documentationwebsite.

      • In vignettes, you cannot directly reference help pages but only pkgdown web pages. Note that this includes only exported objects. To make it look similar to the help page references, please here also use function() style.

      • mmrm_review_methods.Rmd is a large vignette and we precompute this vignette to make the GitHub actions faster. Run the script vignettes/precompile.R to regenerate the precomputed vignette and subsequently update it in GitHub. Before every release we need to run this again. Please note you need to install the package and then compile the vignette because efficiency is better after installation to provide a fair comparison.

      • -
    + +
    -

    Github conventions

    +

    Github conventions +

    When using GitHub to collaborate, the following conventions are needed:

    -
    1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. -
      • If you are going to work on this issue, please assign yourself.
      • -
    2. +
        +
      1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. +
          +
        • If you are going to work on this issue, please assign yourself.
        • +
        +
      2. Please create a branch in the mmrm repository, instead of creating forks, unless you are not yet a team member. -
        • Branches should be associated with a GitHub issue and linked to an issue id.
        • +
            +
          • Branches should be associated with a GitHub issue and linked to an issue id.
          • The name of a branch should be of the form: <issue_id>_<short_discription>.
          • -
          +
        +
      3. Add changes to the branch and push it to GitHub. -
        • Please use clear commit messages.
        • +
            +
          • Please use clear commit messages.
          • Please keep your changes focused on the issue. If there are independent changes, please separate it into another PR linking to another issue.
          • -
          +
        +
      4. Please create a Pull Request when you think your code changes are ready: -
        • Functions are well documented.
        • +
            +
          • Functions are well documented.
          • Functions have corresponding unit tests.
          • Changes pass all the GitHub action checks.
          • The checklist in the corresponding issue is completed.
          • -
          +
        +
      5. Address all the comments you receive. -
        • at least one approval is needed to merge.
        • -
      6. -
    +
      +
    • at least one approval is needed to merge.
    • +
    + + +
    -

    Contribution tips

    +

    Contribution tips +

    -

    Development environment Set-up

    +

    Development environment Set-up +

    The development this mmrm package is based on the latest R version and C++ compilers. The package dependencies are the most recent versions from CRAN. We recommend that your working environment is set up in the same way. Additionally, there are some tools we recommend you to install:

    -
    1. +
        +
      1. RTools if you work on a Windows operating system. Alternatively you can use docker to separate the operating system and the development system.
      2. GitKraken is a very useful user interface for git including visualization of git commit graphs, file history, etc.
      3. @@ -200,43 +263,82 @@

        Development environment Set-uplintr will allow you to perform static code analysis.
      4. pre-commit is a Python module that allows you to identify issues before you commit locally.
      5. -

    + +
    -

    Issue labels

    +

    Issue labels +

    The issues are categorized with several labels:

    - +
    Label name
    ++++ + + - + + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + -
    Label name Description
    SPx
    SPx SP (story points) indicate complexity, and the larger the subsequent number, the more time consuming the issue is expected to be
    priority
    priority Issues with this label should be completed with higher priority
    good first issue
    good first issue Good choices for new team members
    blocked
    blocked Blocked by other issues
    bug
    bug Something isn’t working
    devops
    devops Development and Operation
    discussion
    discussion Discussion needed
    documentation
    documentation Improvement of documentation is needed
    duplicate
    duplicate The issue already exists
    enhancement
    enhancement New feature or request
    help wanted
    help wanted Extra attention is needed
    invalid
    invalid This doesn’t seem right
    question
    question Further information needed

    Please choose an issue based on your interest, issue complexity, and priority.

    + + + +

    Please choose an issue based on your interest, issue complexity, and priority.

    -

    Add new unit tests

    +

    Add new unit tests +

    To add a new unit test, you need to first identify the test scope. Does the test fit in the scope of existing tests? If so, please modify the existing test files under tests/testthat/ folder or src/ folder, depending on whether the code to be tested is R or C++. Otherwise please create a new test file, with a name prefix of “test-”.

    In each test case, use the following structure:

    @@ -249,19 +351,25 @@ 

    Add new unit tests -

    Add integration tests

    +

    Add integration tests +

    Integration tests compare the results of SAS and R and assures the quality of our code. To add an integration test, you need to do the following:

    -
    1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
    2. +
        +
      1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
      2. Save the results in .txt format in the design/SAS/ folder.
      3. Decide the key outputs that are needed for comparison.
      4. Add a unit test verifying that the R implementation of the same model has the same results (conversion may be needed).
      5. -
    + +
    -

    Get started with C++

    +

    Get started with C++ +

    If you have no experience with C++, it is totally fine: TMB has provided us with many high-level functionalities that is very similar to R. Here we only list the most important things that you need to go through before you begin C++ programming.

    -
    1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
    2. +
        +
      1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
      2. Types. C++ is a strong type programming language and all objects need to be declared with type. Sometimes you can combine the declaration and definition. -
        1. +
            +
          1. int i = 1; This works, as we declare i as int and define it to be 1.
          2. i = 1; This fails, because i is not declared yet.
          3. @@ -269,53 +377,70 @@

            Get started with C++
          4. in R, if (TRUE) { a = '123' }; print(a) is legal.
          5. +
              +
            1. in R, if (TRUE) { a = '123' }; print(a) is legal.
            2. in C++, if (1) {string a = '123'}; std::stdout << a << std::endl; is illegal, because object a is terminated already.
            3. in C++, string a; if (1) {a = '123'}; std::stdout << a << std::endl; is legal, a is declared prior to if statement.
            4. -
            +

          +
        2. Polymorphism. Unlike in R, where function arguments have no explicitly defined types, in C++ the type of each argument of a function must be pre-specified. -
          1. +
              +
            1. Template is a special function that works with generic argument type. We could imagine a single function that could work on arguments of arbitrary type, and template functions make this possible through separation of function logic from the argument declaration. In this way we can use template functions and avoid the need to replicate the whole code for each type.
            2. -
          2. -

          With these points in mind, you are about ready to go.

          +
        +
      3. +
      +

      With these points in mind, you are about ready to go.

    -

    Get started with TMB

    +

    Get started with TMB +

    In mmrm we are not including any latent variables and so the Laplace approximation aspect of TMB is not used. We only use the automatic differentiation part of TMB. For detailed documentation of TMB, visit the TMB reference.

    One important feature of TMB are the R style matrix/array calculations. This is important because we mainly use this part to conduct our calculations. See matrix_arrays.cpp for examples.

    -

    Add a new covariance structure

    +

    Add a new covariance structure +

    To add a new covariance structure, you need to do the following:

    -
    1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
    2. +
        +
      1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
      2. Implement the covariance structure on the C++ side and the corresponding R interface.
      3. Add unit tests to make sure the new covariance structure is working as expected.
      4. Add integration tests under design/SAS/ folder to make sure SAS and R produce similar results (within tolerance).
      5. -
    + +
    -

    Add additional data

    +

    Add additional data +

    To add additional data to mmrm, please follow the next steps:

    -
    1. Make sure the data is needed.
    2. +
        +
      1. Make sure the data is needed.
      2. Document the data in R/data.R.
      3. Use save to create an rda data only containing this dataset. Here the function usethis::use_data can also be helpful.
      4. -
    + +
    -

    Communications within team

    +

    Communications within team +

    There are several communication channels, please use appropriate ones.

    -

    GitHub

    +

    GitHub +

    GitHub issues and pull requests are where implementations are discussed and reviewed. Feature requests, bugs, enhancements, technical implementations can be discussed here. When you have ideas that needs to be documented, it is better to have them in GitHub.

    -

    Slack

    +

    Slack +

    Slack is a messaging tool and we have the mmrm channel under the rinpharma space. You can put anything in the slack channel, e.g., you have completed a issue and are waiting for review, or you have some questions and don’t want to wait until the next stand-up meeting.

    To join the slack channel, please make sure you have a slack account, and send the email address to any team member.

    -

    Stand-up meetings

    +

    Stand-up meetings +

    We have stand-up meetings currently three times a week. The purpose of stand-up meetings is for team members to discuss the current work progress and raise any issue/questions for team discussion if needed.

    You don’t need to join all three meetings.

    @@ -323,22 +448,26 @@

    Stand-up meetings

    + + + + - - + + diff --git a/v0.3.3/PULL_REQUEST_TEMPLATE.html b/v0.3.3/PULL_REQUEST_TEMPLATE.html index d959f42e2..2ee1ab55a 100644 --- a/v0.3.3/PULL_REQUEST_TEMPLATE.html +++ b/v0.3.3/PULL_REQUEST_TEMPLATE.html @@ -1,5 +1,23 @@ - -Description • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +44,8 @@ + - + + - + @@ -111,22 +137,26 @@ - + +
    -
    + + - - + + diff --git a/v0.3.3/articles/algorithm.html b/v0.3.3/articles/algorithm.html index 7c8a8ed40..253f28163 100644 --- a/v0.3.3/articles/algorithm.html +++ b/v0.3.3/articles/algorithm.html @@ -1,5 +1,4 @@ - - + @@ -83,11 +82,10 @@ Changelog +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + - + + - + @@ -109,73 +135,101 @@

    Introduction

    -
    Package Introduction
    +
    +
    Package Introduction
    -
    Mixed Models for Repeated Measures
    + +
    Mixed Models for Repeated Measures
    -
    Comparison with other software
    + +
    Comparison with other software
    -
    + +
    +

    Covariance Structures

    -
    Covariance Structures
    +
    +
    Covariance Structures
    -
    + + + + + + + + + + + + + + + + +
    -
    + + - - + + diff --git a/v0.3.3/articles/introduction.html b/v0.3.3/articles/introduction.html index 9ec994305..99000cd76 100644 --- a/v0.3.3/articles/introduction.html +++ b/v0.3.3/articles/introduction.html @@ -1,5 +1,4 @@ - - + @@ -83,11 +82,10 @@ Changelog +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + - + + - + @@ -108,7 +134,8 @@

    Authors

    -
    • +
        +
      • Daniel Sabanes Bove. Author, maintainer.

      • @@ -180,7 +207,8 @@

        Authors

        AstraZeneca plc. Copyright holder, funder.

        -
    + +

    Citation

    @@ -199,22 +227,26 @@

    Citation

    }
    + +
    -
    + + - - + + diff --git a/v0.3.3/index.html b/v0.3.3/index.html index 4052baefe..8abd199d0 100644 --- a/v0.3.3/index.html +++ b/v0.3.3/index.html @@ -1,5 +1,4 @@ - - + @@ -107,11 +106,10 @@ Changelog +v0.2.2 + + - + + - + @@ -107,10 +133,13 @@
    -

    mmrm 0.3.3

    +

    mmrm 0.3.3 +

    -

    New Features

    -
    • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
    • +

      New Features +

      +
        +
      • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
      • Add empirical, empirical Jackknife and empirical bias-reduced adjusted coefficients covariance estimates, which can be specified via the new vcov argument of mmrm().
      • Add residual and between-within degrees of freedom methods.
      • Add Kenward-Roger support for spatial covariance structures.
      • @@ -121,74 +150,103 @@

        New FeaturesAdd tidy(), glance() and augment() methods to tidy the fit results into summary tables.
      • Add tidymodels framework support via a parsnip interface.
      • Add argument covariance to mmrm() to allow for easier programmatic access to specifying the model’s covariance structure and to expose covariance customization through the tidymodels interface.
      • -

    + +
    -

    Bug Fixes

    -
    • Previously mmrm() follows the global option na.action and if it is set other than "na.omit" an assertion would fail. This is now fixed and hence NA values are always removed prior to model fitting, independent of the global na.action option.
    • +

      Bug Fixes +

      +
        +
      • Previously mmrm() follows the global option na.action and if it is set other than "na.omit" an assertion would fail. This is now fixed and hence NA values are always removed prior to model fitting, independent of the global na.action option.
      • Previously a model.frame() call on an mmrm object with transformed terms, or new data, e.g. model.frame(mmrm(Y ~ log(X) + ar1(VISIT|ID), data = new_data), would fail. This is now fixed.
      • Previously mmrm() always required a data argument. Now fitting mmrm can also use environment variables instead of requiring data argument. (Note that fit_mmrm is not affected.)
      • Previously emmeans() failed when using transformed terms or not including the visit variable in the model formula. This is now fixed.
      • Previously mmrm() might provide non-finite values in the Jacobian calculations, leading to errors in the Satterthwaite degrees of freedom calculations. This will raise an error now and thus alert the user that the model fit was not successful.
      • -
    + +
    -

    Miscellaneous

    -
    • Use automatic differentiation to calculate Satterthwaite adjusted degrees of freedom, resulting in 10-fold speed-up of the Satterthwaite calculations after the initial model fit.
    • +

      Miscellaneous +

      +
        +
      • Use automatic differentiation to calculate Satterthwaite adjusted degrees of freedom, resulting in 10-fold speed-up of the Satterthwaite calculations after the initial model fit.
      • Add an interactive confirmation step if the number of visit levels is too large for non-spatial covariance structures. Use options(mmrm.max_visits = ) to specify the maximum number of visits allowed in non-interactive mode.
      • Removed free_cores() in favor of parallelly::availableCores(omit = 1).
      • The model.frame() method has been updated: The full argument is deprecated and the include argument can be used instead; by default all relevant variables are returned. Furthermore, it returns a data.frame the size of the number of observations utilized in the model for all combinations of the include argument when na.action= "na.omit".
      • -
    + +
    -

    mmrm 0.2.2

    CRAN release: 2022-12-20

    +

    mmrm 0.2.2 +

    +

    CRAN release: 2022-12-20

    -

    New Features

    -
    • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
    • +

      New Features +

      +
        +
      • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
      • Update the mmrm arguments to allow users more fine-grained control, e.g. mmrm(..., start = start, optimizer = c("BFGS", "nlminb")) to set the starting values for the variance estimates and to choose the available optimizers. These arguments will be passed to the new function mmrm_control.
      • Add new argument drop_visit_levels to allow users to keep all levels in visits, even when they are not observed in the data. Dropping unobserved levels was done silently previously, and now a message will be given. See ?mmrm_control for more details.
      • -
    + +
    -

    Bug Fixes

    -
    • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
    • +

      Bug Fixes +

      +
        +
      • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
      • Previously in mmrm calls, the weights object in the environment where the formula is defined was replaced by the weights used internally. Now this behavior is removed and your variable weights e.g. in the global environment will no longer be replaced.
      • -
    + +
    -

    Miscellaneous

    -
    • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
    • +

      Miscellaneous +

      +
        +
      • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
      • Deprecated optimizer = "automatic" in favor of not specifying the optimizer. By default, all remaining optimizers will be tried if the first optimizer fails to reach convergence.
      • -
    + +
    -

    mmrm 0.1.5

    CRAN release: 2022-10-18

    -
    • First CRAN version of the package.
    • +

      mmrm 0.1.5 +

      +

      CRAN release: 2022-10-18

      +
        +
      • First CRAN version of the package.
      • The package fits mixed models for repeated measures (MMRM) based on the marginal linear model without random effects.
      • The motivation for this package is to have a fast, reliable (in terms of convergence behavior) and feature complete implementation of MMRM in R.
      • -
      -

      New Features

      -
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • +
      +
      +

      New Features +

      +
        +
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • Fast C++ implementation of Maximum Likelihood (ML) and Restricted Maximum Likelihood (REML) estimation.
      • Currently Satterthwaite adjusted degrees of freedom calculation is supported.
      • Interface to the emmeans package for computing estimated marginal means (also called least-square means) for the coefficients.
      • Multiple optimizers are run to reach convergence in as many cases as possible.
      • Flexible formula based model specification and support for standard S3 methods such as summary, logLik, etc.
      • -
      +
    +
    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/COV_TYPES.html b/v0.3.3/reference/COV_TYPES.html index 3a4d924e8..51a19ac3f 100644 --- a/v0.3.3/reference/COV_TYPES.html +++ b/v0.3.3/reference/COV_TYPES.html @@ -1,5 +1,25 @@ - -Covariance Type Database — COV_TYPES • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,14 +140,17 @@
    -

    Usage

    +

    Usage +

    COV_TYPES
    -

    Format

    +

    Format +

    A data frame with 5 variables and one record per covariance type:

    -
    name
    +
    +
    name

    The long-form name of the covariance structure type

    abbr
    @@ -138,25 +169,30 @@

    Format<

    A logical value indicating whether the covariance structure is spatial.

    -

    + + + +
    -
    + + - - + + diff --git a/v0.3.3/reference/as.cov_struct.html b/v0.3.3/reference/as.cov_struct.html index 04ca85b9b..ffafcc433 100644 --- a/v0.3.3/reference/as.cov_struct.html +++ b/v0.3.3/reference/as.cov_struct.html @@ -1,5 +1,25 @@ - -Coerce into a Covariance Structure Definition — as.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    as.cov_struct(x, ...)
     
     # S3 method for formula
    @@ -120,8 +149,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    an object from which to derive a covariance structure. See object specific sections for details.

    @@ -134,44 +165,66 @@

    Arguments -

    Value

    +

    Value +

    A cov_struct() object.

    -

    Details

    +

    Details +

    A covariance structure can be parsed from a model definition formula or call. Generally, covariance structures defined using non-standard evaluation take the following form:

    -

    type( (visit, )* visit | (group /)? subject )

    +

    +
    +
    type( (visit, )* visit | (group /)? subject )
    +

    +

    For example, formulas may include terms such as

    -

    us(time | subject)
    +

    +
    +
    us(time | subject)
     cp(time | group / subject)
    -sp_exp(coord1, coord2 | group / subject)

    +sp_exp(coord1, coord2 | group / subject)
    +

    +

    Note that only sp_exp (spatial) covariance structures may provide multiple coordinates, which identify the Euclidean distance between the time points.

    -

    Methods (by class)

    +

    Methods (by class) +

    -
    • as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be +

        +
      • +

        as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be covariance structure definitions and must follow the form:

        -

        y ~ xs + type( (visit, )* visit | (group /)? subject )

        +

        +
        +
        y ~ xs + type( (visit, )* visit | (group /)? subject )
        +

        +

        Any component on the right hand side of a formula is considered when -searching for a covariance definition.

      • -
    +searching for a covariance definition.

    + + +
    -

    See also

    +

    See also +

    Other covariance types: cov_struct(), covariance_types

    -

    Examples

    +

    Examples +

    # provide a covariance structure as a right-sided formula
     as.cov_struct(~ csh(visit | group / subject))
     #> <covariance structure>
    @@ -191,22 +244,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.3/reference/bcva_data.html b/v0.3.3/reference/bcva_data.html index f0cc77725..f777a0bff 100644 --- a/v0.3.3/reference/bcva_data.html +++ b/v0.3.3/reference/bcva_data.html @@ -1,5 +1,25 @@ - -Example Data on BCVA — bcva_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,48 +140,59 @@
    -

    Usage

    +

    Usage +

    bcva_data
    -

    Format

    -

    A tibble with 10,000 rows and 7 variables:

    • USUBJID: subject ID.

    • +

      Format +

      +

      A tibble with 10,000 rows and 7 variables:

      +
        +
      • USUBJID: subject ID.

      • VISITN: visit number (numeric).

      • AVISIT: visit number (factor).

      • ARMCD: treatment, TRT or CTL.

      • RACE: 3-category race.

      • BCVA_BL: BCVA at baseline.

      • BCVA_CHG: Change in BCVA at study visits.

      • -
    + +
    -

    Source

    +

    Source +

    This is an artificial dataset.

    -

    Note

    +

    Note +

    Measurements of BCVA (best corrected visual acuity) is a measure of how how many letters a person can read off of an eye chart using corrective lenses or contacts. This a common endpoint in ophthalmology trials.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/cached_mmrm_results.html b/v0.3.3/reference/cached_mmrm_results.html index a281b5d2c..91bce7210 100644 --- a/v0.3.3/reference/cached_mmrm_results.html +++ b/v0.3.3/reference/cached_mmrm_results.html @@ -1,5 +1,25 @@ - -Cache Data for mmrm Model Comparison — cached_mmrm_results • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,25 +140,32 @@
    -

    Usage

    +

    Usage +

    cached_mmrm_results
    -

    Format

    -

    A list with following elements:

    • conv_time_fev: Convergence time on FEV data.

    • +

      Format +

      +

      A list with following elements:

      +
        +
      • conv_time_fev: Convergence time on FEV data.

      • conv_time_bcva: Convergence time on BCVA data.

      • rel_diff_ests_tbl_fev: Relative difference in estimates on FEV data.

      • rel_diff_ests_tbl_bcva: Relative difference in estimates on BCVA data.

      • conv_rate: Convergence rate on data with different missing levels.

      • df_missingness: Summary of missingness on simulated data.

      • -
    + +
    -

    Source

    +

    Source +

    This is created based on simulations on FEV data and BCVA data.

    -

    Note

    +

    Note +

    The cached data for comparison is used for the vignettes generation. Please make sure that this data is refreshed before each package release by running the script data-raw/mmrm_review.R. @@ -139,22 +174,26 @@

    Note

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/check_package_version.html b/v0.3.3/reference/check_package_version.html index 0b6fe3a17..15a1df5ba 100644 --- a/v0.3.3/reference/check_package_version.html +++ b/v0.3.3/reference/check_package_version.html @@ -1,5 +1,25 @@ - -Check Suggested Dependency Against Version Requirements — check_package_version • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    check_package_version(pkg, ver = c(NA_character_, NA_character_))
    -

    Arguments

    -
    pkg
    +

    Arguments +

    +
    +
    pkg

    (string)
    package name.

    @@ -128,9 +159,11 @@

    Arguments -

    Value

    +

    Value +

    A logical (invisibly) indicating whether the loaded package meets @@ -138,22 +171,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/component.html b/v0.3.3/reference/component.html index ba8819851..7b4969395 100644 --- a/v0.3.3/reference/component.html +++ b/v0.3.3/reference/component.html @@ -1,5 +1,25 @@ - -Component Access for mmrm_tmb Objects — component • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    component(
       object,
       name = c("cov_type", "subject_var", "n_theta", "n_subjects", "n_timepoints", "n_obs",
    @@ -124,24 +153,31 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    name

    (character)
    the component(s) to be retrieved.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding component of the object, see details.

    -

    Details

    -

    Available component() names are as follows:

    • call: low-level function call which generated the model.

    • +

      Details +

      +

      Available component() names are as follows:

      +
    + +
    -

    See also

    +

    See also +

    In the lme4 package there is a similar function getME().

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -3079,22 +3118,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.3/reference/cov_struct.html b/v0.3.3/reference/cov_struct.html index fc6c5207a..f9cb7f80d 100644 --- a/v0.3.3/reference/cov_struct.html +++ b/v0.3.3/reference/cov_struct.html @@ -1,5 +1,25 @@ - -Define a Covariance Structure — cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    cov_struct(
       type = cov_types(),
       visits,
    @@ -123,8 +152,10 @@ 

    Usage

    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    the name of the covariance structure type to use. For available options, see cov_types(). If a type abbreviation is used that implies heterogeneity (e.g. cph) and no value is provided to @@ -150,22 +181,26 @@

    Arguments -

    Value

    +

    Value +

    A cov_struct object.

    -

    See also

    +

    See also +

    Other covariance types: as.cov_struct(), covariance_types

    -

    Examples

    +

    Examples +

    cov_struct("csh", "AVISITN", "USUBJID")
     #> <covariance structure>
     #> heterogeneous compound symmetry:
    @@ -182,22 +217,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.3/reference/cov_type_abbr.html b/v0.3.3/reference/cov_type_abbr.html index 1b6815ee3..eb2d3939c 100644 --- a/v0.3.3/reference/cov_type_abbr.html +++ b/v0.3.3/reference/cov_type_abbr.html @@ -1,5 +1,25 @@ - -Retrieve Associated Abbreviated Covariance Structure Type Name — cov_type_abbr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    cov_type_abbr(type)
    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    either a full name or abbreviate covariance structure type name to collapse into an abbreviated type.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding abbreviated covariance type name.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/cov_type_name.html b/v0.3.3/reference/cov_type_name.html index 42f3814d3..ea4ddcc18 100644 --- a/v0.3.3/reference/cov_type_name.html +++ b/v0.3.3/reference/cov_type_name.html @@ -1,5 +1,25 @@ - -Retrieve Associated Full Covariance Structure Type Name — cov_type_name • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    cov_type_name(type)
    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    either a full name or abbreviate covariance structure type name to convert to a long-form type.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding abbreviated covariance type name.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/covariance_types.html b/v0.3.3/reference/covariance_types.html index 6bf743a4e..2aa5ba5dc 100644 --- a/v0.3.3/reference/covariance_types.html +++ b/v0.3.3/reference/covariance_types.html @@ -1,5 +1,25 @@ - -Covariance Types — covariance_types • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    cov_types(
       form = c("name", "abbr", "habbr"),
       filter = c("heterogeneous", "spatial")
    @@ -120,8 +149,10 @@ 

    Usage

    -

    Arguments

    -
    form
    +

    Arguments +

    +
    +
    form

    (character)
    covariance structure type name form. One or more of "name", "abbr" (abbreviation), or "habbr" (heterogeneous abbreviation).

    @@ -131,67 +162,155 @@

    Arguments or "spatial".

    -

    + +
    -

    Value

    +

    Value +

    A character vector of accepted covariance structure type names and abbreviations.

    -

    Note

    +

    Note +

    The ante-dependence covariance structure in this package refers to homogeneous ante-dependence, while the ante-dependence covariance structure from SAS PROC MIXED refers to heterogeneous ante-dependence and the homogeneous version is not available in SAS.

    For all non-spatial covariance structures, the time variable must -be coded as a factor.

    -

    Spatial Covariance structures:

    +be coded as a factor.

    +
    +

    Spatial Covariance structures: +

    -
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)

    where \(d_{ij}\) denotes the Euclidean distance between time points + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)
    +

    where \(d_{ij}\) denotes the Euclidean distance between time points \(i\) and \(j\).

    -

    Abbreviations for Covariance Structures

    +

    Abbreviations for Covariance Structures +

    -

    Common Covariance Structures:

    +

    Common Covariance Structures: +

    -
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)
    +

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, respectively, out of total \(m\) time points, \(1 \leq i, j \leq m\).

    -

    See also

    +

    See also +

    Other covariance types: as.cov_struct(), cov_struct()

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/df_1d.html b/v0.3.3/reference/df_1d.html index b46fa3d01..28ea2b9c3 100644 --- a/v0.3.3/reference/df_1d.html +++ b/v0.3.3/reference/df_1d.html @@ -1,9 +1,29 @@ - - + + + + + +Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm +Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    df_1d(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -133,16 +164,19 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -168,22 +202,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.3/reference/df_md.html b/v0.3.3/reference/df_md.html index 65b01261d..8fe9903e2 100644 --- a/v0.3.3/reference/df_md.html +++ b/v0.3.3/reference/df_md.html @@ -1,11 +1,31 @@ - - + + + + + +Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm +Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -121,13 +149,16 @@
    -

    Usage

    +

    Usage +

    df_md(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -137,16 +168,19 @@

    Arguments -

    Value

    +

    Value +

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

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -169,22 +203,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.3/reference/drop_elements.html b/v0.3.3/reference/drop_elements.html index 6e6d84d73..650ca5b31 100644 --- a/v0.3.3/reference/drop_elements.html +++ b/v0.3.3/reference/drop_elements.html @@ -1,5 +1,25 @@ - -Drop Items from an Indexible — drop_elements • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    drop_elements(x, n)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    Any object that can be consumed by seq_along() and indexed by a logical vector of the same length.

    @@ -126,31 +157,37 @@

    Arguments -

    Value

    +

    Value +

    A subset of x.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/emit_tidymodels_register_msg.html b/v0.3.3/reference/emit_tidymodels_register_msg.html index 02f59a764..bfbbb2322 100644 --- a/v0.3.3/reference/emit_tidymodels_register_msg.html +++ b/v0.3.3/reference/emit_tidymodels_register_msg.html @@ -1,5 +1,25 @@ - -Format a Message to Emit When Tidymodels is Loaded — emit_tidymodels_register_msg • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,12 +140,14 @@
    -

    Usage

    +

    Usage +

    emit_tidymodels_register_msg()
    -

    Value

    +

    Value +

    A character message to emit. Either a ansi-formatted cli output if @@ -125,22 +155,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/emmeans_support.html b/v0.3.3/reference/emmeans_support.html index 675fbcadf..81e5470b0 100644 --- a/v0.3.3/reference/emmeans_support.html +++ b/v0.3.3/reference/emmeans_support.html @@ -1,11 +1,31 @@ - - + + + + + +Support for emmeans — emmeans_support • mmrm +Support for emmeans — emmeans_support • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - +
    @@ -123,7 +152,8 @@
    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -156,22 +186,26 @@ 

    Examples#> Confidence level used: 0.95

    -
    + +
    + + - - + + diff --git a/v0.3.3/reference/fev_data.html b/v0.3.3/reference/fev_data.html index 18cc25dbf..6092f5233 100644 --- a/v0.3.3/reference/fev_data.html +++ b/v0.3.3/reference/fev_data.html @@ -1,5 +1,25 @@ - -Example Data on FEV1 — fev_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,17 @@
    -

    Usage

    +

    Usage +

    fev_data
    -

    Format

    -

    A tibble with 800 rows and 7 variables:

    • USUBJID: subject ID.

    • +

      Format +

      +

      A tibble with 800 rows and 7 variables:

      +
        +
      • USUBJID: subject ID.

      • AVISIT: visit number.

      • ARMCD: treatment, TRT or PBO.

      • RACE: 3-category race.

      • @@ -126,35 +158,42 @@

        Format<
      • FEV1_BL: FEV1 at baseline (%).

      • FEV1: FEV1 at study visits.

      • WEIGHT: weighting variable.

      • -

    + +
    -

    Source

    +

    Source +

    This is an artificial dataset.

    -

    Note

    +

    Note +

    Measurements of FEV1 (forced expired volume in one second) is a measure of how quickly the lungs can be emptied. Low levels of FEV1 may indicate chronic obstructive pulmonary disease (COPD).

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/fill_names.html b/v0.3.3/reference/fill_names.html index 825a51fc8..63a29f18f 100644 --- a/v0.3.3/reference/fill_names.html +++ b/v0.3.3/reference/fill_names.html @@ -1,5 +1,25 @@ - -Complete character Vector Names From Values — fill_names • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    fill_names(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character or list)
    value whose names should be completed from element values.

    -
    + +
    -

    Value

    +

    Value +

    A named vector or list.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/fit_mmrm.html b/v0.3.3/reference/fit_mmrm.html index 1ed550637..ece611b92 100644 --- a/v0.3.3/reference/fit_mmrm.html +++ b/v0.3.3/reference/fit_mmrm.html @@ -1,11 +1,31 @@ - - + + + + + +Low-Level Fitting Function for MMRM — fit_mmrm • mmrm +Low-Level Fitting Function for MMRM — fit_mmrm • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -121,7 +149,8 @@
    -

    Usage

    +

    Usage +

    fit_mmrm(
       formula,
       data,
    @@ -135,8 +164,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    model formula with exactly one special term specifying the visits within subjects, see details.

    @@ -175,15 +206,18 @@

    Argumentsmmrm_control().

    -

    + +
    -

    Value

    +

    Value +

    List of class mmrm_tmb, see h_mmrm_tmb_fit() for details.

    + + - - + + diff --git a/v0.3.3/reference/fit_single_optimizer.html b/v0.3.3/reference/fit_single_optimizer.html index aa6012c3d..136d23b08 100644 --- a/v0.3.3/reference/fit_single_optimizer.html +++ b/v0.3.3/reference/fit_single_optimizer.html @@ -1,9 +1,29 @@ - - + + + + + +Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm +Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,7 +146,8 @@
    -

    Usage

    +

    Usage +

    fit_single_optimizer(
       formula,
       data,
    @@ -133,8 +162,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -174,9 +205,11 @@

    Arguments -

    Value

    +

    Value +

    The mmrm_fit object, with additional attributes containing warnings, @@ -184,7 +217,8 @@

    Value

    mmrm_tmb
    contents.

    + +
    - - + + diff --git a/v0.3.3/reference/flat_expr.html b/v0.3.3/reference/flat_expr.html index 794a943cb..32f5960fe 100644 --- a/v0.3.3/reference/flat_expr.html +++ b/v0.3.3/reference/flat_expr.html @@ -1,11 +1,31 @@ - - + + + + + +Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm +Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -121,61 +149,86 @@
    -

    Usage

    +

    Usage +

    flatten_call(call)
     
     flatten_expr(expr)
    -

    Arguments

    -
    call, expr
    +

    Arguments +

    +
    +
    call, expr

    (language)
    a language object to flatten.

    -
    + +
    -

    Value

    +

    Value +

    A list of atomic values, symbols, infix operator names and subexpressions.

    -

    Details

    +

    Details +

    Where 1 + 2 | 3 in R's syntax tree is (|, (+, 1, 2), 3), flattening it into its visual order produces (1, +, 2, |, 3), which makes for more fluent interpretation of non-standard grammar rules used in formulas.

    -

    Functions

    +

    Functions +

    -
    • flatten_call(): Flatten a call into a list of names and argument expressions.

      +
        +
      • +

        flatten_call(): Flatten a call into a list of names and argument expressions.

        The call name and all arguments are flattened into the same list, meaning a call of the form sp_exp(a, b, c | d / e) produces a list of the form (sp_exp, a, b, c, |, d, /, e).

        -

        flatten_call(quote(sp_exp(a, b, c | d / e)))

      • -
      • flatten_expr(): Flatten nested expressions

        -

        flatten_expr(quote(1 + 2 + 3 | 4))

      • -
    +

    +
    +
    flatten_call(quote(sp_exp(a, b, c | d / e)))
    +

    +
    + +
  • +

    flatten_expr(): Flatten nested expressions

    +

    +
    +
    flatten_expr(quote(1 + 2 + 3 | 4))
    +

    +
    +
  • + + + +
    -
    + + - - + + diff --git a/v0.3.3/reference/format.cov_struct.html b/v0.3.3/reference/format.cov_struct.html index 2a3b00990..732371370 100644 --- a/v0.3.3/reference/format.cov_struct.html +++ b/v0.3.3/reference/format.cov_struct.html @@ -1,5 +1,25 @@ - -Format Covariance Structure Object — format.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,45 +140,54 @@
    -

    Usage

    +

    Usage +

    # S3 method for cov_struct
     format(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    ...

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string for x.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/format_symbols.html b/v0.3.3/reference/format_symbols.html index 1ed13e2eb..4ac3d9217 100644 --- a/v0.3.3/reference/format_symbols.html +++ b/v0.3.3/reference/format_symbols.html @@ -1,7 +1,27 @@ - -Format Symbol Objects — format_symbols • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,40 +143,49 @@
    -

    Usage

    +

    Usage +

    format_symbols(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character) A vector of variable names.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string of comma-separated variables.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/formula_rhs.html b/v0.3.3/reference/formula_rhs.html index ccb7ecdca..83d9d0f04 100644 --- a/v0.3.3/reference/formula_rhs.html +++ b/v0.3.3/reference/formula_rhs.html @@ -1,5 +1,25 @@ - -Extract Right-Hand-Side (rhs) from Formula — formula_rhs • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,47 +140,60 @@
    -

    Usage

    +

    Usage +

    formula_rhs(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula.

    -
    + +
    -

    Value

    +

    Value +

    A formula without a response, derived from the right-hand-side of the formula, f.

    -

    formula_rhs(a ~ b + c)
    -formula_rhs(~ b + c)

    +

    +
    +
    formula_rhs(a ~ b + c)
    +formula_rhs(~ b + c)
    +

    +
    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_add_covariance_terms.html b/v0.3.3/reference/h_add_covariance_terms.html index 42ed2c75b..268d862fd 100644 --- a/v0.3.3/reference/h_add_covariance_terms.html +++ b/v0.3.3/reference/h_add_covariance_terms.html @@ -1,5 +1,25 @@ - -Add Individual Covariance Variables As Terms to Formula — h_add_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_add_covariance_terms(f, covariance)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula to which covariance structure terms should be added.

    @@ -127,37 +158,44 @@

    Arguments -

    Value

    +

    Value +

    A new formula with included covariance terms.

    -

    Details

    +

    Details +

    stats::update() is used to append the covariance structure and the environment attribute will not be changed. This ensures the returned formula and the input formula have the same environment.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_add_terms.html b/v0.3.3/reference/h_add_terms.html index 45ac278f4..8ac1cbf50 100644 --- a/v0.3.3/reference/h_add_terms.html +++ b/v0.3.3/reference/h_add_terms.html @@ -1,5 +1,25 @@ - -Add Formula Terms with Character — h_add_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_add_terms(f, adds, drop_response = FALSE)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula to be updated.

    @@ -129,37 +160,44 @@

    Arguments -

    Value

    +

    Value +

    A new formula with elements in drops removed.

    -

    Details

    +

    Details +

    Elements in adds will be added from the formula, while the environment of the formula is unchanged. If adds is NULL or character(0), the formula is unchanged.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_coef_table.html b/v0.3.3/reference/h_coef_table.html index 30c30fb81..c6c1ae837 100644 --- a/v0.3.3/reference/h_coef_table.html +++ b/v0.3.3/reference/h_coef_table.html @@ -1,5 +1,25 @@ - -Coefficients Table for MMRM Fit — h_coef_table • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,18 +140,23 @@
    -

    Usage

    +

    Usage +

    h_coef_table(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    model fit.

    -
    + +
    -

    Value

    +

    Value +

    Matrix with one row per coefficient and columns @@ -131,22 +164,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_confirm_large_levels.html b/v0.3.3/reference/h_confirm_large_levels.html index 7d829146e..424c4848f 100644 --- a/v0.3.3/reference/h_confirm_large_levels.html +++ b/v0.3.3/reference/h_confirm_large_levels.html @@ -1,7 +1,27 @@ - -Ask for Confirmation on Large Visit Levels — h_confirm_large_levels • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,34 +143,42 @@
    -

    Usage

    +

    Usage +

    h_confirm_large_levels(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (numeric)
    number of visit levels.

    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_construct_model_frame_inputs.html b/v0.3.3/reference/h_construct_model_frame_inputs.html index 1e2178398..09a22115d 100644 --- a/v0.3.3/reference/h_construct_model_frame_inputs.html +++ b/v0.3.3/reference/h_construct_model_frame_inputs.html @@ -1,13 +1,33 @@ - - + + + + + +Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm +Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -32,7 +54,8 @@ + - + + - + @@ -124,7 +152,8 @@
    -

    Usage

    +

    Usage +

    h_construct_model_frame_inputs(
       formula,
       data,
    @@ -135,8 +164,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (mmrm)
    mmrm fit object.

    @@ -152,36 +183,45 @@

    Arguments -

    Value

    +

    Value +

    -

    named list with four elements:

    • "formula": the formula including the columns requested in the include= argument.

    • +

      named list with four elements:

      +
        +
      • "formula": the formula including the columns requested in the include= argument.

      • "formula_full": the formula including all columns

      • "data": a data frame including all columns where factor and character columns have been processed with h_factor_ref().

      • "is_full": a logical scalar indicating if the formula and full formula are identical

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_default_value.html b/v0.3.3/reference/h_default_value.html index e657d6b2a..e4b43b91c 100644 --- a/v0.3.3/reference/h_default_value.html +++ b/v0.3.3/reference/h_default_value.html @@ -1,9 +1,29 @@ - -Default Value on NULL -Return default value when first argument is NULL. — h_default_value • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,42 +146,51 @@
    -

    Usage

    +

    Usage +

    h_default_value(x, y)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    Object.

    y

    Object.

    -
    + +
    -

    Details

    +

    Details +

    If x is NULL, returns y. Otherwise return x.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_df_1d_bw.html b/v0.3.3/reference/h_df_1d_bw.html index 7762d3873..f6bd41a96 100644 --- a/v0.3.3/reference/h_df_1d_bw.html +++ b/v0.3.3/reference/h_df_1d_bw.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom for One-Dimensional Contrast — h_df_1d_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_bw(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -127,31 +158,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_df_1d_kr.html b/v0.3.3/reference/h_df_1d_kr.html index e8313f671..50197a43d 100644 --- a/v0.3.3/reference/h_df_1d_kr.html +++ b/v0.3.3/reference/h_df_1d_kr.html @@ -1,7 +1,27 @@ - -Calculation of Kenward-Roger Degrees of Freedom for One-Dimensional Contrast — h_df_1d_kr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_kr(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -130,31 +161,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_df_1d_res.html b/v0.3.3/reference/h_df_1d_res.html index 47ba30980..915ea1f48 100644 --- a/v0.3.3/reference/h_df_1d_res.html +++ b/v0.3.3/reference/h_df_1d_res.html @@ -1,7 +1,27 @@ - -Calculation of Residual Degrees of Freedom for One-Dimensional Contrast — h_df_1d_res • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_res(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -130,31 +161,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_df_1d_sat.html b/v0.3.3/reference/h_df_1d_sat.html index 571a638cf..ecdc51302 100644 --- a/v0.3.3/reference/h_df_1d_sat.html +++ b/v0.3.3/reference/h_df_1d_sat.html @@ -1,7 +1,27 @@ - -Calculation of Satterthwaite Degrees of Freedom for One-Dimensional Contrast — h_df_1d_sat • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_sat(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -130,31 +161,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_df_bw_calc.html b/v0.3.3/reference/h_df_bw_calc.html index a3a29b6cc..824b8849f 100644 --- a/v0.3.3/reference/h_df_bw_calc.html +++ b/v0.3.3/reference/h_df_bw_calc.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom — h_df_bw_calc • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,42 +140,54 @@
    -

    Usage

    +

    Usage +

    h_df_bw_calc(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    -

    List with:

    + + + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_df_md_bw.html b/v0.3.3/reference/h_df_md_bw.html index 261d67d2f..33e896c43 100644 --- a/v0.3.3/reference/h_df_md_bw.html +++ b/v0.3.3/reference/h_df_md_bw.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_bw(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_df_md_from_1d.html b/v0.3.3/reference/h_df_md_from_1d.html index 32fb644a7..fb815ff20 100644 --- a/v0.3.3/reference/h_df_md_from_1d.html +++ b/v0.3.3/reference/h_df_md_from_1d.html @@ -1,5 +1,25 @@ - -Creating F-Statistic Results from One-Dimensional Contrast — h_df_md_from_1d • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,22 +140,27 @@
    -

    Usage

    +

    Usage +

    h_df_md_from_1d(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    model fit.

    contrast

    (numeric)
    one-dimensional contrast.

    -
    + +
    -

    Value

    +

    Value +

    The one-dimensional degrees of freedom are calculated and then @@ -135,22 +168,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_df_md_kr.html b/v0.3.3/reference/h_df_md_kr.html index da48a0b69..43cb0fbe6 100644 --- a/v0.3.3/reference/h_df_md_kr.html +++ b/v0.3.3/reference/h_df_md_kr.html @@ -1,5 +1,25 @@ - -Calculation of Kenward-Roger Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_kr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_kr(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_df_md_res.html b/v0.3.3/reference/h_df_md_res.html index 958043d48..11fafdf64 100644 --- a/v0.3.3/reference/h_df_md_res.html +++ b/v0.3.3/reference/h_df_md_res.html @@ -1,5 +1,25 @@ - -Calculation of Residual Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_res • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_res(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_df_md_sat.html b/v0.3.3/reference/h_df_md_sat.html index 3dd4f1c6c..b2e29b4a3 100644 --- a/v0.3.3/reference/h_df_md_sat.html +++ b/v0.3.3/reference/h_df_md_sat.html @@ -1,5 +1,25 @@ - -Calculation of Satterthwaite Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_sat • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_sat(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_df_min_bw.html b/v0.3.3/reference/h_df_min_bw.html index b76149a60..c0aa53b02 100644 --- a/v0.3.3/reference/h_df_min_bw.html +++ b/v0.3.3/reference/h_df_min_bw.html @@ -1,5 +1,25 @@ - -Assign Minimum Degrees of Freedom Given Involved Coefficients — h_df_min_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_min_bw(bw_calc, is_coef_involved)
    -

    Arguments

    -
    bw_calc
    +

    Arguments +

    +
    +
    bw_calc

    (list)
    from h_df_bw_calc().

    @@ -126,9 +157,11 @@

    Arguments -

    Value

    +

    Value +

    The minimum of the degrees of freedom assigned to each involved @@ -136,22 +169,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_df_to_tibble.html b/v0.3.3/reference/h_df_to_tibble.html index 1473ae954..fa6dd4759 100644 --- a/v0.3.3/reference/h_df_to_tibble.html +++ b/v0.3.3/reference/h_df_to_tibble.html @@ -1,5 +1,25 @@ - -Coerce a Data Frame to a tibble — h_df_to_tibble • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -112,24 +141,30 @@
    -

    Usage

    +

    Usage +

    h_df_to_tibble(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (data.frame)
    what to coerce.

    -
    + +
    -

    Value

    +

    Value +

    The data as a tibble, potentially with a .rownames column.

    -

    Details

    +

    Details +

    This is only a thin wrapper around tibble::as_tibble(), except giving a useful error message and it checks for rownames and adds them as a new column .rownames if they are not just a numeric sequence as @@ -137,22 +172,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.3/reference/h_drop_covariance_terms.html b/v0.3.3/reference/h_drop_covariance_terms.html index d7c9371a6..7c5090479 100644 --- a/v0.3.3/reference/h_drop_covariance_terms.html +++ b/v0.3.3/reference/h_drop_covariance_terms.html @@ -1,5 +1,25 @@ - -Drop Formula Terms used for Covariance Structure Definition — h_drop_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,46 +140,56 @@
    -

    Usage

    +

    Usage +

    h_drop_covariance_terms(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula from which covariance terms should be dropped.

    -
    + +
    -

    Value

    +

    Value +

    The formula without accepted covariance terms.

    -

    Details

    +

    Details +

    terms is used and it will preserve the environment attribute. This ensures the returned formula and the input formula have the same environment.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_extract_covariance_terms.html b/v0.3.3/reference/h_extract_covariance_terms.html index 2a3393b33..31ffe6f28 100644 --- a/v0.3.3/reference/h_extract_covariance_terms.html +++ b/v0.3.3/reference/h_extract_covariance_terms.html @@ -1,5 +1,25 @@ - -Extract Formula Terms used for Covariance Structure Definition — h_extract_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    h_extract_covariance_terms(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula from which covariance terms should be extracted.

    -
    + +
    -

    Value

    +

    Value +

    A list of covariance structure expressions found in f.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_factor_ref.html b/v0.3.3/reference/h_factor_ref.html index f8f4a55f8..2ad1b52e4 100644 --- a/v0.3.3/reference/h_factor_ref.html +++ b/v0.3.3/reference/h_factor_ref.html @@ -1,5 +1,25 @@ - -Convert Character to Factor Following Reference — h_factor_ref • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_factor_ref(x, ref, var_name = vname(x))
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character or factor)
    input.

    @@ -129,31 +160,37 @@

    Arguments -

    Details

    +

    Details +

    Use ref to convert x into factor with the same levels. This is needed even if x and ref are both character because in model.matrix if x only has one level there could be errors.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_get_cov_default.html b/v0.3.3/reference/h_get_cov_default.html index f173cfd7b..2bebe8f16 100644 --- a/v0.3.3/reference/h_get_cov_default.html +++ b/v0.3.3/reference/h_get_cov_default.html @@ -1,7 +1,27 @@ - -Obtain Default Covariance Method — h_get_cov_default • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,20 +143,25 @@
    -

    Usage

    +

    Usage +

    h_get_cov_default(
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within")
     )
    -

    Arguments

    -
    method
    +

    Arguments +

    +
    +
    method

    (string)
    degrees of freedom method.

    -
    + +
    -

    Details

    +

    Details +

    The default covariance method is different for different degrees of freedom method. For "Satterthwaite" or "Between-Within", "Asymptotic" is returned. For "Kenward-Roger" only, "Kenward-Roger" is returned. @@ -136,22 +169,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.3/reference/h_get_empirical.html b/v0.3.3/reference/h_get_empirical.html index 21052608d..3cb06b376 100644 --- a/v0.3.3/reference/h_get_empirical.html +++ b/v0.3.3/reference/h_get_empirical.html @@ -1,9 +1,29 @@ - -Obtain Empirical/Jackknife/Bias-Reduced Covariance — h_get_empirical • mmrm +Obtain Empirical/Jackknife/Bias-Reduced Covariance — h_get_empirical • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    h_get_empirical(tmb_data, theta, beta, beta_vcov, type)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    @@ -144,32 +175,41 @@

    Arguments -

    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • cov: matrix empirical covariance.

    • +

      Named list with elements:

      +
        +
      • cov: matrix empirical covariance.

      • df_mat: matrix to calculate Satterthwaite degree of freedom.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_get_kr_comp.html b/v0.3.3/reference/h_get_kr_comp.html index 130b8d146..2a23c295b 100644 --- a/v0.3.3/reference/h_get_kr_comp.html +++ b/v0.3.3/reference/h_get_kr_comp.html @@ -1,7 +1,27 @@ - -Obtain Kenward-Roger Adjustment Components — h_get_kr_comp • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,30 +143,39 @@
    -

    Usage

    +

    Usage +

    h_get_kr_comp(tmb_data, theta)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    theta

    (numeric)
    theta estimate.

    -
    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • P: matrix of \(P\) component.

    • +

      Named list with elements:

      +
        +
      • P: matrix of \(P\) component.

      • Q: matrix of \(Q\) component.

      • R: matrix of \(R\) component.

      • -
    + +
    -

    Details

    +

    Details +

    the function returns a named list, \(P\), \(Q\) and \(R\), which corresponds to the paper in 1997. The matrices are stacked in columns so that \(P\), \(Q\) and \(R\) has the same column number(number of beta parameters). The number of rows, is dependent on @@ -150,22 +187,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.3/reference/h_get_optimizers.html b/v0.3.3/reference/h_get_optimizers.html index e3478011f..e3a86f0c0 100644 --- a/v0.3.3/reference/h_get_optimizers.html +++ b/v0.3.3/reference/h_get_optimizers.html @@ -1,5 +1,25 @@ - -Obtain Optimizer according to Optimizer String Value — h_get_optimizers • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    h_get_optimizers(
       optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"),
       optimizer_fun = h_optimizer_fun(optimizer),
    @@ -122,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    optimizer
    +

    Arguments +

    +
    +
    optimizer

    (character)
    names of built-in optimizers to try, subset of "L-BFGS-B", "BFGS", "CG" and "nlminb".

    @@ -140,46 +171,59 @@

    Arguments -

    Value

    +

    Value +

    Named list of optimizers created by h_partial_fun_args().

    -

    Details

    -

    If you want to use only the built-in optimizers:

    • optimizer is a shortcut to create a list of built-in optimizer functions +

      Details +

      +

      If you want to use only the built-in optimizers:

      +
        +
      • optimizer is a shortcut to create a list of built-in optimizer functions passed to optimizer_fun.

      • Allowed are "L-BFGS-B", "BFGS", "CG" (using stats::optim() with corresponding method) and "nlminb" (using stats::nlminb()).

      • Other arguments should go into optimizer_args.

      • -

      If you want to use your own optimizer function:

      • Make sure that there are three arguments: parameter (start value), objective function +

      +

      If you want to use your own optimizer function:

      +
        +
      • Make sure that there are three arguments: parameter (start value), objective function and gradient function are sequentially in the function arguments.

      • If there are other named arguments in front of these, make sure they are correctly specified through optimizer_args.

      • If the hessian can be used, please make sure its argument name is hessian and please add attribute use_hessian = TRUE to the function, using attr(fun, "use_hessian) <- TRUE.

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_get_prediction.html b/v0.3.3/reference/h_get_prediction.html index 1706257fa..17d12604a 100644 --- a/v0.3.3/reference/h_get_prediction.html +++ b/v0.3.3/reference/h_get_prediction.html @@ -1,5 +1,25 @@ - -Get Prediction — h_get_prediction • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_get_prediction(tmb_data, theta, beta, beta_vcov)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    object.

    @@ -133,37 +164,47 @@

    Arguments -

    Value

    +

    Value +

    -

    List with:

    • prediction: Matrix with columns fit, conf_var, and var.

    • +

      List with:

      +
        +
      • prediction: Matrix with columns fit, conf_var, and var.

      • covariance: List with subject specific covariance matrices.

      • index: List of zero-based subject indices.

      • -
    + +
    -

    Details

    +

    Details +

    See predict function in predict.cpp which is called internally.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_get_prediction_variance.html b/v0.3.3/reference/h_get_prediction_variance.html index 9e67fa026..18aa9460f 100644 --- a/v0.3.3/reference/h_get_prediction_variance.html +++ b/v0.3.3/reference/h_get_prediction_variance.html @@ -1,5 +1,25 @@ - -Get Prediction Variance — h_get_prediction_variance • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_get_prediction_variance(object, nsim, tmb_data)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    @@ -129,25 +160,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.3/reference/h_get_sim_per_subj.html b/v0.3.3/reference/h_get_sim_per_subj.html index f7181183c..69db77c40 100644 --- a/v0.3.3/reference/h_get_sim_per_subj.html +++ b/v0.3.3/reference/h_get_sim_per_subj.html @@ -1,5 +1,25 @@ - -Get simulated values by patient. — h_get_sim_per_subj • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_get_sim_per_subj(predict_res, nsub, nsim)
    -

    Arguments

    -
    predict_res
    +

    Arguments +

    +
    +
    predict_res

    (list)
    from h_get_prediction().

    @@ -129,25 +160,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.3/reference/h_gradient.html b/v0.3.3/reference/h_gradient.html index 012090e1b..05581e8e5 100644 --- a/v0.3.3/reference/h_gradient.html +++ b/v0.3.3/reference/h_gradient.html @@ -1,7 +1,27 @@ - -Computation of a Gradient Given Jacobian and Contrast Vector — h_gradient • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_gradient(jac_list, contrast)
    -

    Arguments

    -
    jac_list
    +

    Arguments +

    +
    +
    jac_list

    (list)
    Jacobian list produced e.g. by h_jac_list().

    @@ -130,9 +161,11 @@

    Arguments -

    Value

    +

    Value +

    Numeric vector which contains the quadratic forms of each element of @@ -140,22 +173,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_jac_list.html b/v0.3.3/reference/h_jac_list.html index c156302b2..2bbbb6282 100644 --- a/v0.3.3/reference/h_jac_list.html +++ b/v0.3.3/reference/h_jac_list.html @@ -1,5 +1,25 @@ - -Obtain List of Jacobian Matrix Entries for Covariance Matrix — h_jac_list • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_jac_list(tmb_data, theta_est, beta_vcov)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    @@ -129,9 +160,11 @@

    Arguments -

    Value

    +

    Value +

    List with one element per variance parameter containing a matrix @@ -140,22 +173,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_kr_df.html b/v0.3.3/reference/h_kr_df.html index 16fcc7e40..c1cd36ce8 100644 --- a/v0.3.3/reference/h_kr_df.html +++ b/v0.3.3/reference/h_kr_df.html @@ -1,7 +1,27 @@ - -Obtain the Adjusted Kenward-Roger degrees of freedom — h_kr_df • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_kr_df(v0, l, w, p)
    -

    Arguments

    -
    v0
    +

    Arguments +

    +
    +
    v0

    (matrix)
    unadjusted covariance matrix.

    @@ -136,32 +167,41 @@

    Argumentsh_get_kr_comp().

    -

    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • m: numeric degrees of freedom.

    • +

      Named list with elements:

      +
        +
      • m: numeric degrees of freedom.

      • lambda: numeric F statistic scale parameter.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_md_denom_df.html b/v0.3.3/reference/h_md_denom_df.html index b09971811..3ce44afa4 100644 --- a/v0.3.3/reference/h_md_denom_df.html +++ b/v0.3.3/reference/h_md_denom_df.html @@ -1,5 +1,25 @@ - -Calculating Denominator Degrees of Freedom for the Multi-Dimensional Case — h_md_denom_df • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,47 +140,57 @@
    -

    Usage

    +

    Usage +

    h_md_denom_df(t_stat_df)
    -

    Arguments

    -
    t_stat_df
    +

    Arguments +

    +
    +
    t_stat_df

    (numeric)
    n t-statistic derived degrees of freedom.

    -
    + +
    -

    Value

    +

    Value +

    Usually the calculation is returning 2 * E / (E - n) where E is the sum of t / (t - 2) over all t_stat_df values t.

    -

    Note

    +

    Note +

    If the input values are two similar to each other then just the average of them is returned. If any of the inputs is not larger than 2 then 2 is returned.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_mmrm_tmb_assert_start.html b/v0.3.3/reference/h_mmrm_tmb_assert_start.html index ca9d54997..5a234450e 100644 --- a/v0.3.3/reference/h_mmrm_tmb_assert_start.html +++ b/v0.3.3/reference/h_mmrm_tmb_assert_start.html @@ -1,5 +1,25 @@ - -Asserting Sane Start Values for TMB Fit — h_mmrm_tmb_assert_start • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_assert_start(tmb_object)
    -

    Arguments

    -
    tmb_object
    +

    Arguments +

    +
    +
    tmb_object

    (list)
    created with TMB::MakeADFun().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used for assertions.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_mmrm_tmb_check_conv.html b/v0.3.3/reference/h_mmrm_tmb_check_conv.html index 5eaee681d..aa762539d 100644 --- a/v0.3.3/reference/h_mmrm_tmb_check_conv.html +++ b/v0.3.3/reference/h_mmrm_tmb_check_conv.html @@ -1,5 +1,25 @@ - -Checking the TMB Optimization Result — h_mmrm_tmb_check_conv • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,22 +140,27 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_check_conv(tmb_opt, mmrm_tmb)
    -

    Arguments

    -
    tmb_opt
    +

    Arguments +

    +
    +
    tmb_opt

    (list)
    optimization result.

    mmrm_tmb

    (mmrm_tmb)
    result from h_mmrm_tmb_fit().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used to generate warnings in case that the model @@ -135,22 +168,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_mmrm_tmb_data.html b/v0.3.3/reference/h_mmrm_tmb_data.html index 87071e94f..4bcd3a47c 100644 --- a/v0.3.3/reference/h_mmrm_tmb_data.html +++ b/v0.3.3/reference/h_mmrm_tmb_data.html @@ -1,5 +1,25 @@ - -Data for TMB Fit — h_mmrm_tmb_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_data(
       formula_parts,
       data,
    @@ -126,8 +155,10 @@ 

    Usage

    -

    Arguments

    -
    formula_parts
    +

    Arguments +

    +
    +
    formula_parts

    (mmrm_tmb_formula_parts)
    list with formula parts from h_mmrm_tmb_formula_parts().

    @@ -161,12 +192,16 @@

    Arguments -

    Value

    +

    Value +

    -

    List of class mmrm_tmb_data with elements:

    • full_frame: data.frame with n rows containing all variables needed in the model.

    • +

      List of class mmrm_tmb_data with elements:

      +
        +
      • full_frame: data.frame with n rows containing all variables needed in the model.

      • data: data.frame of input dataset.

      • x_matrix: matrix with n rows and p columns specifying the overall design matrix.

      • x_cols_aliased: logical with potentially more than p elements indicating which @@ -187,9 +222,11 @@

        Value

        reml: int specifying whether REML estimation is used (1), otherwise ML (0).

      • subject_groups: factor specifying the grouping for each subject.

      • n_groups: int with the number of total groups

      • -
    + +
    -

    Details

    +

    Details +

    Note that the subject_var must not be factor but can also be character. If it is character, then it will be converted to factor internally. Here the levels will be the unique values, sorted alphabetically and numerically if there @@ -198,22 +235,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.3/reference/h_mmrm_tmb_extract_cov.html b/v0.3.3/reference/h_mmrm_tmb_extract_cov.html index b241d5e5e..19955c70d 100644 --- a/v0.3.3/reference/h_mmrm_tmb_extract_cov.html +++ b/v0.3.3/reference/h_mmrm_tmb_extract_cov.html @@ -1,7 +1,27 @@ - -Extract covariance matrix from TMB report and input data — h_mmrm_tmb_extract_cov • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_extract_cov(tmb_report, tmb_data, visit_var, is_spatial)
    -

    Arguments

    -
    tmb_report
    +

    Arguments +

    +
    +
    tmb_report

    (list)
    report created with TMB::MakeADFun() report function.

    @@ -136,9 +167,11 @@

    Arguments -

    Value

    +

    Value +

    Return a simple covariance matrix if there is no grouping, or a named @@ -147,22 +180,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_mmrm_tmb_fit.html b/v0.3.3/reference/h_mmrm_tmb_fit.html index 0f4564dd2..a10600937 100644 --- a/v0.3.3/reference/h_mmrm_tmb_fit.html +++ b/v0.3.3/reference/h_mmrm_tmb_fit.html @@ -1,7 +1,27 @@ - -Build TMB Fit Result List — h_mmrm_tmb_fit • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_fit(tmb_object, tmb_opt, formula_parts, tmb_data)
    -

    Arguments

    -
    tmb_object
    +

    Arguments +

    +
    +
    tmb_object

    (list)
    created with TMB::MakeADFun().

    @@ -137,12 +168,16 @@

    Argumentsh_mmrm_tmb_data().

    -

    + +
    -

    Value

    +

    Value +

    -

    List of class mmrm_tmb with:

    • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

    • +

      List of class mmrm_tmb with:

      +
        +
      • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

      • beta_est: vector of coefficient estimates.

      • beta_vcov: Variance-covariance matrix for coefficient estimates.

      • beta_vcov_inv_L: Lower triangular matrix L of the inverse variance-covariance matrix decomposition.

      • @@ -157,31 +192,37 @@

        Value

        opt_details: list with optimization details including convergence code.

      • tmb_object: original TMB object created with TMB::MakeADFun().

      • tmb_data: input.

      • -
    + +
    -

    Details

    +

    Details +

    Instead of inverting or decomposing beta_vcov, it can be more efficient to use its robust Cholesky decomposition LDL^T, therefore we return the corresponding two components L and D as well since they have been available on the C++ side already.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_mmrm_tmb_formula_parts.html b/v0.3.3/reference/h_mmrm_tmb_formula_parts.html index 2525ddaa9..02ec23248 100644 --- a/v0.3.3/reference/h_mmrm_tmb_formula_parts.html +++ b/v0.3.3/reference/h_mmrm_tmb_formula_parts.html @@ -1,5 +1,25 @@ - -Processing the Formula for TMB Fit — h_mmrm_tmb_formula_parts • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_formula_parts(
       formula,
       covariance = as.cov_struct(formula, warn_partial = FALSE)
    @@ -120,8 +149,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    Original formula.

    @@ -129,12 +160,16 @@

    Arguments -

    Value

    +

    Value +

    -

    List of class mmrm_tmb_formula_parts with elements:

    • formula: the original input.

    • +

      List of class mmrm_tmb_formula_parts with elements:

      +
        +
      • formula: the original input.

      • model_formula: formula with the covariance term is removed.

      • model_formula: formula with the covariance term removed.

      • full_formula: same as model_formula but includes the covariance @@ -146,25 +181,30 @@

        Value

        subject_var: string with the subject variable name.

      • group_var: string with the group variable name. If no group specified, this element is NULL.

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_mmrm_tmb_parameters.html b/v0.3.3/reference/h_mmrm_tmb_parameters.html index 09ee0d949..b99ec86fa 100644 --- a/v0.3.3/reference/h_mmrm_tmb_parameters.html +++ b/v0.3.3/reference/h_mmrm_tmb_parameters.html @@ -1,5 +1,25 @@ - -Start Parameters for TMB Fit — h_mmrm_tmb_parameters • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_parameters(formula_parts, tmb_data, start, n_groups = 1L)
    -

    Arguments

    -
    formula_parts
    +

    Arguments +

    +
    +
    formula_parts

    (mmrm_tmb_formula_parts)
    produced by h_mmrm_tmb_formula_parts().

    @@ -135,9 +166,11 @@

    Arguments -

    Value

    +

    Value +

    List with element theta containing the start values for the variance @@ -145,22 +178,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_newdata_add_pred.html b/v0.3.3/reference/h_newdata_add_pred.html index 7bc622ea2..3db10ab27 100644 --- a/v0.3.3/reference/h_newdata_add_pred.html +++ b/v0.3.3/reference/h_newdata_add_pred.html @@ -1,5 +1,25 @@ - -Add Prediction Results to New Data — h_newdata_add_pred • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_newdata_add_pred(x, newdata, se_fit, interval, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fit.

    @@ -138,9 +169,11 @@

    Argumentspredict.mmrm_tmb().

    -

    + +
    -

    Value

    +

    Value +

    The newdata as a tibble with additional columns .fitted, @@ -151,22 +184,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_optimizer_fun.html b/v0.3.3/reference/h_optimizer_fun.html index 1c5aeebf3..d414173cf 100644 --- a/v0.3.3/reference/h_optimizer_fun.html +++ b/v0.3.3/reference/h_optimizer_fun.html @@ -1,5 +1,25 @@ - -Obtain Optimizer Function with Character — h_optimizer_fun • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_optimizer_fun(optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"))
    -

    Arguments

    -
    optimizer
    +

    Arguments +

    +
    +
    optimizer

    (character)
    vector of optimizers.

    -
    + +
    -

    Value

    +

    Value +

    A (list)
    of optimizer functions generated from h_partial_fun_args().

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_partial_fun_args.html b/v0.3.3/reference/h_partial_fun_args.html index c75860503..65b68072b 100644 --- a/v0.3.3/reference/h_partial_fun_args.html +++ b/v0.3.3/reference/h_partial_fun_args.html @@ -1,5 +1,25 @@ - -Create Partial Functions — h_partial_fun_args • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_partial_fun_args(fun, ..., additional_attr = list())
    -

    Arguments

    -
    fun
    +

    Arguments +

    +
    +
    fun

    (function)
    to be wrapped.

    @@ -129,16 +160,19 @@

    Arguments -

    Value

    +

    Value +

    Object with S3 class "partial", a function with args attribute (and possibly more attributes from additional_attr).

    -

    Details

    +

    Details +

    This function add args attribute to the original function, and add an extra class partial to the function. args is the argument for the function, and elements in ... will override the existing @@ -146,22 +180,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.3/reference/h_print_aic_list.html b/v0.3.3/reference/h_print_aic_list.html index 8919b6ef5..c31e06b3a 100644 --- a/v0.3.3/reference/h_print_aic_list.html +++ b/v0.3.3/reference/h_print_aic_list.html @@ -1,5 +1,25 @@ - -Printing AIC and other Model Fit Criteria — h_print_aic_list • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,38 +140,46 @@
    -

    Usage

    +

    Usage +

    h_print_aic_list(aic_list, digits = 1)
    -

    Arguments

    -
    aic_list
    +

    Arguments +

    +
    +
    aic_list

    (list)
    list as part of from summary.mmrm().

    digits

    (number)
    number of decimal places used with round().

    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_print_call.html b/v0.3.3/reference/h_print_call.html index 1e94dd6b4..4623f80dd 100644 --- a/v0.3.3/reference/h_print_call.html +++ b/v0.3.3/reference/h_print_call.html @@ -1,5 +1,25 @@ - -Printing MMRM Function Call — h_print_call • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_print_call(call, n_obs, n_subjects, n_timepoints)
    -

    Arguments

    -
    call
    +

    Arguments +

    +
    +
    call

    (call)
    original mmrm() function call.

    @@ -133,25 +164,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.3/reference/h_print_cov.html b/v0.3.3/reference/h_print_cov.html index 84e5df0a5..f63829a8e 100644 --- a/v0.3.3/reference/h_print_cov.html +++ b/v0.3.3/reference/h_print_cov.html @@ -1,5 +1,25 @@ - -Printing MMRM Covariance Type — h_print_cov • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_print_cov(cov_type, n_theta, n_groups)
    -

    Arguments

    -
    cov_type
    +

    Arguments +

    +
    +
    cov_type

    (string)
    covariance structure abbreviation.

    @@ -129,25 +160,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.3/reference/h_quad_form.html b/v0.3.3/reference/h_quad_form.html index 7e39cebc6..b7ec696d7 100644 --- a/v0.3.3/reference/h_quad_form.html +++ b/v0.3.3/reference/h_quad_form.html @@ -1,7 +1,27 @@ - -Quadratic Form Calculations — h_quad_form • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,15 +143,18 @@
    -

    Usage

    +

    Usage +

    h_quad_form_vec(vec, center)
     
     h_quad_form_mat(mat, center)
    -

    Arguments

    -
    vec
    +

    Arguments +

    +
    +
    vec

    (numeric)
    interpreted as a row vector.

    @@ -137,34 +168,42 @@

    Arguments -

    Functions

    +

    Functions +

    -
    • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) +

        +
      • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) as a numeric (not a matrix).

      • h_quad_form_mat(): calculates the quadratic form mat %*% center %*% t(mat) as a matrix, the result is square and has dimensions identical to the number of rows in mat.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_reconcile_cov_struct.html b/v0.3.3/reference/h_reconcile_cov_struct.html index 47977134a..be1ea0445 100644 --- a/v0.3.3/reference/h_reconcile_cov_struct.html +++ b/v0.3.3/reference/h_reconcile_cov_struct.html @@ -1,5 +1,25 @@ - -Reconcile Possible Covariance Structure Inputs — h_reconcile_cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_reconcile_cov_struct(formula = NULL, covariance = NULL)
    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -128,9 +159,11 @@

    Argumentsas.cov_struct(). If no value is provided, a structure is derived from the provided formula.

    -

    + +
    -

    Value

    +

    Value +

    The value covariance if it's provided or a covariance structure @@ -139,22 +172,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_record_all_output.html b/v0.3.3/reference/h_record_all_output.html index 0a3de85d2..0982534b8 100644 --- a/v0.3.3/reference/h_record_all_output.html +++ b/v0.3.3/reference/h_record_all_output.html @@ -1,9 +1,29 @@ - - + + + + + +Capture all Output — h_record_all_output • mmrm +Capture all Output — h_record_all_output • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    h_record_all_output(expr, remove = list(), divergence = list())
    -

    Arguments

    -
    expr
    +

    Arguments +

    +
    +
    expr

    (expression)
    to be executed.

    @@ -139,35 +170,44 @@

    Arguments -

    Value

    +

    Value +

    -

    A list containing

    • result: The object returned by expr or list() if an error was thrown.

    • +

      A list containing

      +
        +
      • result: The object returned by expr or list() if an error was thrown.

      • warnings: NULL or a character vector if warnings were thrown.

      • errors: NULL or a string if an error was thrown.

      • messages: NULL or a character vector if messages were produced.

      • divergence: NULL or a character vector if divergence messages were caught.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_residuals_normalized.html b/v0.3.3/reference/h_residuals_normalized.html index ab4a9da1f..12d52b0f3 100644 --- a/v0.3.3/reference/h_residuals_normalized.html +++ b/v0.3.3/reference/h_residuals_normalized.html @@ -1,5 +1,25 @@ - -Calculate normalized residuals — h_residuals_normalized • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_normalized(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_residuals_pearson.html b/v0.3.3/reference/h_residuals_pearson.html index 8791e3308..b74383b64 100644 --- a/v0.3.3/reference/h_residuals_pearson.html +++ b/v0.3.3/reference/h_residuals_pearson.html @@ -1,5 +1,25 @@ - -Calculate Pearson Residuals — h_residuals_pearson • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_pearson(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_residuals_response.html b/v0.3.3/reference/h_residuals_response.html index a4cce5c37..6bcc35f62 100644 --- a/v0.3.3/reference/h_residuals_response.html +++ b/v0.3.3/reference/h_residuals_response.html @@ -1,5 +1,25 @@ - -Calculate response residuals. — h_residuals_response • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_response(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_split_control.html b/v0.3.3/reference/h_split_control.html index 55c4e0b5a..ee66deb86 100644 --- a/v0.3.3/reference/h_split_control.html +++ b/v0.3.3/reference/h_split_control.html @@ -1,7 +1,27 @@ - -Split Control List — h_split_control • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,44 +143,53 @@
    -

    Usage

    +

    Usage +

    h_split_control(control, ...)
    -

    Arguments

    -
    control
    +

    Arguments +

    +
    +
    control

    (mmrm_control)
    object.

    ...

    additional parameters to update the control object.

    -
    + +
    -

    Value

    +

    Value +

    A list of mmrm_control entries.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_summarize_all_fits.html b/v0.3.3/reference/h_summarize_all_fits.html index 6ecf99104..be1062ee8 100644 --- a/v0.3.3/reference/h_summarize_all_fits.html +++ b/v0.3.3/reference/h_summarize_all_fits.html @@ -1,5 +1,25 @@ - -Summarizing List of Fits — h_summarize_all_fits • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_summarize_all_fits(all_fits)
    -

    Arguments

    -
    all_fits
    +

    Arguments +

    +
    +
    all_fits

    (list of mmrm_fit or try-error)
    list of fits.

    -
    + +
    -

    Value

    +

    Value +

    List with warnings, messages, log_liks and converged results.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_tbl_confint_terms.html b/v0.3.3/reference/h_tbl_confint_terms.html index 0fa0e57b5..92880ca9a 100644 --- a/v0.3.3/reference/h_tbl_confint_terms.html +++ b/v0.3.3/reference/h_tbl_confint_terms.html @@ -1,5 +1,25 @@ - -Extract tibble with Confidence Intervals and Term Names — h_tbl_confint_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,44 +140,53 @@
    -

    Usage

    +

    Usage +

    h_tbl_confint_terms(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fit object.

    ...

    passed to stats::confint(), hence not used at the moment.

    -
    + +
    -

    Value

    +

    Value +

    A tibble with term, conf.low, conf.high columns.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_test_1d.html b/v0.3.3/reference/h_test_1d.html index 960b1901f..a896ac648 100644 --- a/v0.3.3/reference/h_test_1d.html +++ b/v0.3.3/reference/h_test_1d.html @@ -1,7 +1,27 @@ - -Creating T-Statistic Test Results For One-Dimensional Contrast — h_test_1d • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_test_1d(object, contrast, df)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -134,31 +165,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val (2-sided p-value).

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_test_md.html b/v0.3.3/reference/h_test_md.html index 583642026..58b879999 100644 --- a/v0.3.3/reference/h_test_md.html +++ b/v0.3.3/reference/h_test_md.html @@ -1,7 +1,27 @@ - -Creating F-Statistic Test Results For Multi-Dimensional Contrast — h_test_md • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_test_md(object, contrast, df, f_stat_factor = 1)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -136,31 +167,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_tr.html b/v0.3.3/reference/h_tr.html index cc441ed33..21beebd07 100644 --- a/v0.3.3/reference/h_tr.html +++ b/v0.3.3/reference/h_tr.html @@ -1,5 +1,25 @@ - -Trace of a Matrix — h_tr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_tr(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (matrix)
    square matrix input.

    -
    + +
    -

    Value

    +

    Value +

    The trace of the square matrix.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_valid_formula.html b/v0.3.3/reference/h_valid_formula.html index d17852a1a..5d20b8e4d 100644 --- a/v0.3.3/reference/h_valid_formula.html +++ b/v0.3.3/reference/h_valid_formula.html @@ -1,5 +1,25 @@ - -Validate mmrm Formula — h_valid_formula • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,39 +140,48 @@
    -

    Usage

    +

    Usage +

    h_valid_formula(formula)
    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    to check.

    -
    + +
    -

    Details

    +

    Details +

    In mmrm models, . is not allowed as it introduces ambiguity of covariates to be used, so it is not allowed to be in formula.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_var_adj.html b/v0.3.3/reference/h_var_adj.html index c9be0d9d1..d038c8cd3 100644 --- a/v0.3.3/reference/h_var_adj.html +++ b/v0.3.3/reference/h_var_adj.html @@ -1,9 +1,29 @@ - -Obtain the Adjusted Covariance Matrix — h_var_adj • mmrm +Obtain the Adjusted Covariance Matrix — h_var_adj • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    h_var_adj(v, w, p, q, r, linear = FALSE)
    -

    Arguments

    -
    v
    +

    Arguments +

    +
    +
    v

    (matrix)
    unadjusted covariance matrix.

    @@ -147,31 +178,37 @@

    Arguments -

    Value

    +

    Value +

    The matrix of adjusted covariance matrix.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_warn_na_action.html b/v0.3.3/reference/h_warn_na_action.html index 39e3c8760..ef7bade75 100644 --- a/v0.3.3/reference/h_warn_na_action.html +++ b/v0.3.3/reference/h_warn_na_action.html @@ -1,5 +1,25 @@ - -Warn on na.action — h_warn_na_action • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,27 +140,32 @@
    -

    Usage

    +

    Usage +

    h_warn_na_action()
    - + +
    -
    + + - - + + diff --git a/v0.3.3/reference/h_within_or_between.html b/v0.3.3/reference/h_within_or_between.html index 78c2e3cbb..58f6d2ece 100644 --- a/v0.3.3/reference/h_within_or_between.html +++ b/v0.3.3/reference/h_within_or_between.html @@ -1,7 +1,27 @@ - -Determine Within or Between for each Design Matrix Column — h_within_or_between • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,22 +143,27 @@
    -

    Usage

    +

    Usage +

    h_within_or_between(x_matrix, subject_ids)
    -

    Arguments

    -
    x_matrix
    +

    Arguments +

    +
    +
    x_matrix

    (matrix)
    the design matrix with column names.

    subject_ids

    (factor)
    the subject IDs.

    -
    + +
    -

    Value

    +

    Value +

    Character vector with "intercept", "within" or "between" for each @@ -138,22 +171,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/index.html b/v0.3.3/reference/index.html index 9055f1eb0..7d768a887 100644 --- a/v0.3.3/reference/index.html +++ b/v0.3.3/reference/index.html @@ -1,5 +1,23 @@ - -Function reference • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +44,8 @@ + - + + - + @@ -106,189 +132,252 @@
    -

    Package

    +

    Package +

    -
    +
    +
    -
    +
    +
    mmrm-package _PACKAGE
    -
    mmrm Package
    -
    -

    Functions

    +
    +mmrm Package
    + +
    +
    +

    Functions +

    -
    +
    +
    -
    +
    +
    mmrm()
    Fit an MMRM
    -
    +
    +
    +
    fit_mmrm()
    Low-Level Fitting Function for MMRM
    -
    +
    +
    +
    mmrm_control()
    Control Parameters for Fitting an MMRM
    -
    +
    +
    +
    fit_single_optimizer()
    Fitting an MMRM with Single Optimizer
    -
    +
    +
    +
    refit_multiple_optimizers()
    Refitting MMRM with Multiple Optimizers
    -
    +
    +
    +
    df_1d()
    Calculation of Degrees of Freedom for One-Dimensional Contrast
    -
    +
    +
    +
    df_md()
    Calculation of Degrees of Freedom for Multi-Dimensional Contrast
    -
    +
    +
    +
    component()
    Component Access for mmrm_tmb Objects
    -
    -

    Methods

    + +
    +
    +

    Methods +

    -
    +
    +
    -

    Covariance Structures

    + +
    +
    +

    Covariance Structures +

    -
    +
    +
    -
    +
    +
    cov_struct()
    Define a Covariance Structure
    -
    +
    +
    +
    as.cov_struct()
    Coerce into a Covariance Structure Definition
    -
    +
    +
    +
    format(<cov_struct>)
    Format Covariance Structure Object
    -
    +
    +
    +
    print(<cov_struct>)
    Print a Covariance Structure Object
    -
    +
    +
    +
    cov_types()
    Covariance Types
    -
    -

    Estimate Marginal Means

    + +
    +
    +

    Estimate Marginal Means +

    -
    +
    +
    -
    +
    +
    emmeans_support
    -
    Support for emmeans
    -
    -

    Datasets

    +
    Support for emmeans +
    + +
    +
    +

    Datasets +

    -
    +
    +
    -
    +
    +
    fev_data
    Example Data on FEV1
    -
    +
    +
    +
    bcva_data
    Example Data on BCVA
    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.3/reference/is_infix.html b/v0.3.3/reference/is_infix.html index 48b0c51b9..bda998a6e 100644 --- a/v0.3.3/reference/is_infix.html +++ b/v0.3.3/reference/is_infix.html @@ -1,5 +1,25 @@ - -Test Whether a Symbol is an Infix Operator — is_infix • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,49 +140,62 @@
    -

    Usage

    +

    Usage +

    is_infix(name)
    -

    Arguments

    -
    name
    +

    Arguments +

    +
    +
    name

    (symbol or name or string)
    a possible reference to an infix operator to check.

    -
    + +
    -

    Value

    +

    Value +

    A logical indicating whether the name is the name of an infix operator.

    -

    is_infix(as.name("|"))
    +

    +
    +
    is_infix(as.name("|"))
     is_infix("|")
    -is_infix("c")

    +is_infix("c")
    +

    +
    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/mmrm-package.html b/v0.3.3/reference/mmrm-package.html index 041726f5f..dc15f8f3b 100644 --- a/v0.3.3/reference/mmrm-package.html +++ b/v0.3.3/reference/mmrm-package.html @@ -1,5 +1,25 @@ - -mmrm Package — mmrm-package • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -113,15 +142,23 @@
    -

    See also

    -
    -

    Author

    +

    Author +

    Maintainer: Daniel Sabanes Bove daniel.sabanes_bove@roche.com

    -

    Authors:

    + +
    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/mmrm.html b/v0.3.3/reference/mmrm.html index 50f6139f5..ebfe4f11b 100644 --- a/v0.3.3/reference/mmrm.html +++ b/v0.3.3/reference/mmrm.html @@ -1,7 +1,27 @@ - -Fit an MMRM — mmrm • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,7 +143,8 @@
    -

    Usage

    +

    Usage +

    mmrm(
       formula,
       data,
    @@ -128,8 +157,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -162,15 +193,18 @@

    Argumentsmmrm_control().

    -

    + +
    -

    Value

    +

    Value +

    An mmrm object.

    -

    Details

    +

    Details +

    The formula typically looks like: FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID) so specifies response and covariates as usual, and exactly one special term @@ -196,15 +230,19 @@

    Detailsmmrm.

    -

    Note

    +

    Note +

    The mmrm object is also an mmrm_fit and an mmrm_tmb object, therefore corresponding methods also work (see mmrm_tmb_methods).

    -

    Additional contents depend on the choice of the adjustment method:

    • If Satterthwaite adjustment is used, the Jacobian information jac_list +

      Additional contents depend on the choice of the adjustment method:

      +
        +
      • If Satterthwaite adjustment is used, the Jacobian information jac_list is included.

      • If Kenward-Roger adjustment is used, kr_comp contains necessary components and beta_vcov_adj includes the adjusted coefficients covariance matrix.

      • -

      Use of the package emmeans is supported, see emmeans_support.

      +
    +

    Use of the package emmeans is supported, see emmeans_support.

    NA values are always omitted regardless of na.action setting.

    When the number of visit levels is large, it usually requires large memory to create the covariance matrix. By default, the maximum allowed visit levels is 100, and if there are more @@ -215,7 +253,8 @@

    Note

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -239,22 +278,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.3/reference/mmrm_control.html b/v0.3.3/reference/mmrm_control.html index 6f89fd961..8dc220b1f 100644 --- a/v0.3.3/reference/mmrm_control.html +++ b/v0.3.3/reference/mmrm_control.html @@ -1,9 +1,29 @@ - - + + + + + +Control Parameters for Fitting an MMRM — mmrm_control • mmrm +Control Parameters for Fitting an MMRM — mmrm_control • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,7 +146,8 @@
    -

    Usage

    +

    Usage +

    mmrm_control(
       n_cores = 1L,
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within"),
    @@ -132,8 +161,10 @@ 

    Usage

    -

    Arguments

    -
    n_cores
    +

    Arguments +

    +
    +
    n_cores

    (count)
    number of cores to be used.

    @@ -167,15 +198,18 @@

    Argumentsh_get_optimizers().

    -

    + +
    -

    Value

    +

    Value +

    List of class mmrm_control with the control parameters.

    + +
    -

    Examples

    +

    Examples +

    mmrm_control(
       optimizer_fun = stats::optim,
       optimizer_args = list(method = "L-BFGS-B")
    @@ -308,22 +346,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.3/reference/mmrm_methods.html b/v0.3.3/reference/mmrm_methods.html index 556ef69d6..226b144cc 100644 --- a/v0.3.3/reference/mmrm_methods.html +++ b/v0.3.3/reference/mmrm_methods.html @@ -1,5 +1,25 @@ - -Methods for mmrm Objects — mmrm_methods • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm
     summary(object, ...)
     
    @@ -126,48 +155,65 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the fitted MMRM including Jacobian and call etc.

    ...

    not used.

    -
    + +
    -

    Value

    +

    Value +

    Depends on the method, see Details and Functions.

    -

    Details

    -

    While printing the summary of (mmrm)
    object, the following will be displayed:

    1. Formula. The formula used in the model.

    2. +

      Details +

      +

      While printing the summary of (mmrm)
      object, the following will be displayed:

      +
        +
      1. Formula. The formula used in the model.

      2. Data. The data used for analysis, including number of subjects, number of valid observations.

      3. Covariance. The covariance structure and number of variance parameters.

      4. Method. Restricted maximum likelihood(REML) or maximum likelihood(ML).

      5. Model selection criteria. AIC, BIC, log likelihood and deviance.

      6. Coefficients. Coefficients of the covariates.

      7. -
      8. Covariance estimate. The covariance estimate(for each group).

        1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available +

        2. +

          Covariance estimate. The covariance estimate(for each group).

          +
            +
          1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available in data will be displayed.

          2. If the covariance structure is spatial, the covariance matrix of two time points with unit distance will be displayed.

          3. -
        3. -
    + + + +
    -

    Functions

    +

    Functions +

    -
    • summary(mmrm): summarizes the MMRM fit results.

    • +
        +
      • summary(mmrm): summarizes the MMRM fit results.

      • print(summary.mmrm): prints the MMRM fit summary.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_tmb_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- mmrm(formula, fev_data)
     # Summary:
    @@ -224,22 +270,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.3/reference/mmrm_tidiers.html b/v0.3.3/reference/mmrm_tidiers.html index 4878561fb..ace9e623d 100644 --- a/v0.3.3/reference/mmrm_tidiers.html +++ b/v0.3.3/reference/mmrm_tidiers.html @@ -1,9 +1,29 @@ - - + + + + + +Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm +Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,7 +146,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm
     tidy(x, conf.int = FALSE, conf.level = 0.95, ...)
     
    @@ -137,8 +166,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fitted model.

    @@ -170,21 +201,27 @@

    Argumentsresiduals.mmrm_tmb().

    -

    + +
    -

    Functions

    +

    Functions +

    -
    • tidy(mmrm): derives tidy tibble from an mmrm object.

    • +
        +
      • tidy(mmrm): derives tidy tibble from an mmrm object.

      • glance(mmrm): derives glance tibble from an mmrm object.

      • augment(mmrm): derives augment tibble from an mmrm object.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tmb_methods for additional methods.

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -276,22 +313,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.3/reference/mmrm_tmb_methods.html b/v0.3.3/reference/mmrm_tmb_methods.html index 0117172a8..1016a1399 100644 --- a/v0.3.3/reference/mmrm_tmb_methods.html +++ b/v0.3.3/reference/mmrm_tmb_methods.html @@ -1,5 +1,25 @@ - -Methods for mmrm_tmb Objects — mmrm_tmb_methods • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm_tmb
     coef(object, complete = TRUE, ...)
     
    @@ -185,8 +214,10 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM object.

    @@ -272,15 +303,18 @@

    Arguments -

    + +
    -

    Value

    +

    Value +

    Depends on the method, see Functions.

    -

    Details

    +

    Details +

    include argument controls the variables the returned model frame will include. Possible options are "response_var", "subject_var", "visit_var" and "group_var", representing the response variable, subject variable, visit variable or group variable. @@ -288,9 +322,11 @@

    Detailsmodel.matrix.

    -

    Functions

    +

    Functions +

    -
    • coef(mmrm_tmb): obtains the estimated coefficients.

    • +
        +
      • coef(mmrm_tmb): obtains the estimated coefficients.

      • fitted(mmrm_tmb): obtains the fitted values.

      • predict(mmrm_tmb): predict conditional means for new data; optionally with standard errors and confidence or prediction intervals. @@ -324,11 +360,14 @@

        Functions -

        References

        +

        References +

        -
        • Hurvich CM, Tsai C (1989). +

          • Gałecki A, Burzykowski T (2013). +

          +
            +
          • Gałecki A, Burzykowski T (2013). “Linear mixed-effects model.” In Linear mixed-effects models using R, 245--273. Springer.

          • -
    + +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- fit_mmrm(formula, fev_data, weights = rep(1, nrow(fev_data)))
     # Estimated coefficients:
    @@ -3863,22 +3907,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.3/reference/parsnip_add_mmrm.html b/v0.3.3/reference/parsnip_add_mmrm.html index cceb35954..d02400874 100644 --- a/v0.3.3/reference/parsnip_add_mmrm.html +++ b/v0.3.3/reference/parsnip_add_mmrm.html @@ -1,5 +1,25 @@ - -Register mmrm For Use With tidymodels — parsnip_add_mmrm • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -112,45 +141,55 @@
    -

    Usage

    +

    Usage +

    parsnip_add_mmrm(quietly = FALSE)
    -

    Arguments

    -
    quietly
    +

    Arguments +

    +
    +
    quietly

    logical: should progress and error messages be suppressed?

    -
    + +
    -

    Value

    +

    Value +

    A logical value indicating whether registration was successful.

    -

    Details

    +

    Details +

    We can use parsnip::show_model_info("linear_reg") to check the registration with parsnip and thus the wider tidymodels ecosystem.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/position_symbol.html b/v0.3.3/reference/position_symbol.html index d0b50147e..13de112aa 100644 --- a/v0.3.3/reference/position_symbol.html +++ b/v0.3.3/reference/position_symbol.html @@ -1,9 +1,29 @@ - - + + + + + +Search For the Position of a Symbol — position_symbol • mmrm +Search For the Position of a Symbol — position_symbol • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    position_symbol(x, sym, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (list of language)
    a list of language objects in which to search for a specific symbol.

    @@ -137,9 +168,11 @@

    ArgumentsPosition().

    -

    + +
    -

    Value

    +

    Value +

    The position of the symbol if found, or the nomatch value @@ -147,22 +180,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/print.cov_struct.html b/v0.3.3/reference/print.cov_struct.html index e9213116e..37d386790 100644 --- a/v0.3.3/reference/print.cov_struct.html +++ b/v0.3.3/reference/print.cov_struct.html @@ -1,5 +1,25 @@ - -Print a Covariance Structure Object — print.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,45 +140,54 @@
    -

    Usage

    +

    Usage +

    # S3 method for cov_struct
     print(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    ...

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    x invisibly.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/reexports.html b/v0.3.3/reference/reexports.html index 15fd3727a..ff3357766 100644 --- a/v0.3.3/reference/reexports.html +++ b/v0.3.3/reference/reexports.html @@ -1,19 +1,39 @@ - - + + + + + +Objects exported from other packages — reexports • mmrm +Objects exported from other packages — reexports • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -38,7 +60,8 @@ + - + + - + @@ -124,30 +152,36 @@

    These objects are imported from other packages. Follow the links below to see their documentation.

    -
    generics
    +
    +
    generics

    augment, glance, tidy

    -
    + + - + +
    -
    + + - - + + diff --git a/v0.3.3/reference/refit_multiple_optimizers.html b/v0.3.3/reference/refit_multiple_optimizers.html index 6848435f1..b8e8625b4 100644 --- a/v0.3.3/reference/refit_multiple_optimizers.html +++ b/v0.3.3/reference/refit_multiple_optimizers.html @@ -1,5 +1,25 @@ - -Refitting MMRM with Multiple Optimizers — refit_multiple_optimizers • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    refit_multiple_optimizers(fit, ..., control = mmrm_control(...))
    -

    Arguments

    -
    fit
    +

    Arguments +

    +
    +
    fit

    (mmrm_fit)
    original model fit from fit_single_optimizer().

    @@ -129,20 +160,24 @@

    Arguments -

    Value

    +

    Value +

    The best (in terms of log likelihood) fit which converged.

    -

    Note

    +

    Note +

    For Windows, no parallel computations are currently implemented.

    -

    Examples

    +

    Examples +

    fit <- fit_single_optimizer(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data,
    @@ -153,22 +188,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.3/reference/register_on_load.html b/v0.3.3/reference/register_on_load.html index ce60a57f9..6e2758eab 100644 --- a/v0.3.3/reference/register_on_load.html +++ b/v0.3.3/reference/register_on_load.html @@ -1,5 +1,25 @@ - -Helper Function for Registering Functionality With Suggests Packages — register_on_load • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    register_on_load(
       pkg,
       ver = c(NA_character_, NA_character_),
    @@ -122,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    pkg
    +

    Arguments +

    +
    +
    pkg

    (string)
    package name.

    @@ -144,9 +175,11 @@

    Arguments -

    Value

    +

    Value +

    A logical (invisibly) indicating whether registration was successful. @@ -154,22 +187,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/tmb_cov_type.html b/v0.3.3/reference/tmb_cov_type.html index da6f93c6b..aa03f13f4 100644 --- a/v0.3.3/reference/tmb_cov_type.html +++ b/v0.3.3/reference/tmb_cov_type.html @@ -1,5 +1,25 @@ - -Produce A Covariance Identifier Passing to TMB — tmb_cov_type • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    tmb_cov_type(cov)
    -

    Arguments

    -
    cov
    +

    Arguments +

    +
    +
    cov

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    A string used for method dispatch when passed to TMB.

    + +
    -
    + + - - + + diff --git a/v0.3.3/reference/validate_cov_struct.html b/v0.3.3/reference/validate_cov_struct.html index 8a62c0edb..b59994ab0 100644 --- a/v0.3.3/reference/validate_cov_struct.html +++ b/v0.3.3/reference/validate_cov_struct.html @@ -1,5 +1,25 @@ - -Validate Covariance Structure Data — validate_cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    validate_cov_struct(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    x if successful, or an error is thrown otherwise.

    + +
    -
    + + - - + + diff --git a/v0.3.4/404.html b/v0.3.4/404.html index 0f7e17ce0..ea347a070 100644 --- a/v0.3.4/404.html +++ b/v0.3.4/404.html @@ -1,5 +1,4 @@ - - + @@ -81,11 +80,10 @@ Changelog +v0.2.2 + + - + + - + @@ -110,46 +136,66 @@

    Thank you for your interest in contributing to this repo! Your contribution is highly valued. Please go through this document for guidance on how to contribute.

    -

    Programming conventions

    +

    Programming conventions +

    Please follow the programming conventions to ensure a consistent programming style across the package.

    Generally we follow the tidyverse style guide. Some specific conventions that deviate from this are explained below.

    -

    Functions

    -
    1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
    2. +

      Functions +

      +
        +
      1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
      2. Functions starting with h_ are helper functions and they should not be exported.
      3. Functions should be well documented using roxygen2 (even when they are not exported).
      4. Functions must be unit tested (even when they are not exported).
      5. -
    + +
    -

    Imports

    +

    Imports +

    In package mmrm, we follow the following convention in package imports.

    -
    1. When only a few functions from another package are needed: -
      1. In DESCRIPTION, add that package into Imports.
      2. +
          +
        1. When only a few functions from another package are needed: +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we add a importFrom with a single function from the package. -
            1. The function imported can be any random function within the package.
            2. -
          3. +
              +
            1. The function imported can be any random function within the package.
            2. +
            +
          4. Always use package::function style wherever you need to use the function.
          5. Example: stats.
          6. -
        2. +
        +
      3. When many functions from another package are needed: -
        1. In DESCRIPTION, add that package into Imports.
        2. +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we use a import to import every function.
          3. Use the functions directly without prefix.
          4. Example: checkmate.
          5. -
          -
    + + + +
    -

    Comments

    -
    • Comments should always follow sentence style.
    • +

      Comments +

      +
        +
      • Comments should always follow sentence style.
      • Comments should be as minimal as possible: Generally the code and variable names should be clear enough to not need any comments. Only use them when needed and explain the “Why” and not the “What”.
      • -
    + +
    -

    Documentation

    -
    • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

    • +

      Documentation +

      +
        +
      • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

      • Exported objects must have a lifecycle badge to clarify the maturity.

        -
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • -
      • +
          +
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • +
        +
      • Use Title Style for the title of the documentation.

      • Always include a @description part with at least one sentence describing the object.

      • @@ -161,38 +207,55 @@

        Documentationwebsite.

      • In vignettes, you cannot directly reference help pages but only pkgdown web pages. Note that this includes only exported objects. To make it look similar to the help page references, please here also use function() style.

      • mmrm_review_methods.Rmd is a large vignette and we precompute this vignette to make the GitHub actions faster. Run the script vignettes/precompile.R to regenerate the precomputed vignette and subsequently update it in GitHub. Before every release we need to run this again. Please note you need to install the package and then compile the vignette because efficiency is better after installation to provide a fair comparison.

      • -
    + +
    -

    Github conventions

    +

    Github conventions +

    When using GitHub to collaborate, the following conventions are needed:

    -
    1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. -
      • If you are going to work on this issue, please assign yourself.
      • -
    2. +
        +
      1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. +
          +
        • If you are going to work on this issue, please assign yourself.
        • +
        +
      2. Please create a branch in the mmrm repository, instead of creating forks, unless you are not yet a team member. -
        • Branches should be associated with a GitHub issue and linked to an issue id.
        • +
            +
          • Branches should be associated with a GitHub issue and linked to an issue id.
          • The name of a branch should be of the form: <issue_id>_<short_discription>.
          • -
          +
        +
      3. Add changes to the branch and push it to GitHub. -
        • Please use clear commit messages.
        • +
            +
          • Please use clear commit messages.
          • Please keep your changes focused on the issue. If there are independent changes, please separate it into another PR linking to another issue.
          • -
          +
        +
      4. Please create a Pull Request when you think your code changes are ready: -
        • Functions are well documented.
        • +
            +
          • Functions are well documented.
          • Functions have corresponding unit tests.
          • Changes pass all the GitHub action checks.
          • The checklist in the corresponding issue is completed.
          • -
          +
        +
      5. Address all the comments you receive. -
        • at least one approval is needed to merge.
        • -
      6. -
    +
      +
    • at least one approval is needed to merge.
    • +
    + + +
    -

    Contribution tips

    +

    Contribution tips +

    -

    Development environment Set-up

    +

    Development environment Set-up +

    The development this mmrm package is based on the latest R version and C++ compilers. The package dependencies are the most recent versions from CRAN. We recommend that your working environment is set up in the same way. Additionally, there are some tools we recommend you to install:

    -
    1. +
        +
      1. RTools if you work on a Windows operating system. Alternatively you can use docker to separate the operating system and the development system.
      2. GitKraken is a very useful user interface for git including visualization of git commit graphs, file history, etc.
      3. @@ -200,43 +263,82 @@

        Development environment Set-uplintr will allow you to perform static code analysis.
      4. pre-commit is a Python module that allows you to identify issues before you commit locally.
      5. -

    + +
    -

    Issue labels

    +

    Issue labels +

    The issues are categorized with several labels:

    - +
    Label name
    ++++ + + - + + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + -
    Label name Description
    SPx
    SPx SP (story points) indicate complexity, and the larger the subsequent number, the more time consuming the issue is expected to be
    priority
    priority Issues with this label should be completed with higher priority
    good first issue
    good first issue Good choices for new team members
    blocked
    blocked Blocked by other issues
    bug
    bug Something isn’t working
    devops
    devops Development and Operation
    discussion
    discussion Discussion needed
    documentation
    documentation Improvement of documentation is needed
    duplicate
    duplicate The issue already exists
    enhancement
    enhancement New feature or request
    help wanted
    help wanted Extra attention is needed
    invalid
    invalid This doesn’t seem right
    question
    question Further information needed

    Please choose an issue based on your interest, issue complexity, and priority.

    + + + +

    Please choose an issue based on your interest, issue complexity, and priority.

    -

    Add new unit tests

    +

    Add new unit tests +

    To add a new unit test, you need to first identify the test scope. Does the test fit in the scope of existing tests? If so, please modify the existing test files under tests/testthat/ folder or src/ folder, depending on whether the code to be tested is R or C++. Otherwise please create a new test file, with a name prefix of “test-”.

    In each test case, use the following structure:

    @@ -249,19 +351,25 @@ 

    Add new unit tests -

    Add integration tests

    +

    Add integration tests +

    Integration tests compare the results of SAS and R and assures the quality of our code. To add an integration test, you need to do the following:

    -
    1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
    2. +
        +
      1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
      2. Save the results in .txt format in the design/SAS/ folder.
      3. Decide the key outputs that are needed for comparison.
      4. Add a unit test verifying that the R implementation of the same model has the same results (conversion may be needed).
      5. -
    + +
    -

    Get started with C++

    +

    Get started with C++ +

    If you have no experience with C++, it is totally fine: TMB has provided us with many high-level functionalities that is very similar to R. Here we only list the most important things that you need to go through before you begin C++ programming.

    -
    1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
    2. +
        +
      1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
      2. Types. C++ is a strong type programming language and all objects need to be declared with type. Sometimes you can combine the declaration and definition. -
        1. +
            +
          1. int i = 1; This works, as we declare i as int and define it to be 1.
          2. i = 1; This fails, because i is not declared yet.
          3. @@ -269,53 +377,70 @@

            Get started with C++
          4. in R, if (TRUE) { a = '123' }; print(a) is legal.
          5. +
              +
            1. in R, if (TRUE) { a = '123' }; print(a) is legal.
            2. in C++, if (1) {string a = '123'}; std::stdout << a << std::endl; is illegal, because object a is terminated already.
            3. in C++, string a; if (1) {a = '123'}; std::stdout << a << std::endl; is legal, a is declared prior to if statement.
            4. -
            +

          +
        2. Polymorphism. Unlike in R, where function arguments have no explicitly defined types, in C++ the type of each argument of a function must be pre-specified. -
          1. +
              +
            1. Template is a special function that works with generic argument type. We could imagine a single function that could work on arguments of arbitrary type, and template functions make this possible through separation of function logic from the argument declaration. In this way we can use template functions and avoid the need to replicate the whole code for each type.
            2. -
          2. -

          With these points in mind, you are about ready to go.

          +
        +
      3. +
      +

      With these points in mind, you are about ready to go.

    -

    Get started with TMB

    +

    Get started with TMB +

    In mmrm we are not including any latent variables and so the Laplace approximation aspect of TMB is not used. We only use the automatic differentiation part of TMB. For detailed documentation of TMB, visit the TMB reference.

    One important feature of TMB are the R style matrix/array calculations. This is important because we mainly use this part to conduct our calculations. See matrix_arrays.cpp for examples.

    -

    Add a new covariance structure

    +

    Add a new covariance structure +

    To add a new covariance structure, you need to do the following:

    -
    1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
    2. +
        +
      1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
      2. Implement the covariance structure on the C++ side and the corresponding R interface.
      3. Add unit tests to make sure the new covariance structure is working as expected.
      4. Add integration tests under design/SAS/ folder to make sure SAS and R produce similar results (within tolerance).
      5. -
    + +
    -

    Add additional data

    +

    Add additional data +

    To add additional data to mmrm, please follow the next steps:

    -
    1. Make sure the data is needed.
    2. +
        +
      1. Make sure the data is needed.
      2. Document the data in R/data.R.
      3. Use save to create an rda data only containing this dataset. Here the function usethis::use_data can also be helpful.
      4. -
    + +
    -

    Communications within team

    +

    Communications within team +

    There are several communication channels, please use appropriate ones.

    -

    GitHub

    +

    GitHub +

    GitHub issues and pull requests are where implementations are discussed and reviewed. Feature requests, bugs, enhancements, technical implementations can be discussed here. When you have ideas that needs to be documented, it is better to have them in GitHub.

    -

    Slack

    +

    Slack +

    Slack is a messaging tool and we have the mmrm channel under the rinpharma space. You can put anything in the slack channel, e.g., you have completed a issue and are waiting for review, or you have some questions and don’t want to wait until the next stand-up meeting.

    To join the slack channel, please make sure you have a slack account, and send the email address to any team member.

    -

    Stand-up meetings

    +

    Stand-up meetings +

    We have stand-up meetings currently three times a week. The purpose of stand-up meetings is for team members to discuss the current work progress and raise any issue/questions for team discussion if needed.

    You don’t need to join all three meetings.

    @@ -323,22 +448,26 @@

    Stand-up meetings

    + + + + - - + + diff --git a/v0.3.4/PULL_REQUEST_TEMPLATE.html b/v0.3.4/PULL_REQUEST_TEMPLATE.html index 395c40b69..56118b5aa 100644 --- a/v0.3.4/PULL_REQUEST_TEMPLATE.html +++ b/v0.3.4/PULL_REQUEST_TEMPLATE.html @@ -1,5 +1,23 @@ - -Description • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +44,8 @@ + - + + - + @@ -111,22 +137,26 @@ - + +
    -
    + + - - + + diff --git a/v0.3.4/articles/algorithm.html b/v0.3.4/articles/algorithm.html index 17ca195eb..6d395f933 100644 --- a/v0.3.4/articles/algorithm.html +++ b/v0.3.4/articles/algorithm.html @@ -1,5 +1,4 @@ - - + @@ -83,11 +82,10 @@ Changelog +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + - + + - + @@ -109,73 +135,101 @@

    Introduction

    -
    Package Introduction
    +
    +
    Package Introduction
    -
    Mixed Models for Repeated Measures
    + +
    Mixed Models for Repeated Measures
    -
    Comparison with other software
    + +
    Comparison with other software
    -
    + +
    +

    Covariance Structures

    -
    Covariance Structures
    +
    +
    Covariance Structures
    -
    + + + + + + + + + + + + + + + + +
    -
    + + - - + + diff --git a/v0.3.4/articles/introduction.html b/v0.3.4/articles/introduction.html index e2a5eaa14..d54fcb44b 100644 --- a/v0.3.4/articles/introduction.html +++ b/v0.3.4/articles/introduction.html @@ -1,5 +1,4 @@ - - + @@ -83,11 +82,10 @@ Changelog +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + - + + - + @@ -108,7 +134,8 @@

    Authors

    -
    • +
        +
      • Daniel Sabanes Bove. Author, maintainer.

      • @@ -180,7 +207,8 @@

        Authors

        AstraZeneca plc. Copyright holder, funder.

        -
    + +

    Citation

    @@ -199,22 +227,26 @@

    Citation

    }
    + +
    -
    + + - - + + diff --git a/v0.3.4/index.html b/v0.3.4/index.html index 4cfdd330e..bd0aee01c 100644 --- a/v0.3.4/index.html +++ b/v0.3.4/index.html @@ -1,5 +1,4 @@ - - + @@ -107,11 +106,10 @@ Changelog +v0.2.2 + + - + + - + @@ -107,10 +133,13 @@
    -

    mmrm 0.3.4

    +

    mmrm 0.3.4 +

    -

    New Features

    -
    • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
    • +

      New Features +

      +
        +
      • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
      • Add empirical, empirical Jackknife and empirical bias-reduced adjusted coefficients covariance estimates, which can be specified via the new vcov argument of mmrm().
      • Add residual and between-within degrees of freedom methods.
      • Add Kenward-Roger support for spatial covariance structures.
      • @@ -121,74 +150,103 @@

        New FeaturesAdd tidy(), glance() and augment() methods to tidy the fit results into summary tables.
      • Add tidymodels framework support via a parsnip interface.
      • Add argument covariance to mmrm() to allow for easier programmatic access to specifying the model’s covariance structure and to expose covariance customization through the tidymodels interface.
      • -

    + +
    -

    Bug Fixes

    -
    • Previously mmrm() follows the global option na.action and if it is set other than "na.omit" an assertion would fail. This is now fixed and hence NA values are always removed prior to model fitting, independent of the global na.action option.
    • +

      Bug Fixes +

      +
        +
      • Previously mmrm() follows the global option na.action and if it is set other than "na.omit" an assertion would fail. This is now fixed and hence NA values are always removed prior to model fitting, independent of the global na.action option.
      • Previously a model.frame() call on an mmrm object with transformed terms, or new data, e.g. model.frame(mmrm(Y ~ log(X) + ar1(VISIT|ID), data = new_data), would fail. This is now fixed.
      • Previously mmrm() always required a data argument. Now fitting mmrm can also use environment variables instead of requiring data argument. (Note that fit_mmrm is not affected.)
      • Previously emmeans() failed when using transformed terms or not including the visit variable in the model formula. This is now fixed.
      • Previously mmrm() might provide non-finite values in the Jacobian calculations, leading to errors in the Satterthwaite degrees of freedom calculations. This will raise an error now and thus alert the user that the model fit was not successful.
      • -
    + +
    -

    Miscellaneous

    -
    • Use automatic differentiation to calculate Satterthwaite adjusted degrees of freedom, resulting in 10-fold speed-up of the Satterthwaite calculations after the initial model fit.
    • +

      Miscellaneous +

      +
        +
      • Use automatic differentiation to calculate Satterthwaite adjusted degrees of freedom, resulting in 10-fold speed-up of the Satterthwaite calculations after the initial model fit.
      • Add an interactive confirmation step if the number of visit levels is too large for non-spatial covariance structures. Use options(mmrm.max_visits = ) to specify the maximum number of visits allowed in non-interactive mode.
      • Removed free_cores() in favor of parallelly::availableCores(omit = 1).
      • The model.frame() method has been updated: The full argument is deprecated and the include argument can be used instead; by default all relevant variables are returned. Furthermore, it returns a data.frame the size of the number of observations utilized in the model for all combinations of the include argument when na.action= "na.omit".
      • -
    + +
    -

    mmrm 0.2.2

    CRAN release: 2022-12-20

    +

    mmrm 0.2.2 +

    +

    CRAN release: 2022-12-20

    -

    New Features

    -
    • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
    • +

      New Features +

      +
        +
      • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
      • Update the mmrm arguments to allow users more fine-grained control, e.g. mmrm(..., start = start, optimizer = c("BFGS", "nlminb")) to set the starting values for the variance estimates and to choose the available optimizers. These arguments will be passed to the new function mmrm_control.
      • Add new argument drop_visit_levels to allow users to keep all levels in visits, even when they are not observed in the data. Dropping unobserved levels was done silently previously, and now a message will be given. See ?mmrm_control for more details.
      • -
    + +
    -

    Bug Fixes

    -
    • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
    • +

      Bug Fixes +

      +
        +
      • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
      • Previously in mmrm calls, the weights object in the environment where the formula is defined was replaced by the weights used internally. Now this behavior is removed and your variable weights e.g. in the global environment will no longer be replaced.
      • -
    + +
    -

    Miscellaneous

    -
    • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
    • +

      Miscellaneous +

      +
        +
      • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
      • Deprecated optimizer = "automatic" in favor of not specifying the optimizer. By default, all remaining optimizers will be tried if the first optimizer fails to reach convergence.
      • -
    + +
    -

    mmrm 0.1.5

    CRAN release: 2022-10-18

    -
    • First CRAN version of the package.
    • +

      mmrm 0.1.5 +

      +

      CRAN release: 2022-10-18

      +
        +
      • First CRAN version of the package.
      • The package fits mixed models for repeated measures (MMRM) based on the marginal linear model without random effects.
      • The motivation for this package is to have a fast, reliable (in terms of convergence behavior) and feature complete implementation of MMRM in R.
      • -
      -

      New Features

      -
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • +
      +
      +

      New Features +

      +
        +
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • Fast C++ implementation of Maximum Likelihood (ML) and Restricted Maximum Likelihood (REML) estimation.
      • Currently Satterthwaite adjusted degrees of freedom calculation is supported.
      • Interface to the emmeans package for computing estimated marginal means (also called least-square means) for the coefficients.
      • Multiple optimizers are run to reach convergence in as many cases as possible.
      • Flexible formula based model specification and support for standard S3 methods such as summary, logLik, etc.
      • -
      +
    +
    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/COV_TYPES.html b/v0.3.4/reference/COV_TYPES.html index 2cd734a21..d3284bc07 100644 --- a/v0.3.4/reference/COV_TYPES.html +++ b/v0.3.4/reference/COV_TYPES.html @@ -1,5 +1,25 @@ - -Covariance Type Database — COV_TYPES • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,14 +140,17 @@
    -

    Usage

    +

    Usage +

    COV_TYPES
    -

    Format

    +

    Format +

    A data frame with 5 variables and one record per covariance type:

    -
    name
    +
    +
    name

    The long-form name of the covariance structure type

    abbr
    @@ -138,25 +169,30 @@

    Format<

    A logical value indicating whether the covariance structure is spatial.

    -

    + + + +
    -
    + + - - + + diff --git a/v0.3.4/reference/as.cov_struct.html b/v0.3.4/reference/as.cov_struct.html index 9448acc34..87d00ba7b 100644 --- a/v0.3.4/reference/as.cov_struct.html +++ b/v0.3.4/reference/as.cov_struct.html @@ -1,5 +1,25 @@ - -Coerce into a Covariance Structure Definition — as.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    as.cov_struct(x, ...)
     
     # S3 method for formula
    @@ -120,8 +149,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    an object from which to derive a covariance structure. See object specific sections for details.

    @@ -134,44 +165,66 @@

    Arguments -

    Value

    +

    Value +

    A cov_struct() object.

    -

    Details

    +

    Details +

    A covariance structure can be parsed from a model definition formula or call. Generally, covariance structures defined using non-standard evaluation take the following form:

    -

    type( (visit, )* visit | (group /)? subject )

    +

    +
    +
    type( (visit, )* visit | (group /)? subject )
    +

    +

    For example, formulas may include terms such as

    -

    us(time | subject)
    +

    +
    +
    us(time | subject)
     cp(time | group / subject)
    -sp_exp(coord1, coord2 | group / subject)

    +sp_exp(coord1, coord2 | group / subject)
    +

    +

    Note that only sp_exp (spatial) covariance structures may provide multiple coordinates, which identify the Euclidean distance between the time points.

    -

    Methods (by class)

    +

    Methods (by class) +

    -
    • as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be +

        +
      • +

        as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be covariance structure definitions and must follow the form:

        -

        y ~ xs + type( (visit, )* visit | (group /)? subject )

        +

        +
        +
        y ~ xs + type( (visit, )* visit | (group /)? subject )
        +

        +

        Any component on the right hand side of a formula is considered when -searching for a covariance definition.

      • -
    +searching for a covariance definition.

    + + +
    -

    See also

    +

    See also +

    Other covariance types: cov_struct(), covariance_types

    -

    Examples

    +

    Examples +

    # provide a covariance structure as a right-sided formula
     as.cov_struct(~ csh(visit | group / subject))
     #> <covariance structure>
    @@ -191,22 +244,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.4/reference/bcva_data.html b/v0.3.4/reference/bcva_data.html index 9bc396161..f9aa5d635 100644 --- a/v0.3.4/reference/bcva_data.html +++ b/v0.3.4/reference/bcva_data.html @@ -1,5 +1,25 @@ - -Example Data on BCVA — bcva_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,48 +140,59 @@
    -

    Usage

    +

    Usage +

    bcva_data
    -

    Format

    -

    A tibble with 10,000 rows and 7 variables:

    • USUBJID: subject ID.

    • +

      Format +

      +

      A tibble with 10,000 rows and 7 variables:

      +
        +
      • USUBJID: subject ID.

      • VISITN: visit number (numeric).

      • AVISIT: visit number (factor).

      • ARMCD: treatment, TRT or CTL.

      • RACE: 3-category race.

      • BCVA_BL: BCVA at baseline.

      • BCVA_CHG: Change in BCVA at study visits.

      • -
    + +
    -

    Source

    +

    Source +

    This is an artificial dataset.

    -

    Note

    +

    Note +

    Measurements of BCVA (best corrected visual acuity) is a measure of how how many letters a person can read off of an eye chart using corrective lenses or contacts. This a common endpoint in ophthalmology trials.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/cached_mmrm_results.html b/v0.3.4/reference/cached_mmrm_results.html index 2725fc9a3..05dd93a2d 100644 --- a/v0.3.4/reference/cached_mmrm_results.html +++ b/v0.3.4/reference/cached_mmrm_results.html @@ -1,5 +1,25 @@ - -Cache Data for mmrm Model Comparison — cached_mmrm_results • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,25 +140,32 @@
    -

    Usage

    +

    Usage +

    cached_mmrm_results
    -

    Format

    -

    A list with following elements:

    • conv_time_fev: Convergence time on FEV data.

    • +

      Format +

      +

      A list with following elements:

      +
        +
      • conv_time_fev: Convergence time on FEV data.

      • conv_time_bcva: Convergence time on BCVA data.

      • rel_diff_ests_tbl_fev: Relative difference in estimates on FEV data.

      • rel_diff_ests_tbl_bcva: Relative difference in estimates on BCVA data.

      • conv_rate: Convergence rate on data with different missing levels.

      • df_missingness: Summary of missingness on simulated data.

      • -
    + +
    -

    Source

    +

    Source +

    This is created based on simulations on FEV data and BCVA data.

    -

    Note

    +

    Note +

    The cached data for comparison is used for the vignettes generation. Please make sure that this data is refreshed before each package release by running the script data-raw/mmrm_review.R. @@ -139,22 +174,26 @@

    Note

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/check_package_version.html b/v0.3.4/reference/check_package_version.html index ef9d04950..9671db7c7 100644 --- a/v0.3.4/reference/check_package_version.html +++ b/v0.3.4/reference/check_package_version.html @@ -1,5 +1,25 @@ - -Check Suggested Dependency Against Version Requirements — check_package_version • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    check_package_version(pkg, ver = c(NA_character_, NA_character_))
    -

    Arguments

    -
    pkg
    +

    Arguments +

    +
    +
    pkg

    (string)
    package name.

    @@ -128,9 +159,11 @@

    Arguments -

    Value

    +

    Value +

    A logical (invisibly) indicating whether the loaded package meets @@ -138,22 +171,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/component.html b/v0.3.4/reference/component.html index 4d0bd0cdd..f102b9af8 100644 --- a/v0.3.4/reference/component.html +++ b/v0.3.4/reference/component.html @@ -1,5 +1,25 @@ - -Component Access for mmrm_tmb Objects — component • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    component(
       object,
       name = c("cov_type", "subject_var", "n_theta", "n_subjects", "n_timepoints", "n_obs",
    @@ -124,24 +153,31 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    name

    (character)
    the component(s) to be retrieved.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding component of the object, see details.

    -

    Details

    -

    Available component() names are as follows:

    • call: low-level function call which generated the model.

    • +

      Details +

      +

      Available component() names are as follows:

      +
    + +
    -

    See also

    +

    See also +

    In the lme4 package there is a similar function getME().

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -3079,22 +3118,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.4/reference/cov_struct.html b/v0.3.4/reference/cov_struct.html index 39e75bae5..c34348374 100644 --- a/v0.3.4/reference/cov_struct.html +++ b/v0.3.4/reference/cov_struct.html @@ -1,5 +1,25 @@ - -Define a Covariance Structure — cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    cov_struct(
       type = cov_types(),
       visits,
    @@ -123,8 +152,10 @@ 

    Usage

    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    the name of the covariance structure type to use. For available options, see cov_types(). If a type abbreviation is used that implies heterogeneity (e.g. cph) and no value is provided to @@ -150,22 +181,26 @@

    Arguments -

    Value

    +

    Value +

    A cov_struct object.

    -

    See also

    +

    See also +

    Other covariance types: as.cov_struct(), covariance_types

    -

    Examples

    +

    Examples +

    cov_struct("csh", "AVISITN", "USUBJID")
     #> <covariance structure>
     #> heterogeneous compound symmetry:
    @@ -182,22 +217,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.4/reference/cov_type_abbr.html b/v0.3.4/reference/cov_type_abbr.html index b528c182b..d352f1640 100644 --- a/v0.3.4/reference/cov_type_abbr.html +++ b/v0.3.4/reference/cov_type_abbr.html @@ -1,5 +1,25 @@ - -Retrieve Associated Abbreviated Covariance Structure Type Name — cov_type_abbr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    cov_type_abbr(type)
    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    either a full name or abbreviate covariance structure type name to collapse into an abbreviated type.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding abbreviated covariance type name.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/cov_type_name.html b/v0.3.4/reference/cov_type_name.html index 69e58b711..f95d9b258 100644 --- a/v0.3.4/reference/cov_type_name.html +++ b/v0.3.4/reference/cov_type_name.html @@ -1,5 +1,25 @@ - -Retrieve Associated Full Covariance Structure Type Name — cov_type_name • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    cov_type_name(type)
    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    either a full name or abbreviate covariance structure type name to convert to a long-form type.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding abbreviated covariance type name.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/covariance_types.html b/v0.3.4/reference/covariance_types.html index 18b722b45..adffbf393 100644 --- a/v0.3.4/reference/covariance_types.html +++ b/v0.3.4/reference/covariance_types.html @@ -1,5 +1,25 @@ - -Covariance Types — covariance_types • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    cov_types(
       form = c("name", "abbr", "habbr"),
       filter = c("heterogeneous", "spatial")
    @@ -120,8 +149,10 @@ 

    Usage

    -

    Arguments

    -
    form
    +

    Arguments +

    +
    +
    form

    (character)
    covariance structure type name form. One or more of "name", "abbr" (abbreviation), or "habbr" (heterogeneous abbreviation).

    @@ -131,67 +162,155 @@

    Arguments or "spatial".

    -

    + +
    -

    Value

    +

    Value +

    A character vector of accepted covariance structure type names and abbreviations.

    -

    Note

    +

    Note +

    The ante-dependence covariance structure in this package refers to homogeneous ante-dependence, while the ante-dependence covariance structure from SAS PROC MIXED refers to heterogeneous ante-dependence and the homogeneous version is not available in SAS.

    For all non-spatial covariance structures, the time variable must -be coded as a factor.

    -

    Spatial Covariance structures:

    +be coded as a factor.

    +
    +

    Spatial Covariance structures: +

    -
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)

    where \(d_{ij}\) denotes the Euclidean distance between time points + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)
    +

    where \(d_{ij}\) denotes the Euclidean distance between time points \(i\) and \(j\).

    -

    Abbreviations for Covariance Structures

    +

    Abbreviations for Covariance Structures +

    -

    Common Covariance Structures:

    +

    Common Covariance Structures: +

    -
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)
    +

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, respectively, out of total \(m\) time points, \(1 \leq i, j \leq m\).

    -

    See also

    +

    See also +

    Other covariance types: as.cov_struct(), cov_struct()

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/df_1d.html b/v0.3.4/reference/df_1d.html index b348dfc7a..488db263d 100644 --- a/v0.3.4/reference/df_1d.html +++ b/v0.3.4/reference/df_1d.html @@ -1,9 +1,29 @@ - - + + + + + +Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm +Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    df_1d(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -133,16 +164,19 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -168,22 +202,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.4/reference/df_md.html b/v0.3.4/reference/df_md.html index e1c1d8399..9eb6130c6 100644 --- a/v0.3.4/reference/df_md.html +++ b/v0.3.4/reference/df_md.html @@ -1,11 +1,31 @@ - - + + + + + +Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm +Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -121,13 +149,16 @@
    -

    Usage

    +

    Usage +

    df_md(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -137,16 +168,19 @@

    Arguments -

    Value

    +

    Value +

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

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -169,22 +203,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.4/reference/drop_elements.html b/v0.3.4/reference/drop_elements.html index 4a103d075..b3db92ecc 100644 --- a/v0.3.4/reference/drop_elements.html +++ b/v0.3.4/reference/drop_elements.html @@ -1,5 +1,25 @@ - -Drop Items from an Indexible — drop_elements • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    drop_elements(x, n)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    Any object that can be consumed by seq_along() and indexed by a logical vector of the same length.

    @@ -126,31 +157,37 @@

    Arguments -

    Value

    +

    Value +

    A subset of x.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/emit_tidymodels_register_msg.html b/v0.3.4/reference/emit_tidymodels_register_msg.html index 3118bb5f2..4772ab62f 100644 --- a/v0.3.4/reference/emit_tidymodels_register_msg.html +++ b/v0.3.4/reference/emit_tidymodels_register_msg.html @@ -1,5 +1,25 @@ - -Format a Message to Emit When Tidymodels is Loaded — emit_tidymodels_register_msg • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,12 +140,14 @@
    -

    Usage

    +

    Usage +

    emit_tidymodels_register_msg()
    -

    Value

    +

    Value +

    A character message to emit. Either a ansi-formatted cli output if @@ -125,22 +155,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/emmeans_support.html b/v0.3.4/reference/emmeans_support.html index 2ce50b1ce..ebcfc450c 100644 --- a/v0.3.4/reference/emmeans_support.html +++ b/v0.3.4/reference/emmeans_support.html @@ -1,11 +1,31 @@ - - + + + + + +Support for emmeans — emmeans_support • mmrm +Support for emmeans — emmeans_support • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - +
    @@ -123,7 +152,8 @@
    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -156,22 +186,26 @@ 

    Examples#> Confidence level used: 0.95

    -
    + +
    + + - - + + diff --git a/v0.3.4/reference/fev_data.html b/v0.3.4/reference/fev_data.html index 95f808af5..a39dded92 100644 --- a/v0.3.4/reference/fev_data.html +++ b/v0.3.4/reference/fev_data.html @@ -1,5 +1,25 @@ - -Example Data on FEV1 — fev_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,17 @@
    -

    Usage

    +

    Usage +

    fev_data
    -

    Format

    -

    A tibble with 800 rows and 7 variables:

    • USUBJID: subject ID.

    • +

      Format +

      +

      A tibble with 800 rows and 7 variables:

      +
        +
      • USUBJID: subject ID.

      • AVISIT: visit number.

      • ARMCD: treatment, TRT or PBO.

      • RACE: 3-category race.

      • @@ -126,35 +158,42 @@

        Format<
      • FEV1_BL: FEV1 at baseline (%).

      • FEV1: FEV1 at study visits.

      • WEIGHT: weighting variable.

      • -

    + +
    -

    Source

    +

    Source +

    This is an artificial dataset.

    -

    Note

    +

    Note +

    Measurements of FEV1 (forced expired volume in one second) is a measure of how quickly the lungs can be emptied. Low levels of FEV1 may indicate chronic obstructive pulmonary disease (COPD).

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/fill_names.html b/v0.3.4/reference/fill_names.html index 69389b5b9..aedcda1e9 100644 --- a/v0.3.4/reference/fill_names.html +++ b/v0.3.4/reference/fill_names.html @@ -1,5 +1,25 @@ - -Complete character Vector Names From Values — fill_names • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    fill_names(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character or list)
    value whose names should be completed from element values.

    -
    + +
    -

    Value

    +

    Value +

    A named vector or list.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/fit_mmrm.html b/v0.3.4/reference/fit_mmrm.html index 25ece1212..098ccbfe2 100644 --- a/v0.3.4/reference/fit_mmrm.html +++ b/v0.3.4/reference/fit_mmrm.html @@ -1,11 +1,31 @@ - - + + + + + +Low-Level Fitting Function for MMRM — fit_mmrm • mmrm +Low-Level Fitting Function for MMRM — fit_mmrm • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -121,7 +149,8 @@
    -

    Usage

    +

    Usage +

    fit_mmrm(
       formula,
       data,
    @@ -135,8 +164,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    model formula with exactly one special term specifying the visits within subjects, see details.

    @@ -175,15 +206,18 @@

    Argumentsmmrm_control().

    -

    + +
    -

    Value

    +

    Value +

    List of class mmrm_tmb, see h_mmrm_tmb_fit() for details.

    + + - - + + diff --git a/v0.3.4/reference/fit_single_optimizer.html b/v0.3.4/reference/fit_single_optimizer.html index 61273e0e4..7cb0cb127 100644 --- a/v0.3.4/reference/fit_single_optimizer.html +++ b/v0.3.4/reference/fit_single_optimizer.html @@ -1,9 +1,29 @@ - - + + + + + +Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm +Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,7 +146,8 @@
    -

    Usage

    +

    Usage +

    fit_single_optimizer(
       formula,
       data,
    @@ -133,8 +162,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -174,9 +205,11 @@

    Arguments -

    Value

    +

    Value +

    The mmrm_fit object, with additional attributes containing warnings, @@ -184,7 +217,8 @@

    Value

    mmrm_tmb
    contents.

    + +
    - - + + diff --git a/v0.3.4/reference/flat_expr.html b/v0.3.4/reference/flat_expr.html index 916ff435f..081107042 100644 --- a/v0.3.4/reference/flat_expr.html +++ b/v0.3.4/reference/flat_expr.html @@ -1,11 +1,31 @@ - - + + + + + +Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm +Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -121,61 +149,86 @@
    -

    Usage

    +

    Usage +

    flatten_call(call)
     
     flatten_expr(expr)
    -

    Arguments

    -
    call, expr
    +

    Arguments +

    +
    +
    call, expr

    (language)
    a language object to flatten.

    -
    + +
    -

    Value

    +

    Value +

    A list of atomic values, symbols, infix operator names and subexpressions.

    -

    Details

    +

    Details +

    Where 1 + 2 | 3 in R's syntax tree is (|, (+, 1, 2), 3), flattening it into its visual order produces (1, +, 2, |, 3), which makes for more fluent interpretation of non-standard grammar rules used in formulas.

    -

    Functions

    +

    Functions +

    -
    • flatten_call(): Flatten a call into a list of names and argument expressions.

      +
        +
      • +

        flatten_call(): Flatten a call into a list of names and argument expressions.

        The call name and all arguments are flattened into the same list, meaning a call of the form sp_exp(a, b, c | d / e) produces a list of the form (sp_exp, a, b, c, |, d, /, e).

        -

        flatten_call(quote(sp_exp(a, b, c | d / e)))

      • -
      • flatten_expr(): Flatten nested expressions

        -

        flatten_expr(quote(1 + 2 + 3 | 4))

      • -
    +

    +
    +
    flatten_call(quote(sp_exp(a, b, c | d / e)))
    +

    +
    + +
  • +

    flatten_expr(): Flatten nested expressions

    +

    +
    +
    flatten_expr(quote(1 + 2 + 3 | 4))
    +

    +
    +
  • + + + +
    -
    + + - - + + diff --git a/v0.3.4/reference/format.cov_struct.html b/v0.3.4/reference/format.cov_struct.html index 16016e0b9..20538fb95 100644 --- a/v0.3.4/reference/format.cov_struct.html +++ b/v0.3.4/reference/format.cov_struct.html @@ -1,5 +1,25 @@ - -Format Covariance Structure Object — format.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,45 +140,54 @@
    -

    Usage

    +

    Usage +

    # S3 method for cov_struct
     format(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    ...

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string for x.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/format_symbols.html b/v0.3.4/reference/format_symbols.html index 7346522b7..bace4e244 100644 --- a/v0.3.4/reference/format_symbols.html +++ b/v0.3.4/reference/format_symbols.html @@ -1,7 +1,27 @@ - -Format Symbol Objects — format_symbols • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,40 +143,49 @@
    -

    Usage

    +

    Usage +

    format_symbols(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character) A vector of variable names.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string of comma-separated variables.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/formula_rhs.html b/v0.3.4/reference/formula_rhs.html index 654b4197d..55f517f87 100644 --- a/v0.3.4/reference/formula_rhs.html +++ b/v0.3.4/reference/formula_rhs.html @@ -1,5 +1,25 @@ - -Extract Right-Hand-Side (rhs) from Formula — formula_rhs • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,47 +140,60 @@
    -

    Usage

    +

    Usage +

    formula_rhs(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula.

    -
    + +
    -

    Value

    +

    Value +

    A formula without a response, derived from the right-hand-side of the formula, f.

    -

    formula_rhs(a ~ b + c)
    -formula_rhs(~ b + c)

    +

    +
    +
    formula_rhs(a ~ b + c)
    +formula_rhs(~ b + c)
    +

    +
    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_add_covariance_terms.html b/v0.3.4/reference/h_add_covariance_terms.html index d32fb8bd1..555d46b16 100644 --- a/v0.3.4/reference/h_add_covariance_terms.html +++ b/v0.3.4/reference/h_add_covariance_terms.html @@ -1,5 +1,25 @@ - -Add Individual Covariance Variables As Terms to Formula — h_add_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_add_covariance_terms(f, covariance)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula to which covariance structure terms should be added.

    @@ -127,37 +158,44 @@

    Arguments -

    Value

    +

    Value +

    A new formula with included covariance terms.

    -

    Details

    +

    Details +

    stats::update() is used to append the covariance structure and the environment attribute will not be changed. This ensures the returned formula and the input formula have the same environment.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_add_terms.html b/v0.3.4/reference/h_add_terms.html index 87b9de56a..787d08fce 100644 --- a/v0.3.4/reference/h_add_terms.html +++ b/v0.3.4/reference/h_add_terms.html @@ -1,5 +1,25 @@ - -Add Formula Terms with Character — h_add_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_add_terms(f, adds, drop_response = FALSE)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula to be updated.

    @@ -129,37 +160,44 @@

    Arguments -

    Value

    +

    Value +

    A new formula with elements in drops removed.

    -

    Details

    +

    Details +

    Elements in adds will be added from the formula, while the environment of the formula is unchanged. If adds is NULL or character(0), the formula is unchanged.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_coef_table.html b/v0.3.4/reference/h_coef_table.html index f51ff91a1..4e0dca91c 100644 --- a/v0.3.4/reference/h_coef_table.html +++ b/v0.3.4/reference/h_coef_table.html @@ -1,5 +1,25 @@ - -Coefficients Table for MMRM Fit — h_coef_table • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,18 +140,23 @@
    -

    Usage

    +

    Usage +

    h_coef_table(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    model fit.

    -
    + +
    -

    Value

    +

    Value +

    Matrix with one row per coefficient and columns @@ -131,22 +164,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_confirm_large_levels.html b/v0.3.4/reference/h_confirm_large_levels.html index b58a8b2a7..71ed3e3e3 100644 --- a/v0.3.4/reference/h_confirm_large_levels.html +++ b/v0.3.4/reference/h_confirm_large_levels.html @@ -1,7 +1,27 @@ - -Ask for Confirmation on Large Visit Levels — h_confirm_large_levels • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,34 +143,42 @@
    -

    Usage

    +

    Usage +

    h_confirm_large_levels(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (numeric)
    number of visit levels.

    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_construct_model_frame_inputs.html b/v0.3.4/reference/h_construct_model_frame_inputs.html index c1a0dcdf0..04fa54f8f 100644 --- a/v0.3.4/reference/h_construct_model_frame_inputs.html +++ b/v0.3.4/reference/h_construct_model_frame_inputs.html @@ -1,13 +1,33 @@ - - + + + + + +Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm +Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -32,7 +54,8 @@ + - + + - + @@ -124,7 +152,8 @@
    -

    Usage

    +

    Usage +

    h_construct_model_frame_inputs(
       formula,
       data,
    @@ -135,8 +164,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (mmrm)
    mmrm fit object.

    @@ -152,36 +183,45 @@

    Arguments -

    Value

    +

    Value +

    -

    named list with four elements:

    • "formula": the formula including the columns requested in the include= argument.

    • +

      named list with four elements:

      +
        +
      • "formula": the formula including the columns requested in the include= argument.

      • "formula_full": the formula including all columns

      • "data": a data frame including all columns where factor and character columns have been processed with h_factor_ref().

      • "is_full": a logical scalar indicating if the formula and full formula are identical

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_default_value.html b/v0.3.4/reference/h_default_value.html index 16be115a1..1ded9195c 100644 --- a/v0.3.4/reference/h_default_value.html +++ b/v0.3.4/reference/h_default_value.html @@ -1,9 +1,29 @@ - -Default Value on NULL -Return default value when first argument is NULL. — h_default_value • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,42 +146,51 @@
    -

    Usage

    +

    Usage +

    h_default_value(x, y)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    Object.

    y

    Object.

    -
    + +
    -

    Details

    +

    Details +

    If x is NULL, returns y. Otherwise return x.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_df_1d_bw.html b/v0.3.4/reference/h_df_1d_bw.html index 5db0b67be..175d1158e 100644 --- a/v0.3.4/reference/h_df_1d_bw.html +++ b/v0.3.4/reference/h_df_1d_bw.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom for One-Dimensional Contrast — h_df_1d_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_bw(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -127,31 +158,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_df_1d_kr.html b/v0.3.4/reference/h_df_1d_kr.html index 300bd972d..6ef0c6551 100644 --- a/v0.3.4/reference/h_df_1d_kr.html +++ b/v0.3.4/reference/h_df_1d_kr.html @@ -1,7 +1,27 @@ - -Calculation of Kenward-Roger Degrees of Freedom for One-Dimensional Contrast — h_df_1d_kr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_kr(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -130,31 +161,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_df_1d_res.html b/v0.3.4/reference/h_df_1d_res.html index f8e107c31..dd1c73001 100644 --- a/v0.3.4/reference/h_df_1d_res.html +++ b/v0.3.4/reference/h_df_1d_res.html @@ -1,7 +1,27 @@ - -Calculation of Residual Degrees of Freedom for One-Dimensional Contrast — h_df_1d_res • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_res(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -130,31 +161,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_df_1d_sat.html b/v0.3.4/reference/h_df_1d_sat.html index a2d8bafe6..4c7dee53c 100644 --- a/v0.3.4/reference/h_df_1d_sat.html +++ b/v0.3.4/reference/h_df_1d_sat.html @@ -1,7 +1,27 @@ - -Calculation of Satterthwaite Degrees of Freedom for One-Dimensional Contrast — h_df_1d_sat • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_sat(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -130,31 +161,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_df_bw_calc.html b/v0.3.4/reference/h_df_bw_calc.html index 34b91b586..7ad46010e 100644 --- a/v0.3.4/reference/h_df_bw_calc.html +++ b/v0.3.4/reference/h_df_bw_calc.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom — h_df_bw_calc • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,42 +140,54 @@
    -

    Usage

    +

    Usage +

    h_df_bw_calc(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    -

    List with:

    + + + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_df_md_bw.html b/v0.3.4/reference/h_df_md_bw.html index b26130ff6..be19582a4 100644 --- a/v0.3.4/reference/h_df_md_bw.html +++ b/v0.3.4/reference/h_df_md_bw.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_bw(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_df_md_from_1d.html b/v0.3.4/reference/h_df_md_from_1d.html index 0e00c8406..b3a1741cf 100644 --- a/v0.3.4/reference/h_df_md_from_1d.html +++ b/v0.3.4/reference/h_df_md_from_1d.html @@ -1,5 +1,25 @@ - -Creating F-Statistic Results from One-Dimensional Contrast — h_df_md_from_1d • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,22 +140,27 @@
    -

    Usage

    +

    Usage +

    h_df_md_from_1d(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    model fit.

    contrast

    (numeric)
    one-dimensional contrast.

    -
    + +
    -

    Value

    +

    Value +

    The one-dimensional degrees of freedom are calculated and then @@ -135,22 +168,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_df_md_kr.html b/v0.3.4/reference/h_df_md_kr.html index 367908e26..95f94ade9 100644 --- a/v0.3.4/reference/h_df_md_kr.html +++ b/v0.3.4/reference/h_df_md_kr.html @@ -1,5 +1,25 @@ - -Calculation of Kenward-Roger Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_kr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_kr(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_df_md_res.html b/v0.3.4/reference/h_df_md_res.html index bbf5603e6..c583519cd 100644 --- a/v0.3.4/reference/h_df_md_res.html +++ b/v0.3.4/reference/h_df_md_res.html @@ -1,5 +1,25 @@ - -Calculation of Residual Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_res • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_res(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_df_md_sat.html b/v0.3.4/reference/h_df_md_sat.html index 1a6431d11..bc8b5a9d4 100644 --- a/v0.3.4/reference/h_df_md_sat.html +++ b/v0.3.4/reference/h_df_md_sat.html @@ -1,5 +1,25 @@ - -Calculation of Satterthwaite Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_sat • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_sat(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_df_min_bw.html b/v0.3.4/reference/h_df_min_bw.html index e6c39f9b0..721a2ac8d 100644 --- a/v0.3.4/reference/h_df_min_bw.html +++ b/v0.3.4/reference/h_df_min_bw.html @@ -1,5 +1,25 @@ - -Assign Minimum Degrees of Freedom Given Involved Coefficients — h_df_min_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_min_bw(bw_calc, is_coef_involved)
    -

    Arguments

    -
    bw_calc
    +

    Arguments +

    +
    +
    bw_calc

    (list)
    from h_df_bw_calc().

    @@ -126,9 +157,11 @@

    Arguments -

    Value

    +

    Value +

    The minimum of the degrees of freedom assigned to each involved @@ -136,22 +169,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_df_to_tibble.html b/v0.3.4/reference/h_df_to_tibble.html index df6e1fe28..de02b17e9 100644 --- a/v0.3.4/reference/h_df_to_tibble.html +++ b/v0.3.4/reference/h_df_to_tibble.html @@ -1,5 +1,25 @@ - -Coerce a Data Frame to a tibble — h_df_to_tibble • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -112,24 +141,30 @@
    -

    Usage

    +

    Usage +

    h_df_to_tibble(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (data.frame)
    what to coerce.

    -
    + +
    -

    Value

    +

    Value +

    The data as a tibble, potentially with a .rownames column.

    -

    Details

    +

    Details +

    This is only a thin wrapper around tibble::as_tibble(), except giving a useful error message and it checks for rownames and adds them as a new column .rownames if they are not just a numeric sequence as @@ -137,22 +172,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.4/reference/h_drop_covariance_terms.html b/v0.3.4/reference/h_drop_covariance_terms.html index d8c7e7791..003c7d2c3 100644 --- a/v0.3.4/reference/h_drop_covariance_terms.html +++ b/v0.3.4/reference/h_drop_covariance_terms.html @@ -1,5 +1,25 @@ - -Drop Formula Terms used for Covariance Structure Definition — h_drop_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,46 +140,56 @@
    -

    Usage

    +

    Usage +

    h_drop_covariance_terms(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula from which covariance terms should be dropped.

    -
    + +
    -

    Value

    +

    Value +

    The formula without accepted covariance terms.

    -

    Details

    +

    Details +

    terms is used and it will preserve the environment attribute. This ensures the returned formula and the input formula have the same environment.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_extract_covariance_terms.html b/v0.3.4/reference/h_extract_covariance_terms.html index c001a4b7c..d83743865 100644 --- a/v0.3.4/reference/h_extract_covariance_terms.html +++ b/v0.3.4/reference/h_extract_covariance_terms.html @@ -1,5 +1,25 @@ - -Extract Formula Terms used for Covariance Structure Definition — h_extract_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    h_extract_covariance_terms(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula from which covariance terms should be extracted.

    -
    + +
    -

    Value

    +

    Value +

    A list of covariance structure expressions found in f.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_factor_ref.html b/v0.3.4/reference/h_factor_ref.html index 8a2127de1..05d40020b 100644 --- a/v0.3.4/reference/h_factor_ref.html +++ b/v0.3.4/reference/h_factor_ref.html @@ -1,5 +1,25 @@ - -Convert Character to Factor Following Reference — h_factor_ref • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_factor_ref(x, ref, var_name = vname(x))
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character or factor)
    input.

    @@ -129,31 +160,37 @@

    Arguments -

    Details

    +

    Details +

    Use ref to convert x into factor with the same levels. This is needed even if x and ref are both character because in model.matrix if x only has one level there could be errors.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_get_cov_default.html b/v0.3.4/reference/h_get_cov_default.html index 268350d67..389b72e5a 100644 --- a/v0.3.4/reference/h_get_cov_default.html +++ b/v0.3.4/reference/h_get_cov_default.html @@ -1,7 +1,27 @@ - -Obtain Default Covariance Method — h_get_cov_default • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,20 +143,25 @@
    -

    Usage

    +

    Usage +

    h_get_cov_default(
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within")
     )
    -

    Arguments

    -
    method
    +

    Arguments +

    +
    +
    method

    (string)
    degrees of freedom method.

    -
    + +
    -

    Details

    +

    Details +

    The default covariance method is different for different degrees of freedom method. For "Satterthwaite" or "Between-Within", "Asymptotic" is returned. For "Kenward-Roger" only, "Kenward-Roger" is returned. @@ -136,22 +169,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.4/reference/h_get_empirical.html b/v0.3.4/reference/h_get_empirical.html index 95c218425..fd975dd64 100644 --- a/v0.3.4/reference/h_get_empirical.html +++ b/v0.3.4/reference/h_get_empirical.html @@ -1,9 +1,29 @@ - -Obtain Empirical/Jackknife/Bias-Reduced Covariance — h_get_empirical • mmrm +Obtain Empirical/Jackknife/Bias-Reduced Covariance — h_get_empirical • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    h_get_empirical(tmb_data, theta, beta, beta_vcov, type)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    @@ -144,32 +175,41 @@

    Arguments -

    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • cov: matrix empirical covariance.

    • +

      Named list with elements:

      +
        +
      • cov: matrix empirical covariance.

      • df_mat: matrix to calculate Satterthwaite degree of freedom.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_get_kr_comp.html b/v0.3.4/reference/h_get_kr_comp.html index 2f1c11c2d..a9b2d84e4 100644 --- a/v0.3.4/reference/h_get_kr_comp.html +++ b/v0.3.4/reference/h_get_kr_comp.html @@ -1,7 +1,27 @@ - -Obtain Kenward-Roger Adjustment Components — h_get_kr_comp • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,30 +143,39 @@
    -

    Usage

    +

    Usage +

    h_get_kr_comp(tmb_data, theta)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    theta

    (numeric)
    theta estimate.

    -
    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • P: matrix of \(P\) component.

    • +

      Named list with elements:

      +
        +
      • P: matrix of \(P\) component.

      • Q: matrix of \(Q\) component.

      • R: matrix of \(R\) component.

      • -
    + +
    -

    Details

    +

    Details +

    the function returns a named list, \(P\), \(Q\) and \(R\), which corresponds to the paper in 1997. The matrices are stacked in columns so that \(P\), \(Q\) and \(R\) has the same column number(number of beta parameters). The number of rows, is dependent on @@ -150,22 +187,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.4/reference/h_get_optimizers.html b/v0.3.4/reference/h_get_optimizers.html index 41e4f6fd5..5d82a7495 100644 --- a/v0.3.4/reference/h_get_optimizers.html +++ b/v0.3.4/reference/h_get_optimizers.html @@ -1,5 +1,25 @@ - -Obtain Optimizer according to Optimizer String Value — h_get_optimizers • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    h_get_optimizers(
       optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"),
       optimizer_fun = h_optimizer_fun(optimizer),
    @@ -122,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    optimizer
    +

    Arguments +

    +
    +
    optimizer

    (character)
    names of built-in optimizers to try, subset of "L-BFGS-B", "BFGS", "CG" and "nlminb".

    @@ -140,46 +171,59 @@

    Arguments -

    Value

    +

    Value +

    Named list of optimizers created by h_partial_fun_args().

    -

    Details

    -

    If you want to use only the built-in optimizers:

    • optimizer is a shortcut to create a list of built-in optimizer functions +

      Details +

      +

      If you want to use only the built-in optimizers:

      +
        +
      • optimizer is a shortcut to create a list of built-in optimizer functions passed to optimizer_fun.

      • Allowed are "L-BFGS-B", "BFGS", "CG" (using stats::optim() with corresponding method) and "nlminb" (using stats::nlminb()).

      • Other arguments should go into optimizer_args.

      • -

      If you want to use your own optimizer function:

      • Make sure that there are three arguments: parameter (start value), objective function +

      +

      If you want to use your own optimizer function:

      +
        +
      • Make sure that there are three arguments: parameter (start value), objective function and gradient function are sequentially in the function arguments.

      • If there are other named arguments in front of these, make sure they are correctly specified through optimizer_args.

      • If the hessian can be used, please make sure its argument name is hessian and please add attribute use_hessian = TRUE to the function, using attr(fun, "use_hessian) <- TRUE.

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_get_prediction.html b/v0.3.4/reference/h_get_prediction.html index fbaf809b5..9f1def4d2 100644 --- a/v0.3.4/reference/h_get_prediction.html +++ b/v0.3.4/reference/h_get_prediction.html @@ -1,5 +1,25 @@ - -Get Prediction — h_get_prediction • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_get_prediction(tmb_data, theta, beta, beta_vcov)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    object.

    @@ -133,37 +164,47 @@

    Arguments -

    Value

    +

    Value +

    -

    List with:

    • prediction: Matrix with columns fit, conf_var, and var.

    • +

      List with:

      +
        +
      • prediction: Matrix with columns fit, conf_var, and var.

      • covariance: List with subject specific covariance matrices.

      • index: List of zero-based subject indices.

      • -
    + +
    -

    Details

    +

    Details +

    See predict function in predict.cpp which is called internally.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_get_prediction_variance.html b/v0.3.4/reference/h_get_prediction_variance.html index 48fb06170..06ce496f2 100644 --- a/v0.3.4/reference/h_get_prediction_variance.html +++ b/v0.3.4/reference/h_get_prediction_variance.html @@ -1,5 +1,25 @@ - -Get Prediction Variance — h_get_prediction_variance • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_get_prediction_variance(object, nsim, tmb_data)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    @@ -129,25 +160,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.4/reference/h_get_sim_per_subj.html b/v0.3.4/reference/h_get_sim_per_subj.html index b2f504402..97f9fe38e 100644 --- a/v0.3.4/reference/h_get_sim_per_subj.html +++ b/v0.3.4/reference/h_get_sim_per_subj.html @@ -1,5 +1,25 @@ - -Get simulated values by patient. — h_get_sim_per_subj • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_get_sim_per_subj(predict_res, nsub, nsim)
    -

    Arguments

    -
    predict_res
    +

    Arguments +

    +
    +
    predict_res

    (list)
    from h_get_prediction().

    @@ -129,25 +160,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.4/reference/h_gradient.html b/v0.3.4/reference/h_gradient.html index 6bb3b9759..f98798a21 100644 --- a/v0.3.4/reference/h_gradient.html +++ b/v0.3.4/reference/h_gradient.html @@ -1,7 +1,27 @@ - -Computation of a Gradient Given Jacobian and Contrast Vector — h_gradient • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_gradient(jac_list, contrast)
    -

    Arguments

    -
    jac_list
    +

    Arguments +

    +
    +
    jac_list

    (list)
    Jacobian list produced e.g. by h_jac_list().

    @@ -130,9 +161,11 @@

    Arguments -

    Value

    +

    Value +

    Numeric vector which contains the quadratic forms of each element of @@ -140,22 +173,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_jac_list.html b/v0.3.4/reference/h_jac_list.html index b005b9175..7c6e528d8 100644 --- a/v0.3.4/reference/h_jac_list.html +++ b/v0.3.4/reference/h_jac_list.html @@ -1,5 +1,25 @@ - -Obtain List of Jacobian Matrix Entries for Covariance Matrix — h_jac_list • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_jac_list(tmb_data, theta_est, beta_vcov)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    @@ -129,9 +160,11 @@

    Arguments -

    Value

    +

    Value +

    List with one element per variance parameter containing a matrix @@ -140,22 +173,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_kr_df.html b/v0.3.4/reference/h_kr_df.html index 90d1956f6..180dad47a 100644 --- a/v0.3.4/reference/h_kr_df.html +++ b/v0.3.4/reference/h_kr_df.html @@ -1,7 +1,27 @@ - -Obtain the Adjusted Kenward-Roger degrees of freedom — h_kr_df • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_kr_df(v0, l, w, p)
    -

    Arguments

    -
    v0
    +

    Arguments +

    +
    +
    v0

    (matrix)
    unadjusted covariance matrix.

    @@ -136,32 +167,41 @@

    Argumentsh_get_kr_comp().

    -

    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • m: numeric degrees of freedom.

    • +

      Named list with elements:

      +
        +
      • m: numeric degrees of freedom.

      • lambda: numeric F statistic scale parameter.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_md_denom_df.html b/v0.3.4/reference/h_md_denom_df.html index 6a5824184..56f514d16 100644 --- a/v0.3.4/reference/h_md_denom_df.html +++ b/v0.3.4/reference/h_md_denom_df.html @@ -1,5 +1,25 @@ - -Calculating Denominator Degrees of Freedom for the Multi-Dimensional Case — h_md_denom_df • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,47 +140,57 @@
    -

    Usage

    +

    Usage +

    h_md_denom_df(t_stat_df)
    -

    Arguments

    -
    t_stat_df
    +

    Arguments +

    +
    +
    t_stat_df

    (numeric)
    n t-statistic derived degrees of freedom.

    -
    + +
    -

    Value

    +

    Value +

    Usually the calculation is returning 2 * E / (E - n) where E is the sum of t / (t - 2) over all t_stat_df values t.

    -

    Note

    +

    Note +

    If the input values are two similar to each other then just the average of them is returned. If any of the inputs is not larger than 2 then 2 is returned.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_mmrm_tmb_assert_start.html b/v0.3.4/reference/h_mmrm_tmb_assert_start.html index a9c2a8293..e3a642ec8 100644 --- a/v0.3.4/reference/h_mmrm_tmb_assert_start.html +++ b/v0.3.4/reference/h_mmrm_tmb_assert_start.html @@ -1,5 +1,25 @@ - -Asserting Sane Start Values for TMB Fit — h_mmrm_tmb_assert_start • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_assert_start(tmb_object)
    -

    Arguments

    -
    tmb_object
    +

    Arguments +

    +
    +
    tmb_object

    (list)
    created with TMB::MakeADFun().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used for assertions.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_mmrm_tmb_check_conv.html b/v0.3.4/reference/h_mmrm_tmb_check_conv.html index 1bebffd97..e213826bd 100644 --- a/v0.3.4/reference/h_mmrm_tmb_check_conv.html +++ b/v0.3.4/reference/h_mmrm_tmb_check_conv.html @@ -1,5 +1,25 @@ - -Checking the TMB Optimization Result — h_mmrm_tmb_check_conv • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,22 +140,27 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_check_conv(tmb_opt, mmrm_tmb)
    -

    Arguments

    -
    tmb_opt
    +

    Arguments +

    +
    +
    tmb_opt

    (list)
    optimization result.

    mmrm_tmb

    (mmrm_tmb)
    result from h_mmrm_tmb_fit().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used to generate warnings in case that the model @@ -135,22 +168,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_mmrm_tmb_data.html b/v0.3.4/reference/h_mmrm_tmb_data.html index 58a236404..5d6972041 100644 --- a/v0.3.4/reference/h_mmrm_tmb_data.html +++ b/v0.3.4/reference/h_mmrm_tmb_data.html @@ -1,5 +1,25 @@ - -Data for TMB Fit — h_mmrm_tmb_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_data(
       formula_parts,
       data,
    @@ -126,8 +155,10 @@ 

    Usage

    -

    Arguments

    -
    formula_parts
    +

    Arguments +

    +
    +
    formula_parts

    (mmrm_tmb_formula_parts)
    list with formula parts from h_mmrm_tmb_formula_parts().

    @@ -161,12 +192,16 @@

    Arguments -

    Value

    +

    Value +

    -

    List of class mmrm_tmb_data with elements:

    • full_frame: data.frame with n rows containing all variables needed in the model.

    • +

      List of class mmrm_tmb_data with elements:

      +
        +
      • full_frame: data.frame with n rows containing all variables needed in the model.

      • data: data.frame of input dataset.

      • x_matrix: matrix with n rows and p columns specifying the overall design matrix.

      • x_cols_aliased: logical with potentially more than p elements indicating which @@ -187,9 +222,11 @@

        Value

        reml: int specifying whether REML estimation is used (1), otherwise ML (0).

      • subject_groups: factor specifying the grouping for each subject.

      • n_groups: int with the number of total groups

      • -
    + +
    -

    Details

    +

    Details +

    Note that the subject_var must not be factor but can also be character. If it is character, then it will be converted to factor internally. Here the levels will be the unique values, sorted alphabetically and numerically if there @@ -198,22 +235,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.4/reference/h_mmrm_tmb_extract_cov.html b/v0.3.4/reference/h_mmrm_tmb_extract_cov.html index ba2400c76..faf957c61 100644 --- a/v0.3.4/reference/h_mmrm_tmb_extract_cov.html +++ b/v0.3.4/reference/h_mmrm_tmb_extract_cov.html @@ -1,7 +1,27 @@ - -Extract covariance matrix from TMB report and input data — h_mmrm_tmb_extract_cov • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_extract_cov(tmb_report, tmb_data, visit_var, is_spatial)
    -

    Arguments

    -
    tmb_report
    +

    Arguments +

    +
    +
    tmb_report

    (list)
    report created with TMB::MakeADFun() report function.

    @@ -136,9 +167,11 @@

    Arguments -

    Value

    +

    Value +

    Return a simple covariance matrix if there is no grouping, or a named @@ -147,22 +180,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_mmrm_tmb_fit.html b/v0.3.4/reference/h_mmrm_tmb_fit.html index 6693b50e8..30f14bbe0 100644 --- a/v0.3.4/reference/h_mmrm_tmb_fit.html +++ b/v0.3.4/reference/h_mmrm_tmb_fit.html @@ -1,7 +1,27 @@ - -Build TMB Fit Result List — h_mmrm_tmb_fit • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_fit(tmb_object, tmb_opt, formula_parts, tmb_data)
    -

    Arguments

    -
    tmb_object
    +

    Arguments +

    +
    +
    tmb_object

    (list)
    created with TMB::MakeADFun().

    @@ -137,12 +168,16 @@

    Argumentsh_mmrm_tmb_data().

    -

    + +
    -

    Value

    +

    Value +

    -

    List of class mmrm_tmb with:

    • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

    • +

      List of class mmrm_tmb with:

      +
        +
      • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

      • beta_est: vector of coefficient estimates.

      • beta_vcov: Variance-covariance matrix for coefficient estimates.

      • beta_vcov_inv_L: Lower triangular matrix L of the inverse variance-covariance matrix decomposition.

      • @@ -157,31 +192,37 @@

        Value

        opt_details: list with optimization details including convergence code.

      • tmb_object: original TMB object created with TMB::MakeADFun().

      • tmb_data: input.

      • -
    + +
    -

    Details

    +

    Details +

    Instead of inverting or decomposing beta_vcov, it can be more efficient to use its robust Cholesky decomposition LDL^T, therefore we return the corresponding two components L and D as well since they have been available on the C++ side already.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_mmrm_tmb_formula_parts.html b/v0.3.4/reference/h_mmrm_tmb_formula_parts.html index ed75bae05..396bc840f 100644 --- a/v0.3.4/reference/h_mmrm_tmb_formula_parts.html +++ b/v0.3.4/reference/h_mmrm_tmb_formula_parts.html @@ -1,5 +1,25 @@ - -Processing the Formula for TMB Fit — h_mmrm_tmb_formula_parts • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_formula_parts(
       formula,
       covariance = as.cov_struct(formula, warn_partial = FALSE)
    @@ -120,8 +149,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    Original formula.

    @@ -129,12 +160,16 @@

    Arguments -

    Value

    +

    Value +

    -

    List of class mmrm_tmb_formula_parts with elements:

    • formula: the original input.

    • +

      List of class mmrm_tmb_formula_parts with elements:

      +
        +
      • formula: the original input.

      • model_formula: formula with the covariance term is removed.

      • model_formula: formula with the covariance term removed.

      • full_formula: same as model_formula but includes the covariance @@ -146,25 +181,30 @@

        Value

        subject_var: string with the subject variable name.

      • group_var: string with the group variable name. If no group specified, this element is NULL.

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_mmrm_tmb_parameters.html b/v0.3.4/reference/h_mmrm_tmb_parameters.html index 12fbec7be..6d106a4f3 100644 --- a/v0.3.4/reference/h_mmrm_tmb_parameters.html +++ b/v0.3.4/reference/h_mmrm_tmb_parameters.html @@ -1,5 +1,25 @@ - -Start Parameters for TMB Fit — h_mmrm_tmb_parameters • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_parameters(formula_parts, tmb_data, start, n_groups = 1L)
    -

    Arguments

    -
    formula_parts
    +

    Arguments +

    +
    +
    formula_parts

    (mmrm_tmb_formula_parts)
    produced by h_mmrm_tmb_formula_parts().

    @@ -135,9 +166,11 @@

    Arguments -

    Value

    +

    Value +

    List with element theta containing the start values for the variance @@ -145,22 +178,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_newdata_add_pred.html b/v0.3.4/reference/h_newdata_add_pred.html index 910c7ea80..430a52e2a 100644 --- a/v0.3.4/reference/h_newdata_add_pred.html +++ b/v0.3.4/reference/h_newdata_add_pred.html @@ -1,5 +1,25 @@ - -Add Prediction Results to New Data — h_newdata_add_pred • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_newdata_add_pred(x, newdata, se_fit, interval, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fit.

    @@ -138,9 +169,11 @@

    Argumentspredict.mmrm_tmb().

    -

    + +
    -

    Value

    +

    Value +

    The newdata as a tibble with additional columns .fitted, @@ -151,22 +184,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_optimizer_fun.html b/v0.3.4/reference/h_optimizer_fun.html index e744d101d..8b812b209 100644 --- a/v0.3.4/reference/h_optimizer_fun.html +++ b/v0.3.4/reference/h_optimizer_fun.html @@ -1,5 +1,25 @@ - -Obtain Optimizer Function with Character — h_optimizer_fun • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_optimizer_fun(optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"))
    -

    Arguments

    -
    optimizer
    +

    Arguments +

    +
    +
    optimizer

    (character)
    vector of optimizers.

    -
    + +
    -

    Value

    +

    Value +

    A (list)
    of optimizer functions generated from h_partial_fun_args().

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_partial_fun_args.html b/v0.3.4/reference/h_partial_fun_args.html index 533cec141..5886e9042 100644 --- a/v0.3.4/reference/h_partial_fun_args.html +++ b/v0.3.4/reference/h_partial_fun_args.html @@ -1,5 +1,25 @@ - -Create Partial Functions — h_partial_fun_args • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_partial_fun_args(fun, ..., additional_attr = list())
    -

    Arguments

    -
    fun
    +

    Arguments +

    +
    +
    fun

    (function)
    to be wrapped.

    @@ -129,16 +160,19 @@

    Arguments -

    Value

    +

    Value +

    Object with S3 class "partial", a function with args attribute (and possibly more attributes from additional_attr).

    -

    Details

    +

    Details +

    This function add args attribute to the original function, and add an extra class partial to the function. args is the argument for the function, and elements in ... will override the existing @@ -146,22 +180,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.4/reference/h_print_aic_list.html b/v0.3.4/reference/h_print_aic_list.html index 9414cce1e..fcaf67f31 100644 --- a/v0.3.4/reference/h_print_aic_list.html +++ b/v0.3.4/reference/h_print_aic_list.html @@ -1,5 +1,25 @@ - -Printing AIC and other Model Fit Criteria — h_print_aic_list • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,38 +140,46 @@
    -

    Usage

    +

    Usage +

    h_print_aic_list(aic_list, digits = 1)
    -

    Arguments

    -
    aic_list
    +

    Arguments +

    +
    +
    aic_list

    (list)
    list as part of from summary.mmrm().

    digits

    (number)
    number of decimal places used with round().

    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_print_call.html b/v0.3.4/reference/h_print_call.html index 63868aa97..1736e3f25 100644 --- a/v0.3.4/reference/h_print_call.html +++ b/v0.3.4/reference/h_print_call.html @@ -1,5 +1,25 @@ - -Printing MMRM Function Call — h_print_call • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_print_call(call, n_obs, n_subjects, n_timepoints)
    -

    Arguments

    -
    call
    +

    Arguments +

    +
    +
    call

    (call)
    original mmrm() function call.

    @@ -133,25 +164,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.4/reference/h_print_cov.html b/v0.3.4/reference/h_print_cov.html index 451bea6b4..e65888ee7 100644 --- a/v0.3.4/reference/h_print_cov.html +++ b/v0.3.4/reference/h_print_cov.html @@ -1,5 +1,25 @@ - -Printing MMRM Covariance Type — h_print_cov • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_print_cov(cov_type, n_theta, n_groups)
    -

    Arguments

    -
    cov_type
    +

    Arguments +

    +
    +
    cov_type

    (string)
    covariance structure abbreviation.

    @@ -129,25 +160,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.4/reference/h_quad_form.html b/v0.3.4/reference/h_quad_form.html index 17a137325..5b09daef4 100644 --- a/v0.3.4/reference/h_quad_form.html +++ b/v0.3.4/reference/h_quad_form.html @@ -1,7 +1,27 @@ - -Quadratic Form Calculations — h_quad_form • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,15 +143,18 @@
    -

    Usage

    +

    Usage +

    h_quad_form_vec(vec, center)
     
     h_quad_form_mat(mat, center)
    -

    Arguments

    -
    vec
    +

    Arguments +

    +
    +
    vec

    (numeric)
    interpreted as a row vector.

    @@ -137,34 +168,42 @@

    Arguments -

    Functions

    +

    Functions +

    -
    • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) +

        +
      • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) as a numeric (not a matrix).

      • h_quad_form_mat(): calculates the quadratic form mat %*% center %*% t(mat) as a matrix, the result is square and has dimensions identical to the number of rows in mat.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_reconcile_cov_struct.html b/v0.3.4/reference/h_reconcile_cov_struct.html index 123e61038..390bab9aa 100644 --- a/v0.3.4/reference/h_reconcile_cov_struct.html +++ b/v0.3.4/reference/h_reconcile_cov_struct.html @@ -1,5 +1,25 @@ - -Reconcile Possible Covariance Structure Inputs — h_reconcile_cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_reconcile_cov_struct(formula = NULL, covariance = NULL)
    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -128,9 +159,11 @@

    Argumentsas.cov_struct(). If no value is provided, a structure is derived from the provided formula.

    -

    + +
    -

    Value

    +

    Value +

    The value covariance if it's provided or a covariance structure @@ -139,22 +172,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_record_all_output.html b/v0.3.4/reference/h_record_all_output.html index 02ddb6dd7..1548fb0ae 100644 --- a/v0.3.4/reference/h_record_all_output.html +++ b/v0.3.4/reference/h_record_all_output.html @@ -1,9 +1,29 @@ - - + + + + + +Capture all Output — h_record_all_output • mmrm +Capture all Output — h_record_all_output • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    h_record_all_output(expr, remove = list(), divergence = list())
    -

    Arguments

    -
    expr
    +

    Arguments +

    +
    +
    expr

    (expression)
    to be executed.

    @@ -139,35 +170,44 @@

    Arguments -

    Value

    +

    Value +

    -

    A list containing

    • result: The object returned by expr or list() if an error was thrown.

    • +

      A list containing

      +
        +
      • result: The object returned by expr or list() if an error was thrown.

      • warnings: NULL or a character vector if warnings were thrown.

      • errors: NULL or a string if an error was thrown.

      • messages: NULL or a character vector if messages were produced.

      • divergence: NULL or a character vector if divergence messages were caught.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_residuals_normalized.html b/v0.3.4/reference/h_residuals_normalized.html index cc85ae628..4c55f75ab 100644 --- a/v0.3.4/reference/h_residuals_normalized.html +++ b/v0.3.4/reference/h_residuals_normalized.html @@ -1,5 +1,25 @@ - -Calculate normalized residuals — h_residuals_normalized • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_normalized(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_residuals_pearson.html b/v0.3.4/reference/h_residuals_pearson.html index df0ea5e11..080def55c 100644 --- a/v0.3.4/reference/h_residuals_pearson.html +++ b/v0.3.4/reference/h_residuals_pearson.html @@ -1,5 +1,25 @@ - -Calculate Pearson Residuals — h_residuals_pearson • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_pearson(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_residuals_response.html b/v0.3.4/reference/h_residuals_response.html index 051f4ad40..b5ca7ebd0 100644 --- a/v0.3.4/reference/h_residuals_response.html +++ b/v0.3.4/reference/h_residuals_response.html @@ -1,5 +1,25 @@ - -Calculate response residuals. — h_residuals_response • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_response(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_split_control.html b/v0.3.4/reference/h_split_control.html index 8d4f32b2a..35be53adf 100644 --- a/v0.3.4/reference/h_split_control.html +++ b/v0.3.4/reference/h_split_control.html @@ -1,7 +1,27 @@ - -Split Control List — h_split_control • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,44 +143,53 @@
    -

    Usage

    +

    Usage +

    h_split_control(control, ...)
    -

    Arguments

    -
    control
    +

    Arguments +

    +
    +
    control

    (mmrm_control)
    object.

    ...

    additional parameters to update the control object.

    -
    + +
    -

    Value

    +

    Value +

    A list of mmrm_control entries.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_summarize_all_fits.html b/v0.3.4/reference/h_summarize_all_fits.html index 43a9d40ff..8ec407919 100644 --- a/v0.3.4/reference/h_summarize_all_fits.html +++ b/v0.3.4/reference/h_summarize_all_fits.html @@ -1,5 +1,25 @@ - -Summarizing List of Fits — h_summarize_all_fits • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_summarize_all_fits(all_fits)
    -

    Arguments

    -
    all_fits
    +

    Arguments +

    +
    +
    all_fits

    (list of mmrm_fit or try-error)
    list of fits.

    -
    + +
    -

    Value

    +

    Value +

    List with warnings, messages, log_liks and converged results.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_tbl_confint_terms.html b/v0.3.4/reference/h_tbl_confint_terms.html index 645795110..8bc8beede 100644 --- a/v0.3.4/reference/h_tbl_confint_terms.html +++ b/v0.3.4/reference/h_tbl_confint_terms.html @@ -1,5 +1,25 @@ - -Extract tibble with Confidence Intervals and Term Names — h_tbl_confint_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,44 +140,53 @@
    -

    Usage

    +

    Usage +

    h_tbl_confint_terms(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fit object.

    ...

    passed to stats::confint(), hence not used at the moment.

    -
    + +
    -

    Value

    +

    Value +

    A tibble with term, conf.low, conf.high columns.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_test_1d.html b/v0.3.4/reference/h_test_1d.html index aa8e7ac54..6feaa1ddf 100644 --- a/v0.3.4/reference/h_test_1d.html +++ b/v0.3.4/reference/h_test_1d.html @@ -1,7 +1,27 @@ - -Creating T-Statistic Test Results For One-Dimensional Contrast — h_test_1d • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_test_1d(object, contrast, df)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -134,31 +165,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val (2-sided p-value).

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_test_md.html b/v0.3.4/reference/h_test_md.html index 9eac2fca4..c3670490b 100644 --- a/v0.3.4/reference/h_test_md.html +++ b/v0.3.4/reference/h_test_md.html @@ -1,7 +1,27 @@ - -Creating F-Statistic Test Results For Multi-Dimensional Contrast — h_test_md • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_test_md(object, contrast, df, f_stat_factor = 1)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -136,31 +167,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_tr.html b/v0.3.4/reference/h_tr.html index e8febca2d..f55fb4740 100644 --- a/v0.3.4/reference/h_tr.html +++ b/v0.3.4/reference/h_tr.html @@ -1,5 +1,25 @@ - -Trace of a Matrix — h_tr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_tr(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (matrix)
    square matrix input.

    -
    + +
    -

    Value

    +

    Value +

    The trace of the square matrix.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_valid_formula.html b/v0.3.4/reference/h_valid_formula.html index 3b00e6953..a4926637e 100644 --- a/v0.3.4/reference/h_valid_formula.html +++ b/v0.3.4/reference/h_valid_formula.html @@ -1,5 +1,25 @@ - -Validate mmrm Formula — h_valid_formula • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,39 +140,48 @@
    -

    Usage

    +

    Usage +

    h_valid_formula(formula)
    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    to check.

    -
    + +
    -

    Details

    +

    Details +

    In mmrm models, . is not allowed as it introduces ambiguity of covariates to be used, so it is not allowed to be in formula.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_var_adj.html b/v0.3.4/reference/h_var_adj.html index 14102a78a..af0634776 100644 --- a/v0.3.4/reference/h_var_adj.html +++ b/v0.3.4/reference/h_var_adj.html @@ -1,9 +1,29 @@ - -Obtain the Adjusted Covariance Matrix — h_var_adj • mmrm +Obtain the Adjusted Covariance Matrix — h_var_adj • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    h_var_adj(v, w, p, q, r, linear = FALSE)
    -

    Arguments

    -
    v
    +

    Arguments +

    +
    +
    v

    (matrix)
    unadjusted covariance matrix.

    @@ -147,31 +178,37 @@

    Arguments -

    Value

    +

    Value +

    The matrix of adjusted covariance matrix.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_warn_na_action.html b/v0.3.4/reference/h_warn_na_action.html index 92eba15bc..a0132da94 100644 --- a/v0.3.4/reference/h_warn_na_action.html +++ b/v0.3.4/reference/h_warn_na_action.html @@ -1,5 +1,25 @@ - -Warn on na.action — h_warn_na_action • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,27 +140,32 @@
    -

    Usage

    +

    Usage +

    h_warn_na_action()
    - + +
    -
    + + - - + + diff --git a/v0.3.4/reference/h_within_or_between.html b/v0.3.4/reference/h_within_or_between.html index b8a13ba9a..1020df6af 100644 --- a/v0.3.4/reference/h_within_or_between.html +++ b/v0.3.4/reference/h_within_or_between.html @@ -1,7 +1,27 @@ - -Determine Within or Between for each Design Matrix Column — h_within_or_between • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,22 +143,27 @@
    -

    Usage

    +

    Usage +

    h_within_or_between(x_matrix, subject_ids)
    -

    Arguments

    -
    x_matrix
    +

    Arguments +

    +
    +
    x_matrix

    (matrix)
    the design matrix with column names.

    subject_ids

    (factor)
    the subject IDs.

    -
    + +
    -

    Value

    +

    Value +

    Character vector with "intercept", "within" or "between" for each @@ -138,22 +171,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/index.html b/v0.3.4/reference/index.html index 8449dd201..eac616244 100644 --- a/v0.3.4/reference/index.html +++ b/v0.3.4/reference/index.html @@ -1,5 +1,23 @@ - -Function reference • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +44,8 @@ + - + + - + @@ -106,189 +132,252 @@
    -

    Package

    +

    Package +

    -
    +
    +
    -
    +
    +
    mmrm-package _PACKAGE
    -
    mmrm Package
    -
    -

    Functions

    +
    +mmrm Package
    + +
    +
    +

    Functions +

    -
    +
    +
    -
    +
    +
    mmrm()
    Fit an MMRM
    -
    +
    +
    +
    fit_mmrm()
    Low-Level Fitting Function for MMRM
    -
    +
    +
    +
    mmrm_control()
    Control Parameters for Fitting an MMRM
    -
    +
    +
    +
    fit_single_optimizer()
    Fitting an MMRM with Single Optimizer
    -
    +
    +
    +
    refit_multiple_optimizers()
    Refitting MMRM with Multiple Optimizers
    -
    +
    +
    +
    df_1d()
    Calculation of Degrees of Freedom for One-Dimensional Contrast
    -
    +
    +
    +
    df_md()
    Calculation of Degrees of Freedom for Multi-Dimensional Contrast
    -
    +
    +
    +
    component()
    Component Access for mmrm_tmb Objects
    -
    -

    Methods

    + +
    +
    +

    Methods +

    -
    +
    +
    -

    Covariance Structures

    + +
    +
    +

    Covariance Structures +

    -
    +
    +
    -
    +
    +
    cov_struct()
    Define a Covariance Structure
    -
    +
    +
    +
    as.cov_struct()
    Coerce into a Covariance Structure Definition
    -
    +
    +
    +
    format(<cov_struct>)
    Format Covariance Structure Object
    -
    +
    +
    +
    print(<cov_struct>)
    Print a Covariance Structure Object
    -
    +
    +
    +
    cov_types()
    Covariance Types
    -
    -

    Estimate Marginal Means

    + +
    +
    +

    Estimate Marginal Means +

    -
    +
    +
    -
    +
    +
    emmeans_support
    -
    Support for emmeans
    -
    -

    Datasets

    +
    Support for emmeans +
    + +
    +
    +

    Datasets +

    -
    +
    +
    -
    +
    +
    fev_data
    Example Data on FEV1
    -
    +
    +
    +
    bcva_data
    Example Data on BCVA
    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.4/reference/is_infix.html b/v0.3.4/reference/is_infix.html index 01262463f..228ffb8b7 100644 --- a/v0.3.4/reference/is_infix.html +++ b/v0.3.4/reference/is_infix.html @@ -1,5 +1,25 @@ - -Test Whether a Symbol is an Infix Operator — is_infix • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,49 +140,62 @@
    -

    Usage

    +

    Usage +

    is_infix(name)
    -

    Arguments

    -
    name
    +

    Arguments +

    +
    +
    name

    (symbol or name or string)
    a possible reference to an infix operator to check.

    -
    + +
    -

    Value

    +

    Value +

    A logical indicating whether the name is the name of an infix operator.

    -

    is_infix(as.name("|"))
    +

    +
    +
    is_infix(as.name("|"))
     is_infix("|")
    -is_infix("c")

    +is_infix("c")
    +

    +
    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/mmrm-package.html b/v0.3.4/reference/mmrm-package.html index c4490aaa5..b5c62c9d5 100644 --- a/v0.3.4/reference/mmrm-package.html +++ b/v0.3.4/reference/mmrm-package.html @@ -1,5 +1,25 @@ - -mmrm Package — mmrm-package • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -113,15 +142,23 @@
    -

    See also

    -
    -

    Author

    +

    Author +

    Maintainer: Daniel Sabanes Bove daniel.sabanes_bove@roche.com

    -

    Authors:

    + +
    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/mmrm.html b/v0.3.4/reference/mmrm.html index 2523a5679..eca30a09c 100644 --- a/v0.3.4/reference/mmrm.html +++ b/v0.3.4/reference/mmrm.html @@ -1,7 +1,27 @@ - -Fit an MMRM — mmrm • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,7 +143,8 @@
    -

    Usage

    +

    Usage +

    mmrm(
       formula,
       data,
    @@ -128,8 +157,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -162,15 +193,18 @@

    Argumentsmmrm_control().

    -

    + +
    -

    Value

    +

    Value +

    An mmrm object.

    -

    Details

    +

    Details +

    The formula typically looks like: FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID) so specifies response and covariates as usual, and exactly one special term @@ -196,15 +230,19 @@

    Detailsmmrm.

    -

    Note

    +

    Note +

    The mmrm object is also an mmrm_fit and an mmrm_tmb object, therefore corresponding methods also work (see mmrm_tmb_methods).

    -

    Additional contents depend on the choice of the adjustment method:

    • If Satterthwaite adjustment is used, the Jacobian information jac_list +

      Additional contents depend on the choice of the adjustment method:

      +
        +
      • If Satterthwaite adjustment is used, the Jacobian information jac_list is included.

      • If Kenward-Roger adjustment is used, kr_comp contains necessary components and beta_vcov_adj includes the adjusted coefficients covariance matrix.

      • -

      Use of the package emmeans is supported, see emmeans_support.

      +
    +

    Use of the package emmeans is supported, see emmeans_support.

    NA values are always omitted regardless of na.action setting.

    When the number of visit levels is large, it usually requires large memory to create the covariance matrix. By default, the maximum allowed visit levels is 100, and if there are more @@ -215,7 +253,8 @@

    Note

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -239,22 +278,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.4/reference/mmrm_control.html b/v0.3.4/reference/mmrm_control.html index 330a0cd47..94792b69f 100644 --- a/v0.3.4/reference/mmrm_control.html +++ b/v0.3.4/reference/mmrm_control.html @@ -1,9 +1,29 @@ - - + + + + + +Control Parameters for Fitting an MMRM — mmrm_control • mmrm +Control Parameters for Fitting an MMRM — mmrm_control • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,7 +146,8 @@
    -

    Usage

    +

    Usage +

    mmrm_control(
       n_cores = 1L,
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within"),
    @@ -132,8 +161,10 @@ 

    Usage

    -

    Arguments

    -
    n_cores
    +

    Arguments +

    +
    +
    n_cores

    (count)
    number of cores to be used.

    @@ -167,15 +198,18 @@

    Argumentsh_get_optimizers().

    -

    + +
    -

    Value

    +

    Value +

    List of class mmrm_control with the control parameters.

    + +
    -

    Examples

    +

    Examples +

    mmrm_control(
       optimizer_fun = stats::optim,
       optimizer_args = list(method = "L-BFGS-B")
    @@ -308,22 +346,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.4/reference/mmrm_methods.html b/v0.3.4/reference/mmrm_methods.html index 06d1110d3..5845ab015 100644 --- a/v0.3.4/reference/mmrm_methods.html +++ b/v0.3.4/reference/mmrm_methods.html @@ -1,5 +1,25 @@ - -Methods for mmrm Objects — mmrm_methods • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm
     summary(object, ...)
     
    @@ -126,48 +155,65 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the fitted MMRM including Jacobian and call etc.

    ...

    not used.

    -
    + +
    -

    Value

    +

    Value +

    Depends on the method, see Details and Functions.

    -

    Details

    -

    While printing the summary of (mmrm)
    object, the following will be displayed:

    1. Formula. The formula used in the model.

    2. +

      Details +

      +

      While printing the summary of (mmrm)
      object, the following will be displayed:

      +
        +
      1. Formula. The formula used in the model.

      2. Data. The data used for analysis, including number of subjects, number of valid observations.

      3. Covariance. The covariance structure and number of variance parameters.

      4. Method. Restricted maximum likelihood(REML) or maximum likelihood(ML).

      5. Model selection criteria. AIC, BIC, log likelihood and deviance.

      6. Coefficients. Coefficients of the covariates.

      7. -
      8. Covariance estimate. The covariance estimate(for each group).

        1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available +

        2. +

          Covariance estimate. The covariance estimate(for each group).

          +
            +
          1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available in data will be displayed.

          2. If the covariance structure is spatial, the covariance matrix of two time points with unit distance will be displayed.

          3. -
        3. -
    + + + +
    -

    Functions

    +

    Functions +

    -
    • summary(mmrm): summarizes the MMRM fit results.

    • +
        +
      • summary(mmrm): summarizes the MMRM fit results.

      • print(summary.mmrm): prints the MMRM fit summary.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_tmb_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- mmrm(formula, fev_data)
     # Summary:
    @@ -224,22 +270,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.4/reference/mmrm_tidiers.html b/v0.3.4/reference/mmrm_tidiers.html index c43567911..f154e96e0 100644 --- a/v0.3.4/reference/mmrm_tidiers.html +++ b/v0.3.4/reference/mmrm_tidiers.html @@ -1,9 +1,29 @@ - - + + + + + +Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm +Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,7 +146,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm
     tidy(x, conf.int = FALSE, conf.level = 0.95, ...)
     
    @@ -137,8 +166,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fitted model.

    @@ -170,21 +201,27 @@

    Argumentsresiduals.mmrm_tmb().

    -

    + +
    -

    Functions

    +

    Functions +

    -
    • tidy(mmrm): derives tidy tibble from an mmrm object.

    • +
        +
      • tidy(mmrm): derives tidy tibble from an mmrm object.

      • glance(mmrm): derives glance tibble from an mmrm object.

      • augment(mmrm): derives augment tibble from an mmrm object.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tmb_methods for additional methods.

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -276,22 +313,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.4/reference/mmrm_tmb_methods.html b/v0.3.4/reference/mmrm_tmb_methods.html index 12ade7c7c..5de1ad204 100644 --- a/v0.3.4/reference/mmrm_tmb_methods.html +++ b/v0.3.4/reference/mmrm_tmb_methods.html @@ -1,5 +1,25 @@ - -Methods for mmrm_tmb Objects — mmrm_tmb_methods • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm_tmb
     coef(object, complete = TRUE, ...)
     
    @@ -185,8 +214,10 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM object.

    @@ -272,15 +303,18 @@

    Arguments -

    + +
    -

    Value

    +

    Value +

    Depends on the method, see Functions.

    -

    Details

    +

    Details +

    include argument controls the variables the returned model frame will include. Possible options are "response_var", "subject_var", "visit_var" and "group_var", representing the response variable, subject variable, visit variable or group variable. @@ -288,9 +322,11 @@

    Detailsmodel.matrix.

    -

    Functions

    +

    Functions +

    -
    • coef(mmrm_tmb): obtains the estimated coefficients.

    • +
        +
      • coef(mmrm_tmb): obtains the estimated coefficients.

      • fitted(mmrm_tmb): obtains the fitted values.

      • predict(mmrm_tmb): predict conditional means for new data; optionally with standard errors and confidence or prediction intervals. @@ -324,11 +360,14 @@

        Functions -

        References

        +

        References +

        -
        • Hurvich CM, Tsai C (1989). +

          • Gałecki A, Burzykowski T (2013). +

          +
            +
          • Gałecki A, Burzykowski T (2013). “Linear mixed-effects model.” In Linear mixed-effects models using R, 245--273. Springer.

          • -
    + +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- fit_mmrm(formula, fev_data, weights = rep(1, nrow(fev_data)))
     # Estimated coefficients:
    @@ -3863,22 +3907,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.4/reference/parsnip_add_mmrm.html b/v0.3.4/reference/parsnip_add_mmrm.html index d8f048900..42bc7bb61 100644 --- a/v0.3.4/reference/parsnip_add_mmrm.html +++ b/v0.3.4/reference/parsnip_add_mmrm.html @@ -1,5 +1,25 @@ - -Register mmrm For Use With tidymodels — parsnip_add_mmrm • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -112,45 +141,55 @@
    -

    Usage

    +

    Usage +

    parsnip_add_mmrm(quietly = FALSE)
    -

    Arguments

    -
    quietly
    +

    Arguments +

    +
    +
    quietly

    logical: should progress and error messages be suppressed?

    -
    + +
    -

    Value

    +

    Value +

    A logical value indicating whether registration was successful.

    -

    Details

    +

    Details +

    We can use parsnip::show_model_info("linear_reg") to check the registration with parsnip and thus the wider tidymodels ecosystem.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/position_symbol.html b/v0.3.4/reference/position_symbol.html index 082e95d38..8328cdefc 100644 --- a/v0.3.4/reference/position_symbol.html +++ b/v0.3.4/reference/position_symbol.html @@ -1,9 +1,29 @@ - - + + + + + +Search For the Position of a Symbol — position_symbol • mmrm +Search For the Position of a Symbol — position_symbol • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    position_symbol(x, sym, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (list of language)
    a list of language objects in which to search for a specific symbol.

    @@ -137,9 +168,11 @@

    ArgumentsPosition().

    -

    + +
    -

    Value

    +

    Value +

    The position of the symbol if found, or the nomatch value @@ -147,22 +180,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/print.cov_struct.html b/v0.3.4/reference/print.cov_struct.html index 19fb9f301..7c0b25142 100644 --- a/v0.3.4/reference/print.cov_struct.html +++ b/v0.3.4/reference/print.cov_struct.html @@ -1,5 +1,25 @@ - -Print a Covariance Structure Object — print.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,45 +140,54 @@
    -

    Usage

    +

    Usage +

    # S3 method for cov_struct
     print(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    ...

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    x invisibly.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/reexports.html b/v0.3.4/reference/reexports.html index 458628b46..a7fb3c0e1 100644 --- a/v0.3.4/reference/reexports.html +++ b/v0.3.4/reference/reexports.html @@ -1,19 +1,39 @@ - - + + + + + +Objects exported from other packages — reexports • mmrm +Objects exported from other packages — reexports • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -38,7 +60,8 @@ + - + + - + @@ -124,30 +152,36 @@

    These objects are imported from other packages. Follow the links below to see their documentation.

    -
    generics
    +
    +
    generics

    augment, glance, tidy

    -
    + + - + +
    -
    + + - - + + diff --git a/v0.3.4/reference/refit_multiple_optimizers.html b/v0.3.4/reference/refit_multiple_optimizers.html index f0065952a..d783c1450 100644 --- a/v0.3.4/reference/refit_multiple_optimizers.html +++ b/v0.3.4/reference/refit_multiple_optimizers.html @@ -1,5 +1,25 @@ - -Refitting MMRM with Multiple Optimizers — refit_multiple_optimizers • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    refit_multiple_optimizers(fit, ..., control = mmrm_control(...))
    -

    Arguments

    -
    fit
    +

    Arguments +

    +
    +
    fit

    (mmrm_fit)
    original model fit from fit_single_optimizer().

    @@ -129,20 +160,24 @@

    Arguments -

    Value

    +

    Value +

    The best (in terms of log likelihood) fit which converged.

    -

    Note

    +

    Note +

    For Windows, no parallel computations are currently implemented.

    -

    Examples

    +

    Examples +

    fit <- fit_single_optimizer(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data,
    @@ -153,22 +188,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.4/reference/register_on_load.html b/v0.3.4/reference/register_on_load.html index a8e8f3dab..84cdd2e6d 100644 --- a/v0.3.4/reference/register_on_load.html +++ b/v0.3.4/reference/register_on_load.html @@ -1,5 +1,25 @@ - -Helper Function for Registering Functionality With Suggests Packages — register_on_load • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    register_on_load(
       pkg,
       ver = c(NA_character_, NA_character_),
    @@ -122,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    pkg
    +

    Arguments +

    +
    +
    pkg

    (string)
    package name.

    @@ -144,9 +175,11 @@

    Arguments -

    Value

    +

    Value +

    A logical (invisibly) indicating whether registration was successful. @@ -154,22 +187,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/tmb_cov_type.html b/v0.3.4/reference/tmb_cov_type.html index 19304afa1..e86073466 100644 --- a/v0.3.4/reference/tmb_cov_type.html +++ b/v0.3.4/reference/tmb_cov_type.html @@ -1,5 +1,25 @@ - -Produce A Covariance Identifier Passing to TMB — tmb_cov_type • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    tmb_cov_type(cov)
    -

    Arguments

    -
    cov
    +

    Arguments +

    +
    +
    cov

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    A string used for method dispatch when passed to TMB.

    + +
    -
    + + - - + + diff --git a/v0.3.4/reference/validate_cov_struct.html b/v0.3.4/reference/validate_cov_struct.html index 52974adbf..bab898a91 100644 --- a/v0.3.4/reference/validate_cov_struct.html +++ b/v0.3.4/reference/validate_cov_struct.html @@ -1,5 +1,25 @@ - -Validate Covariance Structure Data — validate_cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    validate_cov_struct(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    x if successful, or an error is thrown otherwise.

    + +
    -
    + + - - + + diff --git a/v0.3.5/404.html b/v0.3.5/404.html index 7d11c9f0c..1d6451e0c 100644 --- a/v0.3.5/404.html +++ b/v0.3.5/404.html @@ -1,5 +1,4 @@ - - + @@ -81,11 +80,10 @@ Changelog +v0.2.2 + + - + + - + @@ -110,46 +136,66 @@

    Thank you for your interest in contributing to this repo! Your contribution is highly valued. Please go through this document for guidance on how to contribute.

    -

    Programming conventions

    +

    Programming conventions +

    Please follow the programming conventions to ensure a consistent programming style across the package.

    Generally we follow the tidyverse style guide. Some specific conventions that deviate from this are explained below.

    -

    Functions

    -
    1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
    2. +

      Functions +

      +
        +
      1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
      2. Functions starting with h_ are helper functions and they should not be exported.
      3. Functions should be well documented using roxygen2 (even when they are not exported).
      4. Functions must be unit tested (even when they are not exported).
      5. -
    + +
    -

    Imports

    +

    Imports +

    In package mmrm, we follow the following convention in package imports.

    -
    1. When only a few functions from another package are needed: -
      1. In DESCRIPTION, add that package into Imports.
      2. +
          +
        1. When only a few functions from another package are needed: +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we add a importFrom with a single function from the package. -
            1. The function imported can be any random function within the package.
            2. -
          3. +
              +
            1. The function imported can be any random function within the package.
            2. +
            +
          4. Always use package::function style wherever you need to use the function.
          5. Example: stats.
          6. -
        2. +
        +
      3. When many functions from another package are needed: -
        1. In DESCRIPTION, add that package into Imports.
        2. +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we use a import to import every function.
          3. Use the functions directly without prefix.
          4. Example: checkmate.
          5. -
          -
    + + + +
    -

    Comments

    -
    • Comments should always follow sentence style.
    • +

      Comments +

      +
        +
      • Comments should always follow sentence style.
      • Comments should be as minimal as possible: Generally the code and variable names should be clear enough to not need any comments. Only use them when needed and explain the “Why” and not the “What”.
      • -
    + +
    -

    Documentation

    -
    • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

    • +

      Documentation +

      +
        +
      • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

      • Exported objects must have a lifecycle badge to clarify the maturity.

        -
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • -
      • +
          +
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • +
        +
      • Use Title Style for the title of the documentation.

      • Always include a @description part with at least one sentence describing the object.

      • @@ -161,38 +207,55 @@

        Documentationwebsite.

      • In vignettes, you cannot directly reference help pages but only pkgdown web pages. Note that this includes only exported objects. To make it look similar to the help page references, please here also use function() style.

      • mmrm_review_methods.Rmd is a large vignette and we precompute this vignette to make the GitHub actions faster. Run the script vignettes/precompile.R to regenerate the precomputed vignette and subsequently update it in GitHub. Before every release we need to run this again. Please note you need to install the package and then compile the vignette because efficiency is better after installation to provide a fair comparison.

      • -
    + +
    -

    Github conventions

    +

    Github conventions +

    When using GitHub to collaborate, the following conventions are needed:

    -
    1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. -
      • If you are going to work on this issue, please assign yourself.
      • -
    2. +
        +
      1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. +
          +
        • If you are going to work on this issue, please assign yourself.
        • +
        +
      2. Please create a branch in the mmrm repository, instead of creating forks, unless you are not yet a team member. -
        • Branches should be associated with a GitHub issue and linked to an issue id.
        • +
            +
          • Branches should be associated with a GitHub issue and linked to an issue id.
          • The name of a branch should be of the form: <issue_id>_<short_discription>.
          • -
          +
        +
      3. Add changes to the branch and push it to GitHub. -
        • Please use clear commit messages.
        • +
            +
          • Please use clear commit messages.
          • Please keep your changes focused on the issue. If there are independent changes, please separate it into another PR linking to another issue.
          • -
          +
        +
      4. Please create a Pull Request when you think your code changes are ready: -
        • Functions are well documented.
        • +
            +
          • Functions are well documented.
          • Functions have corresponding unit tests.
          • Changes pass all the GitHub action checks.
          • The checklist in the corresponding issue is completed.
          • -
          +
        +
      5. Address all the comments you receive. -
        • at least one approval is needed to merge.
        • -
      6. -
    +
      +
    • at least one approval is needed to merge.
    • +
    + + +
    -

    Contribution tips

    +

    Contribution tips +

    -

    Development environment Set-up

    +

    Development environment Set-up +

    The development this mmrm package is based on the latest R version and C++ compilers. The package dependencies are the most recent versions from CRAN. We recommend that your working environment is set up in the same way. Additionally, there are some tools we recommend you to install:

    -
    1. +
        +
      1. RTools if you work on a Windows operating system. Alternatively you can use docker to separate the operating system and the development system.
      2. GitKraken is a very useful user interface for git including visualization of git commit graphs, file history, etc.
      3. @@ -200,43 +263,82 @@

        Development environment Set-uplintr will allow you to perform static code analysis.
      4. pre-commit is a Python module that allows you to identify issues before you commit locally.
      5. -

    + +
    -

    Issue labels

    +

    Issue labels +

    The issues are categorized with several labels:

    - +
    Label name
    ++++ + + - + + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + -
    Label name Description
    SPx
    SPx SP (story points) indicate complexity, and the larger the subsequent number, the more time consuming the issue is expected to be
    priority
    priority Issues with this label should be completed with higher priority
    good first issue
    good first issue Good choices for new team members
    blocked
    blocked Blocked by other issues
    bug
    bug Something isn’t working
    devops
    devops Development and Operation
    discussion
    discussion Discussion needed
    documentation
    documentation Improvement of documentation is needed
    duplicate
    duplicate The issue already exists
    enhancement
    enhancement New feature or request
    help wanted
    help wanted Extra attention is needed
    invalid
    invalid This doesn’t seem right
    question
    question Further information needed

    Please choose an issue based on your interest, issue complexity, and priority.

    + + + +

    Please choose an issue based on your interest, issue complexity, and priority.

    -

    Add new unit tests

    +

    Add new unit tests +

    To add a new unit test, you need to first identify the test scope. Does the test fit in the scope of existing tests? If so, please modify the existing test files under tests/testthat/ folder or src/ folder, depending on whether the code to be tested is R or C++. Otherwise please create a new test file, with a name prefix of “test-”.

    In each test case, use the following structure:

    @@ -249,19 +351,25 @@ 

    Add new unit tests -

    Add integration tests

    +

    Add integration tests +

    Integration tests compare the results of SAS and R and assures the quality of our code. To add an integration test, you need to do the following:

    -
    1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
    2. +
        +
      1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
      2. Save the results in .txt format in the design/SAS/ folder.
      3. Decide the key outputs that are needed for comparison.
      4. Add a unit test verifying that the R implementation of the same model has the same results (conversion may be needed).
      5. -
    + +
    -

    Get started with C++

    +

    Get started with C++ +

    If you have no experience with C++, it is totally fine: TMB has provided us with many high-level functionalities that is very similar to R. Here we only list the most important things that you need to go through before you begin C++ programming.

    -
    1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
    2. +
        +
      1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
      2. Types. C++ is a strong type programming language and all objects need to be declared with type. Sometimes you can combine the declaration and definition. -
        1. +
            +
          1. int i = 1; This works, as we declare i as int and define it to be 1.
          2. i = 1; This fails, because i is not declared yet.
          3. @@ -269,53 +377,70 @@

            Get started with C++
          4. in R, if (TRUE) { a = '123' }; print(a) is legal.
          5. +
              +
            1. in R, if (TRUE) { a = '123' }; print(a) is legal.
            2. in C++, if (1) {string a = '123'}; std::stdout << a << std::endl; is illegal, because object a is terminated already.
            3. in C++, string a; if (1) {a = '123'}; std::stdout << a << std::endl; is legal, a is declared prior to if statement.
            4. -
            +

          +
        2. Polymorphism. Unlike in R, where function arguments have no explicitly defined types, in C++ the type of each argument of a function must be pre-specified. -
          1. +
              +
            1. Template is a special function that works with generic argument type. We could imagine a single function that could work on arguments of arbitrary type, and template functions make this possible through separation of function logic from the argument declaration. In this way we can use template functions and avoid the need to replicate the whole code for each type.
            2. -
          2. -

          With these points in mind, you are about ready to go.

          +
        +
      3. +
      +

      With these points in mind, you are about ready to go.

    -

    Get started with TMB

    +

    Get started with TMB +

    In mmrm we are not including any latent variables and so the Laplace approximation aspect of TMB is not used. We only use the automatic differentiation part of TMB. For detailed documentation of TMB, visit the TMB reference.

    One important feature of TMB are the R style matrix/array calculations. This is important because we mainly use this part to conduct our calculations. See matrix_arrays.cpp for examples.

    -

    Add a new covariance structure

    +

    Add a new covariance structure +

    To add a new covariance structure, you need to do the following:

    -
    1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
    2. +
        +
      1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
      2. Implement the covariance structure on the C++ side and the corresponding R interface.
      3. Add unit tests to make sure the new covariance structure is working as expected.
      4. Add integration tests under design/SAS/ folder to make sure SAS and R produce similar results (within tolerance).
      5. -
    + +
    -

    Add additional data

    +

    Add additional data +

    To add additional data to mmrm, please follow the next steps:

    -
    1. Make sure the data is needed.
    2. +
        +
      1. Make sure the data is needed.
      2. Document the data in R/data.R.
      3. Use save to create an rda data only containing this dataset. Here the function usethis::use_data can also be helpful.
      4. -
    + +
    -

    Communications within team

    +

    Communications within team +

    There are several communication channels, please use appropriate ones.

    -

    GitHub

    +

    GitHub +

    GitHub issues and pull requests are where implementations are discussed and reviewed. Feature requests, bugs, enhancements, technical implementations can be discussed here. When you have ideas that needs to be documented, it is better to have them in GitHub.

    -

    Slack

    +

    Slack +

    Slack is a messaging tool and we have the mmrm channel under the rinpharma space. You can put anything in the slack channel, e.g., you have completed a issue and are waiting for review, or you have some questions and don’t want to wait until the next stand-up meeting.

    To join the slack channel, please make sure you have a slack account, and send the email address to any team member.

    -

    Stand-up meetings

    +

    Stand-up meetings +

    We have stand-up meetings currently three times a week. The purpose of stand-up meetings is for team members to discuss the current work progress and raise any issue/questions for team discussion if needed.

    You don’t need to join all three meetings.

    @@ -323,22 +448,26 @@

    Stand-up meetings

    + + + + - - + + diff --git a/v0.3.5/PULL_REQUEST_TEMPLATE.html b/v0.3.5/PULL_REQUEST_TEMPLATE.html index 544b67f4a..2e2afcc7d 100644 --- a/v0.3.5/PULL_REQUEST_TEMPLATE.html +++ b/v0.3.5/PULL_REQUEST_TEMPLATE.html @@ -1,5 +1,23 @@ - -Description • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +44,8 @@ + - + + - + @@ -111,22 +137,26 @@ - + +
    -
    + + - - + + diff --git a/v0.3.5/articles/algorithm.html b/v0.3.5/articles/algorithm.html index aea7abbc4..a4d41ed46 100644 --- a/v0.3.5/articles/algorithm.html +++ b/v0.3.5/articles/algorithm.html @@ -1,5 +1,4 @@ - - + @@ -83,11 +82,10 @@ Changelog +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + - + + - + @@ -109,73 +135,101 @@

    Introduction

    -
    Package Introduction
    +
    +
    Package Introduction
    -
    Mixed Models for Repeated Measures
    + +
    Mixed Models for Repeated Measures
    -
    Comparison with other software
    + +
    Comparison with other software
    -
    + +
    +

    Covariance Structures

    -
    Covariance Structures
    +
    +
    Covariance Structures
    -
    + + + + + + + + + + + + + + + + +
    -
    + + - - + + diff --git a/v0.3.5/articles/introduction.html b/v0.3.5/articles/introduction.html index 75aa8cdcb..bd02c2489 100644 --- a/v0.3.5/articles/introduction.html +++ b/v0.3.5/articles/introduction.html @@ -1,5 +1,4 @@ - - + @@ -83,11 +82,10 @@ Changelog +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + - + + - + @@ -108,7 +134,8 @@

    Authors

    -
    • +
        +
      • Daniel Sabanes Bove. Author, maintainer.

      • @@ -180,7 +207,8 @@

        Authors

        AstraZeneca plc. Copyright holder, funder.

        -
    + +

    Citation

    @@ -199,22 +227,26 @@

    Citation

    }
    + +
    -
    + + - - + + diff --git a/v0.3.5/index.html b/v0.3.5/index.html index 1fc9c76b7..fcc1fb470 100644 --- a/v0.3.5/index.html +++ b/v0.3.5/index.html @@ -1,5 +1,4 @@ - - + @@ -107,11 +106,10 @@ Changelog +v0.2.2 + + - + + - + @@ -107,10 +133,13 @@
    -

    mmrm 0.3.5

    +

    mmrm 0.3.5 +

    -

    New Features

    -
    • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
    • +

      New Features +

      +
        +
      • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
      • Add empirical, empirical Jackknife and empirical bias-reduced adjusted coefficients covariance estimates, which can be specified via the new vcov argument of mmrm().
      • Add residual and between-within degrees of freedom methods.
      • Add Kenward-Roger support for spatial covariance structures.
      • @@ -121,76 +150,105 @@

        New FeaturesAdd tidy(), glance() and augment() methods to tidy the fit results into summary tables.
      • Add tidymodels framework support via a parsnip interface.
      • Add argument covariance to mmrm() to allow for easier programmatic access to specifying the model’s covariance structure and to expose covariance customization through the tidymodels interface.
      • -

    + +
    -

    Bug Fixes

    -
    • Previously mmrm() follows the global option na.action and if it is set other than "na.omit" an assertion would fail. This is now fixed and hence NA values are always removed prior to model fitting, independent of the global na.action option.
    • +

      Bug Fixes +

      +
        +
      • Previously mmrm() follows the global option na.action and if it is set other than "na.omit" an assertion would fail. This is now fixed and hence NA values are always removed prior to model fitting, independent of the global na.action option.
      • Previously a model.frame() call on an mmrm object with transformed terms, or new data, e.g. model.frame(mmrm(Y ~ log(X) + ar1(VISIT|ID), data = new_data), would fail. This is now fixed.
      • Previously mmrm() always required a data argument. Now fitting mmrm can also use environment variables instead of requiring data argument. (Note that fit_mmrm is not affected.)
      • Previously emmeans() failed when using transformed terms or not including the visit variable in the model formula. This is now fixed.
      • Previously mmrm() might provide non-finite values in the Jacobian calculations, leading to errors in the Satterthwaite degrees of freedom calculations. This will raise an error now and thus alert the user that the model fit was not successful.
      • -
    + +
    -

    Miscellaneous

    -
    • Use automatic differentiation to calculate Satterthwaite adjusted degrees of freedom, resulting in 10-fold speed-up of the Satterthwaite calculations after the initial model fit.
    • +

      Miscellaneous +

      +
        +
      • Use automatic differentiation to calculate Satterthwaite adjusted degrees of freedom, resulting in 10-fold speed-up of the Satterthwaite calculations after the initial model fit.
      • Add an interactive confirmation step if the number of visit levels is too large for non-spatial covariance structures. Use options(mmrm.max_visits = ) to specify the maximum number of visits allowed in non-interactive mode.
      • Removed free_cores() in favor of parallelly::availableCores(omit = 1).
      • The model.frame() method has been updated: The full argument is deprecated and the include argument can be used instead; by default all relevant variables are returned. Furthermore, it returns a data.frame the size of the number of observations utilized in the model for all combinations of the include argument when na.action= "na.omit".
      • Overall, seven vignettes have been added to the package. All vignettes have a slightly different look now to reduce the size of the overall R package on CRAN.
      • The used optimizer is now available via component(., "optimizer") instead of previously attr(., "optimizer").
      • -
    + +
    -

    mmrm 0.2.2

    CRAN release: 2022-12-20

    +

    mmrm 0.2.2 +

    +

    CRAN release: 2022-12-20

    -

    New Features

    -
    • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
    • +

      New Features +

      +
        +
      • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
      • Update the mmrm arguments to allow users more fine-grained control, e.g. mmrm(..., start = start, optimizer = c("BFGS", "nlminb")) to set the starting values for the variance estimates and to choose the available optimizers. These arguments will be passed to the new function mmrm_control.
      • Add new argument drop_visit_levels to allow users to keep all levels in visits, even when they are not observed in the data. Dropping unobserved levels was done silently previously, and now a message will be given. See ?mmrm_control for more details.
      • -
    + +
    -

    Bug Fixes

    -
    • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
    • +

      Bug Fixes +

      +
        +
      • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
      • Previously in mmrm calls, the weights object in the environment where the formula is defined was replaced by the weights used internally. Now this behavior is removed and your variable weights e.g. in the global environment will no longer be replaced.
      • -
    + +
    -

    Miscellaneous

    -
    • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
    • +

      Miscellaneous +

      +
        +
      • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
      • Deprecated optimizer = "automatic" in favor of not specifying the optimizer. By default, all remaining optimizers will be tried if the first optimizer fails to reach convergence.
      • -
    + +
    -

    mmrm 0.1.5

    CRAN release: 2022-10-18

    -
    • First CRAN version of the package.
    • +

      mmrm 0.1.5 +

      +

      CRAN release: 2022-10-18

      +
        +
      • First CRAN version of the package.
      • The package fits mixed models for repeated measures (MMRM) based on the marginal linear model without random effects.
      • The motivation for this package is to have a fast, reliable (in terms of convergence behavior) and feature complete implementation of MMRM in R.
      • -
      -

      New Features

      -
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • +
      +
      +

      New Features +

      +
        +
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • Fast C++ implementation of Maximum Likelihood (ML) and Restricted Maximum Likelihood (REML) estimation.
      • Currently Satterthwaite adjusted degrees of freedom calculation is supported.
      • Interface to the emmeans package for computing estimated marginal means (also called least-square means) for the coefficients.
      • Multiple optimizers are run to reach convergence in as many cases as possible.
      • Flexible formula based model specification and support for standard S3 methods such as summary, logLik, etc.
      • -
      +
    +
    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/COV_TYPES.html b/v0.3.5/reference/COV_TYPES.html index c512e4809..280ab180c 100644 --- a/v0.3.5/reference/COV_TYPES.html +++ b/v0.3.5/reference/COV_TYPES.html @@ -1,5 +1,25 @@ - -Covariance Type Database — COV_TYPES • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,14 +140,17 @@
    -

    Usage

    +

    Usage +

    COV_TYPES
    -

    Format

    +

    Format +

    A data frame with 5 variables and one record per covariance type:

    -
    name
    +
    +
    name

    The long-form name of the covariance structure type

    abbr
    @@ -138,25 +169,30 @@

    Format<

    A logical value indicating whether the covariance structure is spatial.

    -

    + + + +
    -
    + + - - + + diff --git a/v0.3.5/reference/as.cov_struct.html b/v0.3.5/reference/as.cov_struct.html index a2ce85fcd..b6e89c52b 100644 --- a/v0.3.5/reference/as.cov_struct.html +++ b/v0.3.5/reference/as.cov_struct.html @@ -1,5 +1,25 @@ - -Coerce into a Covariance Structure Definition — as.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    as.cov_struct(x, ...)
     
     # S3 method for formula
    @@ -120,8 +149,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    an object from which to derive a covariance structure. See object specific sections for details.

    @@ -134,44 +165,66 @@

    Arguments -

    Value

    +

    Value +

    A cov_struct() object.

    -

    Details

    +

    Details +

    A covariance structure can be parsed from a model definition formula or call. Generally, covariance structures defined using non-standard evaluation take the following form:

    -

    type( (visit, )* visit | (group /)? subject )

    +

    +
    +
    type( (visit, )* visit | (group /)? subject )
    +

    +

    For example, formulas may include terms such as

    -

    us(time | subject)
    +

    +
    +
    us(time | subject)
     cp(time | group / subject)
    -sp_exp(coord1, coord2 | group / subject)

    +sp_exp(coord1, coord2 | group / subject)
    +

    +

    Note that only sp_exp (spatial) covariance structures may provide multiple coordinates, which identify the Euclidean distance between the time points.

    -

    Methods (by class)

    +

    Methods (by class) +

    -
    • as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be +

        +
      • +

        as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be covariance structure definitions and must follow the form:

        -

        y ~ xs + type( (visit, )* visit | (group /)? subject )

        +

        +
        +
        y ~ xs + type( (visit, )* visit | (group /)? subject )
        +

        +

        Any component on the right hand side of a formula is considered when -searching for a covariance definition.

      • -
    +searching for a covariance definition.

    + + +
    -

    See also

    +

    See also +

    Other covariance types: cov_struct(), covariance_types

    -

    Examples

    +

    Examples +

    # provide a covariance structure as a right-sided formula
     as.cov_struct(~ csh(visit | group / subject))
     #> <covariance structure>
    @@ -191,22 +244,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.5/reference/bcva_data.html b/v0.3.5/reference/bcva_data.html index 8b88756a6..2cb7fe9e4 100644 --- a/v0.3.5/reference/bcva_data.html +++ b/v0.3.5/reference/bcva_data.html @@ -1,5 +1,25 @@ - -Example Data on BCVA — bcva_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,48 +140,59 @@
    -

    Usage

    +

    Usage +

    bcva_data
    -

    Format

    -

    A tibble with 10,000 rows and 7 variables:

    • USUBJID: subject ID.

    • +

      Format +

      +

      A tibble with 10,000 rows and 7 variables:

      +
        +
      • USUBJID: subject ID.

      • VISITN: visit number (numeric).

      • AVISIT: visit number (factor).

      • ARMCD: treatment, TRT or CTL.

      • RACE: 3-category race.

      • BCVA_BL: BCVA at baseline.

      • BCVA_CHG: Change in BCVA at study visits.

      • -
    + +
    -

    Source

    +

    Source +

    This is an artificial dataset.

    -

    Note

    +

    Note +

    Measurements of BCVA (best corrected visual acuity) is a measure of how how many letters a person can read off of an eye chart using corrective lenses or contacts. This a common endpoint in ophthalmology trials.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/cached_mmrm_results.html b/v0.3.5/reference/cached_mmrm_results.html index 3d038339d..8b0fbdd66 100644 --- a/v0.3.5/reference/cached_mmrm_results.html +++ b/v0.3.5/reference/cached_mmrm_results.html @@ -1,5 +1,25 @@ - -Cache Data for mmrm Model Comparison — cached_mmrm_results • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,25 +140,32 @@
    -

    Usage

    +

    Usage +

    cached_mmrm_results
    -

    Format

    -

    A list with following elements:

    • conv_time_fev: Convergence time on FEV data.

    • +

      Format +

      +

      A list with following elements:

      +
        +
      • conv_time_fev: Convergence time on FEV data.

      • conv_time_bcva: Convergence time on BCVA data.

      • rel_diff_ests_tbl_fev: Relative difference in estimates on FEV data.

      • rel_diff_ests_tbl_bcva: Relative difference in estimates on BCVA data.

      • conv_rate: Convergence rate on data with different missing levels.

      • df_missingness: Summary of missingness on simulated data.

      • -
    + +
    -

    Source

    +

    Source +

    This is created based on simulations on FEV data and BCVA data.

    -

    Note

    +

    Note +

    The cached data for comparison is used for the vignettes generation. Please make sure that this data is refreshed before each package release by running the script data-raw/mmrm_review.R. @@ -139,22 +174,26 @@

    Note

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/check_package_version.html b/v0.3.5/reference/check_package_version.html index cbaec3eb3..936004eea 100644 --- a/v0.3.5/reference/check_package_version.html +++ b/v0.3.5/reference/check_package_version.html @@ -1,5 +1,25 @@ - -Check Suggested Dependency Against Version Requirements — check_package_version • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    check_package_version(pkg, ver = c(NA_character_, NA_character_))
    -

    Arguments

    -
    pkg
    +

    Arguments +

    +
    +
    pkg

    (string)
    package name.

    @@ -128,9 +159,11 @@

    Arguments -

    Value

    +

    Value +

    A logical (invisibly) indicating whether the loaded package meets @@ -138,22 +171,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/component.html b/v0.3.5/reference/component.html index f494a8b5f..a25cdcea0 100644 --- a/v0.3.5/reference/component.html +++ b/v0.3.5/reference/component.html @@ -1,5 +1,25 @@ - -Component Access for mmrm_tmb Objects — component • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    component(
       object,
       name = c("cov_type", "subject_var", "n_theta", "n_subjects", "n_timepoints", "n_obs",
    @@ -124,24 +153,31 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    name

    (character)
    the component(s) to be retrieved.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding component of the object, see details.

    -

    Details

    -

    Available component() names are as follows:

    • call: low-level function call which generated the model.

    • +

      Details +

      +

      Available component() names are as follows:

      +
    + +
    -

    See also

    +

    See also +

    In the lme4 package there is a similar function getME().

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -3082,22 +3121,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.5/reference/cov_struct.html b/v0.3.5/reference/cov_struct.html index 3558f95d9..99701dbef 100644 --- a/v0.3.5/reference/cov_struct.html +++ b/v0.3.5/reference/cov_struct.html @@ -1,5 +1,25 @@ - -Define a Covariance Structure — cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    cov_struct(
       type = cov_types(),
       visits,
    @@ -123,8 +152,10 @@ 

    Usage

    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    the name of the covariance structure type to use. For available options, see cov_types(). If a type abbreviation is used that implies heterogeneity (e.g. cph) and no value is provided to @@ -150,22 +181,26 @@

    Arguments -

    Value

    +

    Value +

    A cov_struct object.

    -

    See also

    +

    See also +

    Other covariance types: as.cov_struct(), covariance_types

    -

    Examples

    +

    Examples +

    cov_struct("csh", "AVISITN", "USUBJID")
     #> <covariance structure>
     #> heterogeneous compound symmetry:
    @@ -182,22 +217,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.5/reference/cov_type_abbr.html b/v0.3.5/reference/cov_type_abbr.html index f5aaef4ef..84f065faa 100644 --- a/v0.3.5/reference/cov_type_abbr.html +++ b/v0.3.5/reference/cov_type_abbr.html @@ -1,5 +1,25 @@ - -Retrieve Associated Abbreviated Covariance Structure Type Name — cov_type_abbr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    cov_type_abbr(type)
    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    either a full name or abbreviate covariance structure type name to collapse into an abbreviated type.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding abbreviated covariance type name.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/cov_type_name.html b/v0.3.5/reference/cov_type_name.html index 181fef78a..d5708ee9a 100644 --- a/v0.3.5/reference/cov_type_name.html +++ b/v0.3.5/reference/cov_type_name.html @@ -1,5 +1,25 @@ - -Retrieve Associated Full Covariance Structure Type Name — cov_type_name • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    cov_type_name(type)
    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    either a full name or abbreviate covariance structure type name to convert to a long-form type.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding abbreviated covariance type name.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/covariance_types.html b/v0.3.5/reference/covariance_types.html index e9b86a50c..c54391d98 100644 --- a/v0.3.5/reference/covariance_types.html +++ b/v0.3.5/reference/covariance_types.html @@ -1,5 +1,25 @@ - -Covariance Types — covariance_types • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    cov_types(
       form = c("name", "abbr", "habbr"),
       filter = c("heterogeneous", "spatial")
    @@ -120,8 +149,10 @@ 

    Usage

    -

    Arguments

    -
    form
    +

    Arguments +

    +
    +
    form

    (character)
    covariance structure type name form. One or more of "name", "abbr" (abbreviation), or "habbr" (heterogeneous abbreviation).

    @@ -131,67 +162,155 @@

    Arguments or "spatial".

    -

    + +
    -

    Value

    +

    Value +

    A character vector of accepted covariance structure type names and abbreviations.

    -

    Note

    +

    Note +

    The ante-dependence covariance structure in this package refers to homogeneous ante-dependence, while the ante-dependence covariance structure from SAS PROC MIXED refers to heterogeneous ante-dependence and the homogeneous version is not available in SAS.

    For all non-spatial covariance structures, the time variable must -be coded as a factor.

    -

    Spatial Covariance structures:

    +be coded as a factor.

    +
    +

    Spatial Covariance structures: +

    -
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)

    where \(d_{ij}\) denotes the Euclidean distance between time points + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)
    +

    where \(d_{ij}\) denotes the Euclidean distance between time points \(i\) and \(j\).

    -

    Abbreviations for Covariance Structures

    +

    Abbreviations for Covariance Structures +

    -

    Common Covariance Structures:

    +

    Common Covariance Structures: +

    -
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)
    +

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, respectively, out of total \(m\) time points, \(1 \leq i, j \leq m\).

    -

    See also

    +

    See also +

    Other covariance types: as.cov_struct(), cov_struct()

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/df_1d.html b/v0.3.5/reference/df_1d.html index 8a34c4406..874f54c5a 100644 --- a/v0.3.5/reference/df_1d.html +++ b/v0.3.5/reference/df_1d.html @@ -1,9 +1,29 @@ - - + + + + + +Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm +Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    df_1d(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -133,16 +164,19 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -168,22 +202,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.5/reference/df_md.html b/v0.3.5/reference/df_md.html index d1e3066c7..0ec6826ac 100644 --- a/v0.3.5/reference/df_md.html +++ b/v0.3.5/reference/df_md.html @@ -1,11 +1,31 @@ - - + + + + + +Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm +Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -121,13 +149,16 @@
    -

    Usage

    +

    Usage +

    df_md(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -137,16 +168,19 @@

    Arguments -

    Value

    +

    Value +

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

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -169,22 +203,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.5/reference/drop_elements.html b/v0.3.5/reference/drop_elements.html index a0312c57b..dec17be08 100644 --- a/v0.3.5/reference/drop_elements.html +++ b/v0.3.5/reference/drop_elements.html @@ -1,5 +1,25 @@ - -Drop Items from an Indexible — drop_elements • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    drop_elements(x, n)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    Any object that can be consumed by seq_along() and indexed by a logical vector of the same length.

    @@ -126,31 +157,37 @@

    Arguments -

    Value

    +

    Value +

    A subset of x.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/emit_tidymodels_register_msg.html b/v0.3.5/reference/emit_tidymodels_register_msg.html index ede3246cf..91a93e1fe 100644 --- a/v0.3.5/reference/emit_tidymodels_register_msg.html +++ b/v0.3.5/reference/emit_tidymodels_register_msg.html @@ -1,5 +1,25 @@ - -Format a Message to Emit When Tidymodels is Loaded — emit_tidymodels_register_msg • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,12 +140,14 @@
    -

    Usage

    +

    Usage +

    emit_tidymodels_register_msg()
    -

    Value

    +

    Value +

    A character message to emit. Either a ansi-formatted cli output if @@ -125,22 +155,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/emmeans_support.html b/v0.3.5/reference/emmeans_support.html index e2744cf06..bd88e9506 100644 --- a/v0.3.5/reference/emmeans_support.html +++ b/v0.3.5/reference/emmeans_support.html @@ -1,11 +1,31 @@ - - + + + + + +Support for emmeans — emmeans_support • mmrm +Support for emmeans — emmeans_support • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - +
    @@ -123,7 +152,8 @@
    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -156,22 +186,26 @@ 

    Examples#> Confidence level used: 0.95

    -
    + +
    + + - - + + diff --git a/v0.3.5/reference/fev_data.html b/v0.3.5/reference/fev_data.html index 1df193586..4d5a152ea 100644 --- a/v0.3.5/reference/fev_data.html +++ b/v0.3.5/reference/fev_data.html @@ -1,5 +1,25 @@ - -Example Data on FEV1 — fev_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,17 @@
    -

    Usage

    +

    Usage +

    fev_data
    -

    Format

    -

    A tibble with 800 rows and 7 variables:

    • USUBJID: subject ID.

    • +

      Format +

      +

      A tibble with 800 rows and 7 variables:

      +
        +
      • USUBJID: subject ID.

      • AVISIT: visit number.

      • ARMCD: treatment, TRT or PBO.

      • RACE: 3-category race.

      • @@ -126,35 +158,42 @@

        Format<
      • FEV1_BL: FEV1 at baseline (%).

      • FEV1: FEV1 at study visits.

      • WEIGHT: weighting variable.

      • -

    + +
    -

    Source

    +

    Source +

    This is an artificial dataset.

    -

    Note

    +

    Note +

    Measurements of FEV1 (forced expired volume in one second) is a measure of how quickly the lungs can be emptied. Low levels of FEV1 may indicate chronic obstructive pulmonary disease (COPD).

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/fill_names.html b/v0.3.5/reference/fill_names.html index 9de41ffd8..3903f3e2f 100644 --- a/v0.3.5/reference/fill_names.html +++ b/v0.3.5/reference/fill_names.html @@ -1,5 +1,25 @@ - -Complete character Vector Names From Values — fill_names • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    fill_names(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character or list)
    value whose names should be completed from element values.

    -
    + +
    -

    Value

    +

    Value +

    A named vector or list.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/fit_mmrm.html b/v0.3.5/reference/fit_mmrm.html index 2d7e7c78b..557ff53f7 100644 --- a/v0.3.5/reference/fit_mmrm.html +++ b/v0.3.5/reference/fit_mmrm.html @@ -1,11 +1,31 @@ - - + + + + + +Low-Level Fitting Function for MMRM — fit_mmrm • mmrm +Low-Level Fitting Function for MMRM — fit_mmrm • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -121,7 +149,8 @@
    -

    Usage

    +

    Usage +

    fit_mmrm(
       formula,
       data,
    @@ -135,8 +164,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    model formula with exactly one special term specifying the visits within subjects, see details.

    @@ -175,16 +206,19 @@

    Argumentsmmrm_control().

    -

    + +
    -

    Value

    +

    Value +

    List of class mmrm_tmb, see h_mmrm_tmb_fit() for details. In addition, it contains elements call and optimizer.

    + + - - + + diff --git a/v0.3.5/reference/fit_single_optimizer.html b/v0.3.5/reference/fit_single_optimizer.html index 4c49f6333..eeec76565 100644 --- a/v0.3.5/reference/fit_single_optimizer.html +++ b/v0.3.5/reference/fit_single_optimizer.html @@ -1,9 +1,29 @@ - - + + + + + +Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm +Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,7 +146,8 @@
    -

    Usage

    +

    Usage +

    fit_single_optimizer(
       formula,
       data,
    @@ -133,8 +162,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -174,9 +205,11 @@

    Arguments -

    Value

    +

    Value +

    The mmrm_fit object, with additional attributes containing warnings, @@ -184,7 +217,8 @@

    Value

    mmrm_tmb
    contents.

    + +
    - - + + diff --git a/v0.3.5/reference/flat_expr.html b/v0.3.5/reference/flat_expr.html index 5606ed9d2..edc0989c4 100644 --- a/v0.3.5/reference/flat_expr.html +++ b/v0.3.5/reference/flat_expr.html @@ -1,11 +1,31 @@ - - + + + + + +Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm +Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -121,61 +149,86 @@
    -

    Usage

    +

    Usage +

    flatten_call(call)
     
     flatten_expr(expr)
    -

    Arguments

    -
    call, expr
    +

    Arguments +

    +
    +
    call, expr

    (language)
    a language object to flatten.

    -
    + +
    -

    Value

    +

    Value +

    A list of atomic values, symbols, infix operator names and subexpressions.

    -

    Details

    +

    Details +

    Where 1 + 2 | 3 in R's syntax tree is (|, (+, 1, 2), 3), flattening it into its visual order produces (1, +, 2, |, 3), which makes for more fluent interpretation of non-standard grammar rules used in formulas.

    -

    Functions

    +

    Functions +

    -
    • flatten_call(): Flatten a call into a list of names and argument expressions.

      +
        +
      • +

        flatten_call(): Flatten a call into a list of names and argument expressions.

        The call name and all arguments are flattened into the same list, meaning a call of the form sp_exp(a, b, c | d / e) produces a list of the form (sp_exp, a, b, c, |, d, /, e).

        -

        flatten_call(quote(sp_exp(a, b, c | d / e)))

      • -
      • flatten_expr(): Flatten nested expressions

        -

        flatten_expr(quote(1 + 2 + 3 | 4))

      • -
    +

    +
    +
    flatten_call(quote(sp_exp(a, b, c | d / e)))
    +

    +
    + +
  • +

    flatten_expr(): Flatten nested expressions

    +

    +
    +
    flatten_expr(quote(1 + 2 + 3 | 4))
    +

    +
    +
  • + + + +
    -
    + + - - + + diff --git a/v0.3.5/reference/format.cov_struct.html b/v0.3.5/reference/format.cov_struct.html index adfa9581f..a2cdef8ca 100644 --- a/v0.3.5/reference/format.cov_struct.html +++ b/v0.3.5/reference/format.cov_struct.html @@ -1,5 +1,25 @@ - -Format Covariance Structure Object — format.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,45 +140,54 @@
    -

    Usage

    +

    Usage +

    # S3 method for cov_struct
     format(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    ...

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string for x.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/format_symbols.html b/v0.3.5/reference/format_symbols.html index 818dd7870..1601f4991 100644 --- a/v0.3.5/reference/format_symbols.html +++ b/v0.3.5/reference/format_symbols.html @@ -1,7 +1,27 @@ - -Format Symbol Objects — format_symbols • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,40 +143,49 @@
    -

    Usage

    +

    Usage +

    format_symbols(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character) A vector of variable names.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string of comma-separated variables.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/formula_rhs.html b/v0.3.5/reference/formula_rhs.html index 5a31a107a..ac7d8f621 100644 --- a/v0.3.5/reference/formula_rhs.html +++ b/v0.3.5/reference/formula_rhs.html @@ -1,5 +1,25 @@ - -Extract Right-Hand-Side (rhs) from Formula — formula_rhs • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,47 +140,60 @@
    -

    Usage

    +

    Usage +

    formula_rhs(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula.

    -
    + +
    -

    Value

    +

    Value +

    A formula without a response, derived from the right-hand-side of the formula, f.

    -

    formula_rhs(a ~ b + c)
    -formula_rhs(~ b + c)

    +

    +
    +
    formula_rhs(a ~ b + c)
    +formula_rhs(~ b + c)
    +

    +
    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_add_covariance_terms.html b/v0.3.5/reference/h_add_covariance_terms.html index 3d39ce8dd..ad60a849a 100644 --- a/v0.3.5/reference/h_add_covariance_terms.html +++ b/v0.3.5/reference/h_add_covariance_terms.html @@ -1,5 +1,25 @@ - -Add Individual Covariance Variables As Terms to Formula — h_add_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_add_covariance_terms(f, covariance)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula to which covariance structure terms should be added.

    @@ -127,37 +158,44 @@

    Arguments -

    Value

    +

    Value +

    A new formula with included covariance terms.

    -

    Details

    +

    Details +

    stats::update() is used to append the covariance structure and the environment attribute will not be changed. This ensures the returned formula and the input formula have the same environment.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_add_terms.html b/v0.3.5/reference/h_add_terms.html index 53809007a..e9a84acd8 100644 --- a/v0.3.5/reference/h_add_terms.html +++ b/v0.3.5/reference/h_add_terms.html @@ -1,5 +1,25 @@ - -Add Formula Terms with Character — h_add_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_add_terms(f, adds, drop_response = FALSE)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula to be updated.

    @@ -129,37 +160,44 @@

    Arguments -

    Value

    +

    Value +

    A new formula with elements in drops removed.

    -

    Details

    +

    Details +

    Elements in adds will be added from the formula, while the environment of the formula is unchanged. If adds is NULL or character(0), the formula is unchanged.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_coef_table.html b/v0.3.5/reference/h_coef_table.html index aef218f60..59b3e0e5a 100644 --- a/v0.3.5/reference/h_coef_table.html +++ b/v0.3.5/reference/h_coef_table.html @@ -1,5 +1,25 @@ - -Coefficients Table for MMRM Fit — h_coef_table • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,18 +140,23 @@
    -

    Usage

    +

    Usage +

    h_coef_table(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    model fit.

    -
    + +
    -

    Value

    +

    Value +

    Matrix with one row per coefficient and columns @@ -131,22 +164,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_confirm_large_levels.html b/v0.3.5/reference/h_confirm_large_levels.html index e4492bbf7..5fd00d109 100644 --- a/v0.3.5/reference/h_confirm_large_levels.html +++ b/v0.3.5/reference/h_confirm_large_levels.html @@ -1,7 +1,27 @@ - -Ask for Confirmation on Large Visit Levels — h_confirm_large_levels • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,34 +143,42 @@
    -

    Usage

    +

    Usage +

    h_confirm_large_levels(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (numeric)
    number of visit levels.

    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_construct_model_frame_inputs.html b/v0.3.5/reference/h_construct_model_frame_inputs.html index 1b18cb715..0af2984ac 100644 --- a/v0.3.5/reference/h_construct_model_frame_inputs.html +++ b/v0.3.5/reference/h_construct_model_frame_inputs.html @@ -1,13 +1,33 @@ - - + + + + + +Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm +Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -32,7 +54,8 @@ + - + + - + @@ -124,7 +152,8 @@
    -

    Usage

    +

    Usage +

    h_construct_model_frame_inputs(
       formula,
       data,
    @@ -135,8 +164,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (mmrm)
    mmrm fit object.

    @@ -152,36 +183,45 @@

    Arguments -

    Value

    +

    Value +

    -

    named list with four elements:

    • "formula": the formula including the columns requested in the include= argument.

    • +

      named list with four elements:

      +
        +
      • "formula": the formula including the columns requested in the include= argument.

      • "formula_full": the formula including all columns

      • "data": a data frame including all columns where factor and character columns have been processed with h_factor_ref().

      • "is_full": a logical scalar indicating if the formula and full formula are identical

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_default_value.html b/v0.3.5/reference/h_default_value.html index 6ea2aea68..0a194c2c2 100644 --- a/v0.3.5/reference/h_default_value.html +++ b/v0.3.5/reference/h_default_value.html @@ -1,9 +1,29 @@ - -Default Value on NULL -Return default value when first argument is NULL. — h_default_value • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,42 +146,51 @@
    -

    Usage

    +

    Usage +

    h_default_value(x, y)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    Object.

    y

    Object.

    -
    + +
    -

    Details

    +

    Details +

    If x is NULL, returns y. Otherwise return x.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_df_1d_bw.html b/v0.3.5/reference/h_df_1d_bw.html index ecd025048..d117132f0 100644 --- a/v0.3.5/reference/h_df_1d_bw.html +++ b/v0.3.5/reference/h_df_1d_bw.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom for One-Dimensional Contrast — h_df_1d_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_bw(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -127,31 +158,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_df_1d_kr.html b/v0.3.5/reference/h_df_1d_kr.html index 76976ae13..3c0b3bbd6 100644 --- a/v0.3.5/reference/h_df_1d_kr.html +++ b/v0.3.5/reference/h_df_1d_kr.html @@ -1,7 +1,27 @@ - -Calculation of Kenward-Roger Degrees of Freedom for One-Dimensional Contrast — h_df_1d_kr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_kr(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -130,31 +161,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_df_1d_res.html b/v0.3.5/reference/h_df_1d_res.html index d45361770..16ecf3bae 100644 --- a/v0.3.5/reference/h_df_1d_res.html +++ b/v0.3.5/reference/h_df_1d_res.html @@ -1,7 +1,27 @@ - -Calculation of Residual Degrees of Freedom for One-Dimensional Contrast — h_df_1d_res • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_res(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -130,31 +161,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_df_1d_sat.html b/v0.3.5/reference/h_df_1d_sat.html index 3637e2fd2..0a25f4d8e 100644 --- a/v0.3.5/reference/h_df_1d_sat.html +++ b/v0.3.5/reference/h_df_1d_sat.html @@ -1,7 +1,27 @@ - -Calculation of Satterthwaite Degrees of Freedom for One-Dimensional Contrast — h_df_1d_sat • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_sat(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -130,31 +161,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_df_bw_calc.html b/v0.3.5/reference/h_df_bw_calc.html index b7555942d..2a88539a8 100644 --- a/v0.3.5/reference/h_df_bw_calc.html +++ b/v0.3.5/reference/h_df_bw_calc.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom — h_df_bw_calc • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,42 +140,54 @@
    -

    Usage

    +

    Usage +

    h_df_bw_calc(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    -

    List with:

    + + + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_df_md_bw.html b/v0.3.5/reference/h_df_md_bw.html index ab3d4fa60..f9a34d546 100644 --- a/v0.3.5/reference/h_df_md_bw.html +++ b/v0.3.5/reference/h_df_md_bw.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_bw(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_df_md_from_1d.html b/v0.3.5/reference/h_df_md_from_1d.html index f474b5b80..4cc30fa1d 100644 --- a/v0.3.5/reference/h_df_md_from_1d.html +++ b/v0.3.5/reference/h_df_md_from_1d.html @@ -1,5 +1,25 @@ - -Creating F-Statistic Results from One-Dimensional Contrast — h_df_md_from_1d • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,22 +140,27 @@
    -

    Usage

    +

    Usage +

    h_df_md_from_1d(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    model fit.

    contrast

    (numeric)
    one-dimensional contrast.

    -
    + +
    -

    Value

    +

    Value +

    The one-dimensional degrees of freedom are calculated and then @@ -135,22 +168,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_df_md_kr.html b/v0.3.5/reference/h_df_md_kr.html index bbd1893cb..a7a277ba1 100644 --- a/v0.3.5/reference/h_df_md_kr.html +++ b/v0.3.5/reference/h_df_md_kr.html @@ -1,5 +1,25 @@ - -Calculation of Kenward-Roger Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_kr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_kr(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_df_md_res.html b/v0.3.5/reference/h_df_md_res.html index 09b20727e..5e09091c1 100644 --- a/v0.3.5/reference/h_df_md_res.html +++ b/v0.3.5/reference/h_df_md_res.html @@ -1,5 +1,25 @@ - -Calculation of Residual Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_res • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_res(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_df_md_sat.html b/v0.3.5/reference/h_df_md_sat.html index 59fcc354a..fc8fec99c 100644 --- a/v0.3.5/reference/h_df_md_sat.html +++ b/v0.3.5/reference/h_df_md_sat.html @@ -1,5 +1,25 @@ - -Calculation of Satterthwaite Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_sat • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_sat(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_df_min_bw.html b/v0.3.5/reference/h_df_min_bw.html index 13e01c763..b79459989 100644 --- a/v0.3.5/reference/h_df_min_bw.html +++ b/v0.3.5/reference/h_df_min_bw.html @@ -1,5 +1,25 @@ - -Assign Minimum Degrees of Freedom Given Involved Coefficients — h_df_min_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_min_bw(bw_calc, is_coef_involved)
    -

    Arguments

    -
    bw_calc
    +

    Arguments +

    +
    +
    bw_calc

    (list)
    from h_df_bw_calc().

    @@ -126,9 +157,11 @@

    Arguments -

    Value

    +

    Value +

    The minimum of the degrees of freedom assigned to each involved @@ -136,22 +169,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_df_to_tibble.html b/v0.3.5/reference/h_df_to_tibble.html index d89678353..5d52353e0 100644 --- a/v0.3.5/reference/h_df_to_tibble.html +++ b/v0.3.5/reference/h_df_to_tibble.html @@ -1,5 +1,25 @@ - -Coerce a Data Frame to a tibble — h_df_to_tibble • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -112,24 +141,30 @@
    -

    Usage

    +

    Usage +

    h_df_to_tibble(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (data.frame)
    what to coerce.

    -
    + +
    -

    Value

    +

    Value +

    The data as a tibble, potentially with a .rownames column.

    -

    Details

    +

    Details +

    This is only a thin wrapper around tibble::as_tibble(), except giving a useful error message and it checks for rownames and adds them as a new column .rownames if they are not just a numeric sequence as @@ -137,22 +172,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.5/reference/h_drop_covariance_terms.html b/v0.3.5/reference/h_drop_covariance_terms.html index 21d615085..0a7eb5287 100644 --- a/v0.3.5/reference/h_drop_covariance_terms.html +++ b/v0.3.5/reference/h_drop_covariance_terms.html @@ -1,5 +1,25 @@ - -Drop Formula Terms used for Covariance Structure Definition — h_drop_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,46 +140,56 @@
    -

    Usage

    +

    Usage +

    h_drop_covariance_terms(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula from which covariance terms should be dropped.

    -
    + +
    -

    Value

    +

    Value +

    The formula without accepted covariance terms.

    -

    Details

    +

    Details +

    terms is used and it will preserve the environment attribute. This ensures the returned formula and the input formula have the same environment.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_extract_covariance_terms.html b/v0.3.5/reference/h_extract_covariance_terms.html index 696e710c5..d2ed1c667 100644 --- a/v0.3.5/reference/h_extract_covariance_terms.html +++ b/v0.3.5/reference/h_extract_covariance_terms.html @@ -1,5 +1,25 @@ - -Extract Formula Terms used for Covariance Structure Definition — h_extract_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    h_extract_covariance_terms(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula from which covariance terms should be extracted.

    -
    + +
    -

    Value

    +

    Value +

    A list of covariance structure expressions found in f.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_factor_ref.html b/v0.3.5/reference/h_factor_ref.html index 5204eef92..a34715b8c 100644 --- a/v0.3.5/reference/h_factor_ref.html +++ b/v0.3.5/reference/h_factor_ref.html @@ -1,5 +1,25 @@ - -Convert Character to Factor Following Reference — h_factor_ref • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_factor_ref(x, ref, var_name = vname(x))
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character or factor)
    input.

    @@ -129,31 +160,37 @@

    Arguments -

    Details

    +

    Details +

    Use ref to convert x into factor with the same levels. This is needed even if x and ref are both character because in model.matrix if x only has one level there could be errors.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_get_cov_default.html b/v0.3.5/reference/h_get_cov_default.html index 2ed18f2d2..39cfadf8f 100644 --- a/v0.3.5/reference/h_get_cov_default.html +++ b/v0.3.5/reference/h_get_cov_default.html @@ -1,7 +1,27 @@ - -Obtain Default Covariance Method — h_get_cov_default • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,20 +143,25 @@
    -

    Usage

    +

    Usage +

    h_get_cov_default(
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within")
     )
    -

    Arguments

    -
    method
    +

    Arguments +

    +
    +
    method

    (string)
    degrees of freedom method.

    -
    + +
    -

    Details

    +

    Details +

    The default covariance method is different for different degrees of freedom method. For "Satterthwaite" or "Between-Within", "Asymptotic" is returned. For "Kenward-Roger" only, "Kenward-Roger" is returned. @@ -136,22 +169,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.5/reference/h_get_empirical.html b/v0.3.5/reference/h_get_empirical.html index ab41654ab..75d72df89 100644 --- a/v0.3.5/reference/h_get_empirical.html +++ b/v0.3.5/reference/h_get_empirical.html @@ -1,9 +1,29 @@ - -Obtain Empirical/Jackknife/Bias-Reduced Covariance — h_get_empirical • mmrm +Obtain Empirical/Jackknife/Bias-Reduced Covariance — h_get_empirical • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    h_get_empirical(tmb_data, theta, beta, beta_vcov, type)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    @@ -144,32 +175,41 @@

    Arguments -

    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • cov: matrix empirical covariance.

    • +

      Named list with elements:

      +
        +
      • cov: matrix empirical covariance.

      • df_mat: matrix to calculate Satterthwaite degree of freedom.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_get_kr_comp.html b/v0.3.5/reference/h_get_kr_comp.html index 54147e3d9..39b03e49d 100644 --- a/v0.3.5/reference/h_get_kr_comp.html +++ b/v0.3.5/reference/h_get_kr_comp.html @@ -1,7 +1,27 @@ - -Obtain Kenward-Roger Adjustment Components — h_get_kr_comp • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,30 +143,39 @@
    -

    Usage

    +

    Usage +

    h_get_kr_comp(tmb_data, theta)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    theta

    (numeric)
    theta estimate.

    -
    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • P: matrix of \(P\) component.

    • +

      Named list with elements:

      +
        +
      • P: matrix of \(P\) component.

      • Q: matrix of \(Q\) component.

      • R: matrix of \(R\) component.

      • -
    + +
    -

    Details

    +

    Details +

    the function returns a named list, \(P\), \(Q\) and \(R\), which corresponds to the paper in 1997. The matrices are stacked in columns so that \(P\), \(Q\) and \(R\) has the same column number(number of beta parameters). The number of rows, is dependent on @@ -150,22 +187,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.5/reference/h_get_optimizers.html b/v0.3.5/reference/h_get_optimizers.html index 74b0eb0d2..7d62057ae 100644 --- a/v0.3.5/reference/h_get_optimizers.html +++ b/v0.3.5/reference/h_get_optimizers.html @@ -1,5 +1,25 @@ - -Obtain Optimizer according to Optimizer String Value — h_get_optimizers • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    h_get_optimizers(
       optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"),
       optimizer_fun = h_optimizer_fun(optimizer),
    @@ -122,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    optimizer
    +

    Arguments +

    +
    +
    optimizer

    (character)
    names of built-in optimizers to try, subset of "L-BFGS-B", "BFGS", "CG" and "nlminb".

    @@ -140,46 +171,59 @@

    Arguments -

    Value

    +

    Value +

    Named list of optimizers created by h_partial_fun_args().

    -

    Details

    -

    If you want to use only the built-in optimizers:

    • optimizer is a shortcut to create a list of built-in optimizer functions +

      Details +

      +

      If you want to use only the built-in optimizers:

      +
        +
      • optimizer is a shortcut to create a list of built-in optimizer functions passed to optimizer_fun.

      • Allowed are "L-BFGS-B", "BFGS", "CG" (using stats::optim() with corresponding method) and "nlminb" (using stats::nlminb()).

      • Other arguments should go into optimizer_args.

      • -

      If you want to use your own optimizer function:

      • Make sure that there are three arguments: parameter (start value), objective function +

      +

      If you want to use your own optimizer function:

      +
        +
      • Make sure that there are three arguments: parameter (start value), objective function and gradient function are sequentially in the function arguments.

      • If there are other named arguments in front of these, make sure they are correctly specified through optimizer_args.

      • If the hessian can be used, please make sure its argument name is hessian and please add attribute use_hessian = TRUE to the function, using attr(fun, "use_hessian) <- TRUE.

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_get_prediction.html b/v0.3.5/reference/h_get_prediction.html index 697b5fa84..2f9083754 100644 --- a/v0.3.5/reference/h_get_prediction.html +++ b/v0.3.5/reference/h_get_prediction.html @@ -1,5 +1,25 @@ - -Get Prediction — h_get_prediction • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_get_prediction(tmb_data, theta, beta, beta_vcov)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    object.

    @@ -133,37 +164,47 @@

    Arguments -

    Value

    +

    Value +

    -

    List with:

    • prediction: Matrix with columns fit, conf_var, and var.

    • +

      List with:

      +
        +
      • prediction: Matrix with columns fit, conf_var, and var.

      • covariance: List with subject specific covariance matrices.

      • index: List of zero-based subject indices.

      • -
    + +
    -

    Details

    +

    Details +

    See predict function in predict.cpp which is called internally.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_get_prediction_variance.html b/v0.3.5/reference/h_get_prediction_variance.html index f7284e12b..2366d25bb 100644 --- a/v0.3.5/reference/h_get_prediction_variance.html +++ b/v0.3.5/reference/h_get_prediction_variance.html @@ -1,5 +1,25 @@ - -Get Prediction Variance — h_get_prediction_variance • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_get_prediction_variance(object, nsim, tmb_data)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    @@ -129,25 +160,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.5/reference/h_get_sim_per_subj.html b/v0.3.5/reference/h_get_sim_per_subj.html index 9fd031e01..398863c45 100644 --- a/v0.3.5/reference/h_get_sim_per_subj.html +++ b/v0.3.5/reference/h_get_sim_per_subj.html @@ -1,5 +1,25 @@ - -Get simulated values by patient. — h_get_sim_per_subj • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_get_sim_per_subj(predict_res, nsub, nsim)
    -

    Arguments

    -
    predict_res
    +

    Arguments +

    +
    +
    predict_res

    (list)
    from h_get_prediction().

    @@ -129,25 +160,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.5/reference/h_gradient.html b/v0.3.5/reference/h_gradient.html index 386c676c4..8d6a5c061 100644 --- a/v0.3.5/reference/h_gradient.html +++ b/v0.3.5/reference/h_gradient.html @@ -1,7 +1,27 @@ - -Computation of a Gradient Given Jacobian and Contrast Vector — h_gradient • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_gradient(jac_list, contrast)
    -

    Arguments

    -
    jac_list
    +

    Arguments +

    +
    +
    jac_list

    (list)
    Jacobian list produced e.g. by h_jac_list().

    @@ -130,9 +161,11 @@

    Arguments -

    Value

    +

    Value +

    Numeric vector which contains the quadratic forms of each element of @@ -140,22 +173,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_jac_list.html b/v0.3.5/reference/h_jac_list.html index 0528c987c..d077f2dfd 100644 --- a/v0.3.5/reference/h_jac_list.html +++ b/v0.3.5/reference/h_jac_list.html @@ -1,5 +1,25 @@ - -Obtain List of Jacobian Matrix Entries for Covariance Matrix — h_jac_list • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_jac_list(tmb_data, theta_est, beta_vcov)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    @@ -129,9 +160,11 @@

    Arguments -

    Value

    +

    Value +

    List with one element per variance parameter containing a matrix @@ -140,22 +173,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_kr_df.html b/v0.3.5/reference/h_kr_df.html index a467106ca..7d258bf7b 100644 --- a/v0.3.5/reference/h_kr_df.html +++ b/v0.3.5/reference/h_kr_df.html @@ -1,7 +1,27 @@ - -Obtain the Adjusted Kenward-Roger degrees of freedom — h_kr_df • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_kr_df(v0, l, w, p)
    -

    Arguments

    -
    v0
    +

    Arguments +

    +
    +
    v0

    (matrix)
    unadjusted covariance matrix.

    @@ -136,32 +167,41 @@

    Argumentsh_get_kr_comp().

    -

    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • m: numeric degrees of freedom.

    • +

      Named list with elements:

      +
        +
      • m: numeric degrees of freedom.

      • lambda: numeric F statistic scale parameter.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_md_denom_df.html b/v0.3.5/reference/h_md_denom_df.html index 66994528a..97dc2a732 100644 --- a/v0.3.5/reference/h_md_denom_df.html +++ b/v0.3.5/reference/h_md_denom_df.html @@ -1,5 +1,25 @@ - -Calculating Denominator Degrees of Freedom for the Multi-Dimensional Case — h_md_denom_df • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,47 +140,57 @@
    -

    Usage

    +

    Usage +

    h_md_denom_df(t_stat_df)
    -

    Arguments

    -
    t_stat_df
    +

    Arguments +

    +
    +
    t_stat_df

    (numeric)
    n t-statistic derived degrees of freedom.

    -
    + +
    -

    Value

    +

    Value +

    Usually the calculation is returning 2 * E / (E - n) where E is the sum of t / (t - 2) over all t_stat_df values t.

    -

    Note

    +

    Note +

    If the input values are two similar to each other then just the average of them is returned. If any of the inputs is not larger than 2 then 2 is returned.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_mmrm_tmb_assert_start.html b/v0.3.5/reference/h_mmrm_tmb_assert_start.html index 9ae4876df..5590e4e38 100644 --- a/v0.3.5/reference/h_mmrm_tmb_assert_start.html +++ b/v0.3.5/reference/h_mmrm_tmb_assert_start.html @@ -1,5 +1,25 @@ - -Asserting Sane Start Values for TMB Fit — h_mmrm_tmb_assert_start • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_assert_start(tmb_object)
    -

    Arguments

    -
    tmb_object
    +

    Arguments +

    +
    +
    tmb_object

    (list)
    created with TMB::MakeADFun().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used for assertions.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_mmrm_tmb_check_conv.html b/v0.3.5/reference/h_mmrm_tmb_check_conv.html index 6497cfe37..328d95544 100644 --- a/v0.3.5/reference/h_mmrm_tmb_check_conv.html +++ b/v0.3.5/reference/h_mmrm_tmb_check_conv.html @@ -1,5 +1,25 @@ - -Checking the TMB Optimization Result — h_mmrm_tmb_check_conv • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,22 +140,27 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_check_conv(tmb_opt, mmrm_tmb)
    -

    Arguments

    -
    tmb_opt
    +

    Arguments +

    +
    +
    tmb_opt

    (list)
    optimization result.

    mmrm_tmb

    (mmrm_tmb)
    result from h_mmrm_tmb_fit().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used to generate warnings in case that the model @@ -135,22 +168,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_mmrm_tmb_data.html b/v0.3.5/reference/h_mmrm_tmb_data.html index 1fda94b7e..6c7096c53 100644 --- a/v0.3.5/reference/h_mmrm_tmb_data.html +++ b/v0.3.5/reference/h_mmrm_tmb_data.html @@ -1,5 +1,25 @@ - -Data for TMB Fit — h_mmrm_tmb_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_data(
       formula_parts,
       data,
    @@ -126,8 +155,10 @@ 

    Usage

    -

    Arguments

    -
    formula_parts
    +

    Arguments +

    +
    +
    formula_parts

    (mmrm_tmb_formula_parts)
    list with formula parts from h_mmrm_tmb_formula_parts().

    @@ -161,12 +192,16 @@

    Arguments -

    Value

    +

    Value +

    -

    List of class mmrm_tmb_data with elements:

    • full_frame: data.frame with n rows containing all variables needed in the model.

    • +

      List of class mmrm_tmb_data with elements:

      +
        +
      • full_frame: data.frame with n rows containing all variables needed in the model.

      • data: data.frame of input dataset.

      • x_matrix: matrix with n rows and p columns specifying the overall design matrix.

      • x_cols_aliased: logical with potentially more than p elements indicating which @@ -187,9 +222,11 @@

        Value

        reml: int specifying whether REML estimation is used (1), otherwise ML (0).

      • subject_groups: factor specifying the grouping for each subject.

      • n_groups: int with the number of total groups

      • -
    + +
    -

    Details

    +

    Details +

    Note that the subject_var must not be factor but can also be character. If it is character, then it will be converted to factor internally. Here the levels will be the unique values, sorted alphabetically and numerically if there @@ -198,22 +235,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.5/reference/h_mmrm_tmb_extract_cov.html b/v0.3.5/reference/h_mmrm_tmb_extract_cov.html index 034f8f5c1..f8ddbbfbe 100644 --- a/v0.3.5/reference/h_mmrm_tmb_extract_cov.html +++ b/v0.3.5/reference/h_mmrm_tmb_extract_cov.html @@ -1,7 +1,27 @@ - -Extract covariance matrix from TMB report and input data — h_mmrm_tmb_extract_cov • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_extract_cov(tmb_report, tmb_data, visit_var, is_spatial)
    -

    Arguments

    -
    tmb_report
    +

    Arguments +

    +
    +
    tmb_report

    (list)
    report created with TMB::MakeADFun() report function.

    @@ -136,9 +167,11 @@

    Arguments -

    Value

    +

    Value +

    Return a simple covariance matrix if there is no grouping, or a named @@ -147,22 +180,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_mmrm_tmb_fit.html b/v0.3.5/reference/h_mmrm_tmb_fit.html index ff2a6e3e6..eb8389041 100644 --- a/v0.3.5/reference/h_mmrm_tmb_fit.html +++ b/v0.3.5/reference/h_mmrm_tmb_fit.html @@ -1,7 +1,27 @@ - -Build TMB Fit Result List — h_mmrm_tmb_fit • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_fit(tmb_object, tmb_opt, formula_parts, tmb_data)
    -

    Arguments

    -
    tmb_object
    +

    Arguments +

    +
    +
    tmb_object

    (list)
    created with TMB::MakeADFun().

    @@ -137,12 +168,16 @@

    Argumentsh_mmrm_tmb_data().

    -

    + +
    -

    Value

    +

    Value +

    -

    List of class mmrm_tmb with:

    • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

    • +

      List of class mmrm_tmb with:

      +
        +
      • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

      • beta_est: vector of coefficient estimates.

      • beta_vcov: Variance-covariance matrix for coefficient estimates.

      • beta_vcov_inv_L: Lower triangular matrix L of the inverse variance-covariance matrix decomposition.

      • @@ -157,31 +192,37 @@

        Value

        opt_details: list with optimization details including convergence code.

      • tmb_object: original TMB object created with TMB::MakeADFun().

      • tmb_data: input.

      • -
    + +
    -

    Details

    +

    Details +

    Instead of inverting or decomposing beta_vcov, it can be more efficient to use its robust Cholesky decomposition LDL^T, therefore we return the corresponding two components L and D as well since they have been available on the C++ side already.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_mmrm_tmb_formula_parts.html b/v0.3.5/reference/h_mmrm_tmb_formula_parts.html index 85125655a..9e7257ec6 100644 --- a/v0.3.5/reference/h_mmrm_tmb_formula_parts.html +++ b/v0.3.5/reference/h_mmrm_tmb_formula_parts.html @@ -1,5 +1,25 @@ - -Processing the Formula for TMB Fit — h_mmrm_tmb_formula_parts • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_formula_parts(
       formula,
       covariance = as.cov_struct(formula, warn_partial = FALSE)
    @@ -120,8 +149,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    Original formula.

    @@ -129,12 +160,16 @@

    Arguments -

    Value

    +

    Value +

    -

    List of class mmrm_tmb_formula_parts with elements:

    • formula: the original input.

    • +

      List of class mmrm_tmb_formula_parts with elements:

      +
        +
      • formula: the original input.

      • model_formula: formula with the covariance term is removed.

      • model_formula: formula with the covariance term removed.

      • full_formula: same as model_formula but includes the covariance @@ -146,25 +181,30 @@

        Value

        subject_var: string with the subject variable name.

      • group_var: string with the group variable name. If no group specified, this element is NULL.

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_mmrm_tmb_parameters.html b/v0.3.5/reference/h_mmrm_tmb_parameters.html index 5ec74bd47..bab56bf02 100644 --- a/v0.3.5/reference/h_mmrm_tmb_parameters.html +++ b/v0.3.5/reference/h_mmrm_tmb_parameters.html @@ -1,5 +1,25 @@ - -Start Parameters for TMB Fit — h_mmrm_tmb_parameters • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_parameters(formula_parts, tmb_data, start, n_groups = 1L)
    -

    Arguments

    -
    formula_parts
    +

    Arguments +

    +
    +
    formula_parts

    (mmrm_tmb_formula_parts)
    produced by h_mmrm_tmb_formula_parts().

    @@ -135,9 +166,11 @@

    Arguments -

    Value

    +

    Value +

    List with element theta containing the start values for the variance @@ -145,22 +178,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_newdata_add_pred.html b/v0.3.5/reference/h_newdata_add_pred.html index 94f44b1e0..67880bce9 100644 --- a/v0.3.5/reference/h_newdata_add_pred.html +++ b/v0.3.5/reference/h_newdata_add_pred.html @@ -1,5 +1,25 @@ - -Add Prediction Results to New Data — h_newdata_add_pred • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_newdata_add_pred(x, newdata, se_fit, interval, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fit.

    @@ -138,9 +169,11 @@

    Argumentspredict.mmrm_tmb().

    -

    + +
    -

    Value

    +

    Value +

    The newdata as a tibble with additional columns .fitted, @@ -151,22 +184,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_optimizer_fun.html b/v0.3.5/reference/h_optimizer_fun.html index 1449514c1..b5966318c 100644 --- a/v0.3.5/reference/h_optimizer_fun.html +++ b/v0.3.5/reference/h_optimizer_fun.html @@ -1,5 +1,25 @@ - -Obtain Optimizer Function with Character — h_optimizer_fun • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_optimizer_fun(optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"))
    -

    Arguments

    -
    optimizer
    +

    Arguments +

    +
    +
    optimizer

    (character)
    vector of optimizers.

    -
    + +
    -

    Value

    +

    Value +

    A (list)
    of optimizer functions generated from h_partial_fun_args().

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_partial_fun_args.html b/v0.3.5/reference/h_partial_fun_args.html index c7e974ff7..c38b45ade 100644 --- a/v0.3.5/reference/h_partial_fun_args.html +++ b/v0.3.5/reference/h_partial_fun_args.html @@ -1,5 +1,25 @@ - -Create Partial Functions — h_partial_fun_args • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_partial_fun_args(fun, ..., additional_attr = list())
    -

    Arguments

    -
    fun
    +

    Arguments +

    +
    +
    fun

    (function)
    to be wrapped.

    @@ -129,16 +160,19 @@

    Arguments -

    Value

    +

    Value +

    Object with S3 class "partial", a function with args attribute (and possibly more attributes from additional_attr).

    -

    Details

    +

    Details +

    This function add args attribute to the original function, and add an extra class partial to the function. args is the argument for the function, and elements in ... will override the existing @@ -146,22 +180,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.5/reference/h_print_aic_list.html b/v0.3.5/reference/h_print_aic_list.html index 09a7f1821..baf84e99a 100644 --- a/v0.3.5/reference/h_print_aic_list.html +++ b/v0.3.5/reference/h_print_aic_list.html @@ -1,5 +1,25 @@ - -Printing AIC and other Model Fit Criteria — h_print_aic_list • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,38 +140,46 @@
    -

    Usage

    +

    Usage +

    h_print_aic_list(aic_list, digits = 1)
    -

    Arguments

    -
    aic_list
    +

    Arguments +

    +
    +
    aic_list

    (list)
    list as part of from summary.mmrm().

    digits

    (number)
    number of decimal places used with round().

    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_print_call.html b/v0.3.5/reference/h_print_call.html index eef2338a3..a9fae6cf5 100644 --- a/v0.3.5/reference/h_print_call.html +++ b/v0.3.5/reference/h_print_call.html @@ -1,5 +1,25 @@ - -Printing MMRM Function Call — h_print_call • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_print_call(call, n_obs, n_subjects, n_timepoints)
    -

    Arguments

    -
    call
    +

    Arguments +

    +
    +
    call

    (call)
    original mmrm() function call.

    @@ -133,25 +164,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.5/reference/h_print_cov.html b/v0.3.5/reference/h_print_cov.html index 4bf840788..53bdd2c20 100644 --- a/v0.3.5/reference/h_print_cov.html +++ b/v0.3.5/reference/h_print_cov.html @@ -1,5 +1,25 @@ - -Printing MMRM Covariance Type — h_print_cov • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_print_cov(cov_type, n_theta, n_groups)
    -

    Arguments

    -
    cov_type
    +

    Arguments +

    +
    +
    cov_type

    (string)
    covariance structure abbreviation.

    @@ -129,25 +160,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.5/reference/h_quad_form.html b/v0.3.5/reference/h_quad_form.html index b1f47f152..a0668a8ab 100644 --- a/v0.3.5/reference/h_quad_form.html +++ b/v0.3.5/reference/h_quad_form.html @@ -1,7 +1,27 @@ - -Quadratic Form Calculations — h_quad_form • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,15 +143,18 @@
    -

    Usage

    +

    Usage +

    h_quad_form_vec(vec, center)
     
     h_quad_form_mat(mat, center)
    -

    Arguments

    -
    vec
    +

    Arguments +

    +
    +
    vec

    (numeric)
    interpreted as a row vector.

    @@ -137,34 +168,42 @@

    Arguments -

    Functions

    +

    Functions +

    -
    • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) +

        +
      • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) as a numeric (not a matrix).

      • h_quad_form_mat(): calculates the quadratic form mat %*% center %*% t(mat) as a matrix, the result is square and has dimensions identical to the number of rows in mat.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_reconcile_cov_struct.html b/v0.3.5/reference/h_reconcile_cov_struct.html index 4c4965c7a..118aa618c 100644 --- a/v0.3.5/reference/h_reconcile_cov_struct.html +++ b/v0.3.5/reference/h_reconcile_cov_struct.html @@ -1,5 +1,25 @@ - -Reconcile Possible Covariance Structure Inputs — h_reconcile_cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_reconcile_cov_struct(formula = NULL, covariance = NULL)
    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -128,9 +159,11 @@

    Argumentsas.cov_struct(). If no value is provided, a structure is derived from the provided formula.

    -

    + +
    -

    Value

    +

    Value +

    The value covariance if it's provided or a covariance structure @@ -139,22 +172,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_record_all_output.html b/v0.3.5/reference/h_record_all_output.html index b76846ed9..fceefb612 100644 --- a/v0.3.5/reference/h_record_all_output.html +++ b/v0.3.5/reference/h_record_all_output.html @@ -1,9 +1,29 @@ - - + + + + + +Capture all Output — h_record_all_output • mmrm +Capture all Output — h_record_all_output • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    h_record_all_output(expr, remove = list(), divergence = list())
    -

    Arguments

    -
    expr
    +

    Arguments +

    +
    +
    expr

    (expression)
    to be executed.

    @@ -139,35 +170,44 @@

    Arguments -

    Value

    +

    Value +

    -

    A list containing

    • result: The object returned by expr or list() if an error was thrown.

    • +

      A list containing

      +
        +
      • result: The object returned by expr or list() if an error was thrown.

      • warnings: NULL or a character vector if warnings were thrown.

      • errors: NULL or a string if an error was thrown.

      • messages: NULL or a character vector if messages were produced.

      • divergence: NULL or a character vector if divergence messages were caught.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_residuals_normalized.html b/v0.3.5/reference/h_residuals_normalized.html index 5870f1bba..9e6b2d748 100644 --- a/v0.3.5/reference/h_residuals_normalized.html +++ b/v0.3.5/reference/h_residuals_normalized.html @@ -1,5 +1,25 @@ - -Calculate normalized residuals — h_residuals_normalized • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_normalized(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_residuals_pearson.html b/v0.3.5/reference/h_residuals_pearson.html index 2a4190226..069a3a29b 100644 --- a/v0.3.5/reference/h_residuals_pearson.html +++ b/v0.3.5/reference/h_residuals_pearson.html @@ -1,5 +1,25 @@ - -Calculate Pearson Residuals — h_residuals_pearson • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_pearson(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_residuals_response.html b/v0.3.5/reference/h_residuals_response.html index 66b44e39e..7a841db32 100644 --- a/v0.3.5/reference/h_residuals_response.html +++ b/v0.3.5/reference/h_residuals_response.html @@ -1,5 +1,25 @@ - -Calculate response residuals. — h_residuals_response • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_response(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_split_control.html b/v0.3.5/reference/h_split_control.html index bb382d0a7..a1c7020ec 100644 --- a/v0.3.5/reference/h_split_control.html +++ b/v0.3.5/reference/h_split_control.html @@ -1,7 +1,27 @@ - -Split Control List — h_split_control • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,44 +143,53 @@
    -

    Usage

    +

    Usage +

    h_split_control(control, ...)
    -

    Arguments

    -
    control
    +

    Arguments +

    +
    +
    control

    (mmrm_control)
    object.

    ...

    additional parameters to update the control object.

    -
    + +
    -

    Value

    +

    Value +

    A list of mmrm_control entries.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_summarize_all_fits.html b/v0.3.5/reference/h_summarize_all_fits.html index 5129e22c8..762cbbd29 100644 --- a/v0.3.5/reference/h_summarize_all_fits.html +++ b/v0.3.5/reference/h_summarize_all_fits.html @@ -1,5 +1,25 @@ - -Summarizing List of Fits — h_summarize_all_fits • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_summarize_all_fits(all_fits)
    -

    Arguments

    -
    all_fits
    +

    Arguments +

    +
    +
    all_fits

    (list of mmrm_fit or try-error)
    list of fits.

    -
    + +
    -

    Value

    +

    Value +

    List with warnings, messages, log_liks and converged results.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_tbl_confint_terms.html b/v0.3.5/reference/h_tbl_confint_terms.html index 44e54c309..a9b40c367 100644 --- a/v0.3.5/reference/h_tbl_confint_terms.html +++ b/v0.3.5/reference/h_tbl_confint_terms.html @@ -1,5 +1,25 @@ - -Extract tibble with Confidence Intervals and Term Names — h_tbl_confint_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,44 +140,53 @@
    -

    Usage

    +

    Usage +

    h_tbl_confint_terms(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fit object.

    ...

    passed to stats::confint(), hence not used at the moment.

    -
    + +
    -

    Value

    +

    Value +

    A tibble with term, conf.low, conf.high columns.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_test_1d.html b/v0.3.5/reference/h_test_1d.html index ce0f4de7a..f9efc26fd 100644 --- a/v0.3.5/reference/h_test_1d.html +++ b/v0.3.5/reference/h_test_1d.html @@ -1,7 +1,27 @@ - -Creating T-Statistic Test Results For One-Dimensional Contrast — h_test_1d • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_test_1d(object, contrast, df)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -134,31 +165,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val (2-sided p-value).

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_test_md.html b/v0.3.5/reference/h_test_md.html index d6075df55..c49f7deeb 100644 --- a/v0.3.5/reference/h_test_md.html +++ b/v0.3.5/reference/h_test_md.html @@ -1,7 +1,27 @@ - -Creating F-Statistic Test Results For Multi-Dimensional Contrast — h_test_md • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_test_md(object, contrast, df, f_stat_factor = 1)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -136,31 +167,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_tr.html b/v0.3.5/reference/h_tr.html index 527b6bc72..167522628 100644 --- a/v0.3.5/reference/h_tr.html +++ b/v0.3.5/reference/h_tr.html @@ -1,5 +1,25 @@ - -Trace of a Matrix — h_tr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_tr(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (matrix)
    square matrix input.

    -
    + +
    -

    Value

    +

    Value +

    The trace of the square matrix.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_valid_formula.html b/v0.3.5/reference/h_valid_formula.html index 17444761f..be7cd9558 100644 --- a/v0.3.5/reference/h_valid_formula.html +++ b/v0.3.5/reference/h_valid_formula.html @@ -1,5 +1,25 @@ - -Validate mmrm Formula — h_valid_formula • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,39 +140,48 @@
    -

    Usage

    +

    Usage +

    h_valid_formula(formula)
    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    to check.

    -
    + +
    -

    Details

    +

    Details +

    In mmrm models, . is not allowed as it introduces ambiguity of covariates to be used, so it is not allowed to be in formula.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_var_adj.html b/v0.3.5/reference/h_var_adj.html index 70e8a569c..f1fd4ba40 100644 --- a/v0.3.5/reference/h_var_adj.html +++ b/v0.3.5/reference/h_var_adj.html @@ -1,9 +1,29 @@ - -Obtain the Adjusted Covariance Matrix — h_var_adj • mmrm +Obtain the Adjusted Covariance Matrix — h_var_adj • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    h_var_adj(v, w, p, q, r, linear = FALSE)
    -

    Arguments

    -
    v
    +

    Arguments +

    +
    +
    v

    (matrix)
    unadjusted covariance matrix.

    @@ -147,31 +178,37 @@

    Arguments -

    Value

    +

    Value +

    The matrix of adjusted covariance matrix.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_warn_na_action.html b/v0.3.5/reference/h_warn_na_action.html index ab1e1e2c2..359e1aa7f 100644 --- a/v0.3.5/reference/h_warn_na_action.html +++ b/v0.3.5/reference/h_warn_na_action.html @@ -1,5 +1,25 @@ - -Warn on na.action — h_warn_na_action • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,27 +140,32 @@
    -

    Usage

    +

    Usage +

    h_warn_na_action()
    - + +
    -
    + + - - + + diff --git a/v0.3.5/reference/h_within_or_between.html b/v0.3.5/reference/h_within_or_between.html index cdda6755a..bb75cbf88 100644 --- a/v0.3.5/reference/h_within_or_between.html +++ b/v0.3.5/reference/h_within_or_between.html @@ -1,7 +1,27 @@ - -Determine Within or Between for each Design Matrix Column — h_within_or_between • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,22 +143,27 @@
    -

    Usage

    +

    Usage +

    h_within_or_between(x_matrix, subject_ids)
    -

    Arguments

    -
    x_matrix
    +

    Arguments +

    +
    +
    x_matrix

    (matrix)
    the design matrix with column names.

    subject_ids

    (factor)
    the subject IDs.

    -
    + +
    -

    Value

    +

    Value +

    Character vector with "intercept", "within" or "between" for each @@ -138,22 +171,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/index.html b/v0.3.5/reference/index.html index 2cf2044ab..a1bb45e7b 100644 --- a/v0.3.5/reference/index.html +++ b/v0.3.5/reference/index.html @@ -1,5 +1,23 @@ - -Function reference • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +44,8 @@ + - + + - + @@ -106,189 +132,252 @@
    -

    Package

    +

    Package +

    -
    +
    +
    -
    +
    +
    mmrm-package _PACKAGE
    -
    mmrm Package
    -
    -

    Functions

    +
    +mmrm Package
    + +
    +
    +

    Functions +

    -
    +
    +
    -
    +
    +
    mmrm()
    Fit an MMRM
    -
    +
    +
    +
    fit_mmrm()
    Low-Level Fitting Function for MMRM
    -
    +
    +
    +
    mmrm_control()
    Control Parameters for Fitting an MMRM
    -
    +
    +
    +
    fit_single_optimizer()
    Fitting an MMRM with Single Optimizer
    -
    +
    +
    +
    refit_multiple_optimizers()
    Refitting MMRM with Multiple Optimizers
    -
    +
    +
    +
    df_1d()
    Calculation of Degrees of Freedom for One-Dimensional Contrast
    -
    +
    +
    +
    df_md()
    Calculation of Degrees of Freedom for Multi-Dimensional Contrast
    -
    +
    +
    +
    component()
    Component Access for mmrm_tmb Objects
    -
    -

    Methods

    + +
    +
    +

    Methods +

    -
    +
    +
    -

    Covariance Structures

    + +
    +
    +

    Covariance Structures +

    -
    +
    +
    -
    +
    +
    cov_struct()
    Define a Covariance Structure
    -
    +
    +
    +
    as.cov_struct()
    Coerce into a Covariance Structure Definition
    -
    +
    +
    +
    format(<cov_struct>)
    Format Covariance Structure Object
    -
    +
    +
    +
    print(<cov_struct>)
    Print a Covariance Structure Object
    -
    +
    +
    +
    cov_types()
    Covariance Types
    -
    -

    Estimate Marginal Means

    + +
    +
    +

    Estimate Marginal Means +

    -
    +
    +
    -
    +
    +
    emmeans_support
    -
    Support for emmeans
    -
    -

    Datasets

    +
    Support for emmeans +
    + +
    +
    +

    Datasets +

    -
    +
    +
    -
    +
    +
    fev_data
    Example Data on FEV1
    -
    +
    +
    +
    bcva_data
    Example Data on BCVA
    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.5/reference/is_infix.html b/v0.3.5/reference/is_infix.html index bac6479fa..91f36eabc 100644 --- a/v0.3.5/reference/is_infix.html +++ b/v0.3.5/reference/is_infix.html @@ -1,5 +1,25 @@ - -Test Whether a Symbol is an Infix Operator — is_infix • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,49 +140,62 @@
    -

    Usage

    +

    Usage +

    is_infix(name)
    -

    Arguments

    -
    name
    +

    Arguments +

    +
    +
    name

    (symbol or name or string)
    a possible reference to an infix operator to check.

    -
    + +
    -

    Value

    +

    Value +

    A logical indicating whether the name is the name of an infix operator.

    -

    is_infix(as.name("|"))
    +

    +
    +
    is_infix(as.name("|"))
     is_infix("|")
    -is_infix("c")

    +is_infix("c")
    +

    +
    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/mmrm-package.html b/v0.3.5/reference/mmrm-package.html index f1dca294a..e04b4ac56 100644 --- a/v0.3.5/reference/mmrm-package.html +++ b/v0.3.5/reference/mmrm-package.html @@ -1,5 +1,25 @@ - -mmrm Package — mmrm-package • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -113,15 +142,23 @@
    -

    See also

    -
    -

    Author

    +

    Author +

    Maintainer: Daniel Sabanes Bove daniel.sabanes_bove@roche.com

    -

    Authors:

    + +
    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/mmrm.html b/v0.3.5/reference/mmrm.html index f43c71538..e91e7f854 100644 --- a/v0.3.5/reference/mmrm.html +++ b/v0.3.5/reference/mmrm.html @@ -1,7 +1,27 @@ - -Fit an MMRM — mmrm • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,7 +143,8 @@
    -

    Usage

    +

    Usage +

    mmrm(
       formula,
       data,
    @@ -128,8 +157,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -162,15 +193,18 @@

    Argumentsmmrm_control().

    -

    + +
    -

    Value

    +

    Value +

    An mmrm object.

    -

    Details

    +

    Details +

    The formula typically looks like: FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID) so specifies response and covariates as usual, and exactly one special term @@ -196,15 +230,19 @@

    Detailsmmrm.

    -

    Note

    +

    Note +

    The mmrm object is also an mmrm_fit and an mmrm_tmb object, therefore corresponding methods also work (see mmrm_tmb_methods).

    -

    Additional contents depend on the choice of the adjustment method:

    • If Satterthwaite adjustment is used, the Jacobian information jac_list +

      Additional contents depend on the choice of the adjustment method:

      +
        +
      • If Satterthwaite adjustment is used, the Jacobian information jac_list is included.

      • If Kenward-Roger adjustment is used, kr_comp contains necessary components and beta_vcov_adj includes the adjusted coefficients covariance matrix.

      • -

      Use of the package emmeans is supported, see emmeans_support.

      +
    +

    Use of the package emmeans is supported, see emmeans_support.

    NA values are always omitted regardless of na.action setting.

    When the number of visit levels is large, it usually requires large memory to create the covariance matrix. By default, the maximum allowed visit levels is 100, and if there are more @@ -215,7 +253,8 @@

    Note

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -239,22 +278,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.5/reference/mmrm_control.html b/v0.3.5/reference/mmrm_control.html index c2aff5c46..14a881017 100644 --- a/v0.3.5/reference/mmrm_control.html +++ b/v0.3.5/reference/mmrm_control.html @@ -1,9 +1,29 @@ - - + + + + + +Control Parameters for Fitting an MMRM — mmrm_control • mmrm +Control Parameters for Fitting an MMRM — mmrm_control • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,7 +146,8 @@
    -

    Usage

    +

    Usage +

    mmrm_control(
       n_cores = 1L,
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within"),
    @@ -132,8 +161,10 @@ 

    Usage

    -

    Arguments

    -
    n_cores
    +

    Arguments +

    +
    +
    n_cores

    (count)
    number of cores to be used.

    @@ -167,15 +198,18 @@

    Argumentsh_get_optimizers().

    -

    + +
    -

    Value

    +

    Value +

    List of class mmrm_control with the control parameters.

    -

    Details

    +

    Details +

    For example, if the data only has observations at visits VIS1, VIS3 and VIS4, by default they are treated to be equally spaced, the distance from VIS1 to VIS3, and from VIS3 to VIS4, are identical. However, you can manually convert this visit into a factor, with @@ -183,21 +217,54 @@

    DetailsVIS1 to VIS3 will be double, as VIS2 is a valid visit. However, please be cautious because this can lead to convergence failure when using an unstructured covariance matrix and there are no observations -at the missing visits.

    • The method and vcov arguments specify the degrees of freedom and coefficients -covariance matrix adjustment methods, respectively.

      • Allowed vcov includes: "Asymptotic", "Kenward-Roger", "Kenward-Roger-Linear", "Empirical" (CR0), +at the missing visits.

        +
          +
        • +

          The method and vcov arguments specify the degrees of freedom and coefficients +covariance matrix adjustment methods, respectively.

          +
            +
          • Allowed vcov includes: "Asymptotic", "Kenward-Roger", "Kenward-Roger-Linear", "Empirical" (CR0), "Empirical-Jackknife" (CR2), and "Empirical-Bias-Reduced" (CR3).

          • Allowed method includes: "Satterthwaite", "Kenward-Roger", "Between-Within" and "Residual".

          • If method is "Kenward-Roger" then only "Kenward-Roger" or "Kenward-Roger-Linear" are allowed for vcov.

          • -
        • -
        • The vcov argument can be NULL to use the default covariance method depending on the method -used for degrees of freedom, see the following table:

          methodDefault vcov
          SatterthwaiteAsymptotic
          Kenward-RogerKenward-Roger
          ResidualEmpirical
          Between-WithinAsymptotic
        • +
        +
      • +
      • +

        The vcov argument can be NULL to use the default covariance method depending on the method +used for degrees of freedom, see the following table:

        + + + + + + + + + + + + + + + + + + + + + +
        methodDefault vcov +
        SatterthwaiteAsymptotic
        Kenward-RogerKenward-Roger
        ResidualEmpirical
        Between-WithinAsymptotic
        +
      • Please note that "Kenward-Roger" for "Unstructured" covariance gives different results compared to SAS; Use "Kenward-Roger-Linear" for vcov instead for better matching of the SAS results.

      • -

    + +
    -

    Examples

    +

    Examples +

    mmrm_control(
       optimizer_fun = stats::optim,
       optimizer_args = list(method = "L-BFGS-B")
    @@ -301,22 +368,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.5/reference/mmrm_methods.html b/v0.3.5/reference/mmrm_methods.html index a49ab5703..89c185cea 100644 --- a/v0.3.5/reference/mmrm_methods.html +++ b/v0.3.5/reference/mmrm_methods.html @@ -1,5 +1,25 @@ - -Methods for mmrm Objects — mmrm_methods • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm
     summary(object, ...)
     
    @@ -126,48 +155,65 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the fitted MMRM including Jacobian and call etc.

    ...

    not used.

    -
    + +
    -

    Value

    +

    Value +

    Depends on the method, see Details and Functions.

    -

    Details

    -

    While printing the summary of (mmrm)
    object, the following will be displayed:

    1. Formula. The formula used in the model.

    2. +

      Details +

      +

      While printing the summary of (mmrm)
      object, the following will be displayed:

      +
        +
      1. Formula. The formula used in the model.

      2. Data. The data used for analysis, including number of subjects, number of valid observations.

      3. Covariance. The covariance structure and number of variance parameters.

      4. Method. Restricted maximum likelihood(REML) or maximum likelihood(ML).

      5. Model selection criteria. AIC, BIC, log likelihood and deviance.

      6. Coefficients. Coefficients of the covariates.

      7. -
      8. Covariance estimate. The covariance estimate(for each group).

        1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available +

        2. +

          Covariance estimate. The covariance estimate(for each group).

          +
            +
          1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available in data will be displayed.

          2. If the covariance structure is spatial, the covariance matrix of two time points with unit distance will be displayed.

          3. -
        3. -
    + + + +
    -

    Functions

    +

    Functions +

    -
    • summary(mmrm): summarizes the MMRM fit results.

    • +
        +
      • summary(mmrm): summarizes the MMRM fit results.

      • print(summary.mmrm): prints the MMRM fit summary.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_tmb_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- mmrm(formula, fev_data)
     # Summary:
    @@ -224,22 +270,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.5/reference/mmrm_tidiers.html b/v0.3.5/reference/mmrm_tidiers.html index 3fc932196..b24aaa534 100644 --- a/v0.3.5/reference/mmrm_tidiers.html +++ b/v0.3.5/reference/mmrm_tidiers.html @@ -1,9 +1,29 @@ - - + + + + + +Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm +Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,7 +146,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm
     tidy(x, conf.int = FALSE, conf.level = 0.95, ...)
     
    @@ -137,8 +166,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fitted model.

    @@ -170,21 +201,27 @@

    Argumentsresiduals.mmrm_tmb().

    -

    + +
    -

    Functions

    +

    Functions +

    -
    • tidy(mmrm): derives tidy tibble from an mmrm object.

    • +
        +
      • tidy(mmrm): derives tidy tibble from an mmrm object.

      • glance(mmrm): derives glance tibble from an mmrm object.

      • augment(mmrm): derives augment tibble from an mmrm object.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tmb_methods for additional methods.

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -276,22 +313,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.5/reference/mmrm_tmb_methods.html b/v0.3.5/reference/mmrm_tmb_methods.html index facd681eb..bd4fedd72 100644 --- a/v0.3.5/reference/mmrm_tmb_methods.html +++ b/v0.3.5/reference/mmrm_tmb_methods.html @@ -1,5 +1,25 @@ - -Methods for mmrm_tmb Objects — mmrm_tmb_methods • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm_tmb
     coef(object, complete = TRUE, ...)
     
    @@ -185,8 +214,10 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM object.

    @@ -272,15 +303,18 @@

    Arguments -

    + +
    -

    Value

    +

    Value +

    Depends on the method, see Functions.

    -

    Details

    +

    Details +

    include argument controls the variables the returned model frame will include. Possible options are "response_var", "subject_var", "visit_var" and "group_var", representing the response variable, subject variable, visit variable or group variable. @@ -288,9 +322,11 @@

    Detailsmodel.matrix.

    -

    Functions

    +

    Functions +

    -
    • coef(mmrm_tmb): obtains the estimated coefficients.

    • +
        +
      • coef(mmrm_tmb): obtains the estimated coefficients.

      • fitted(mmrm_tmb): obtains the fitted values.

      • predict(mmrm_tmb): predict conditional means for new data; optionally with standard errors and confidence or prediction intervals. @@ -324,11 +360,14 @@

        Functions -

        References

        +

        References +

        -
        • Hurvich CM, Tsai C (1989). +

          • Gałecki A, Burzykowski T (2013). +

          +
            +
          • Gałecki A, Burzykowski T (2013). “Linear mixed-effects model.” In Linear mixed-effects models using R, 245--273. Springer.

          • -
    + +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- fit_mmrm(formula, fev_data, weights = rep(1, nrow(fev_data)))
     # Estimated coefficients:
    @@ -3863,22 +3907,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.5/reference/parsnip_add_mmrm.html b/v0.3.5/reference/parsnip_add_mmrm.html index 7fa5a28e4..0ad00aee5 100644 --- a/v0.3.5/reference/parsnip_add_mmrm.html +++ b/v0.3.5/reference/parsnip_add_mmrm.html @@ -1,5 +1,25 @@ - -Register mmrm For Use With tidymodels — parsnip_add_mmrm • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -112,45 +141,55 @@
    -

    Usage

    +

    Usage +

    parsnip_add_mmrm(quietly = FALSE)
    -

    Arguments

    -
    quietly
    +

    Arguments +

    +
    +
    quietly

    logical: should progress and error messages be suppressed?

    -
    + +
    -

    Value

    +

    Value +

    A logical value indicating whether registration was successful.

    -

    Details

    +

    Details +

    We can use parsnip::show_model_info("linear_reg") to check the registration with parsnip and thus the wider tidymodels ecosystem.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/position_symbol.html b/v0.3.5/reference/position_symbol.html index 6156ed0be..35867b792 100644 --- a/v0.3.5/reference/position_symbol.html +++ b/v0.3.5/reference/position_symbol.html @@ -1,9 +1,29 @@ - - + + + + + +Search For the Position of a Symbol — position_symbol • mmrm +Search For the Position of a Symbol — position_symbol • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    position_symbol(x, sym, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (list of language)
    a list of language objects in which to search for a specific symbol.

    @@ -137,9 +168,11 @@

    ArgumentsPosition().

    -

    + +
    -

    Value

    +

    Value +

    The position of the symbol if found, or the nomatch value @@ -147,22 +180,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/print.cov_struct.html b/v0.3.5/reference/print.cov_struct.html index d4f5bbcd6..c1de0f53a 100644 --- a/v0.3.5/reference/print.cov_struct.html +++ b/v0.3.5/reference/print.cov_struct.html @@ -1,5 +1,25 @@ - -Print a Covariance Structure Object — print.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,45 +140,54 @@
    -

    Usage

    +

    Usage +

    # S3 method for cov_struct
     print(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    ...

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    x invisibly.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/reexports.html b/v0.3.5/reference/reexports.html index 007d6a11a..4420137ed 100644 --- a/v0.3.5/reference/reexports.html +++ b/v0.3.5/reference/reexports.html @@ -1,19 +1,39 @@ - - + + + + + +Objects exported from other packages — reexports • mmrm +Objects exported from other packages — reexports • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -38,7 +60,8 @@ + - + + - + @@ -124,30 +152,36 @@

    These objects are imported from other packages. Follow the links below to see their documentation.

    -
    generics
    +
    +
    generics

    augment, glance, tidy

    -
    + + - + +
    -
    + + - - + + diff --git a/v0.3.5/reference/refit_multiple_optimizers.html b/v0.3.5/reference/refit_multiple_optimizers.html index eb11320fe..da63ddad9 100644 --- a/v0.3.5/reference/refit_multiple_optimizers.html +++ b/v0.3.5/reference/refit_multiple_optimizers.html @@ -1,5 +1,25 @@ - -Refitting MMRM with Multiple Optimizers — refit_multiple_optimizers • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    refit_multiple_optimizers(fit, ..., control = mmrm_control(...))
    -

    Arguments

    -
    fit
    +

    Arguments +

    +
    +
    fit

    (mmrm_fit)
    original model fit from fit_single_optimizer().

    @@ -129,20 +160,24 @@

    Arguments -

    Value

    +

    Value +

    The best (in terms of log likelihood) fit which converged.

    -

    Note

    +

    Note +

    For Windows, no parallel computations are currently implemented.

    -

    Examples

    +

    Examples +

    fit <- fit_single_optimizer(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data,
    @@ -153,22 +188,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.5/reference/register_on_load.html b/v0.3.5/reference/register_on_load.html index 9b6e9b260..248cd8c0b 100644 --- a/v0.3.5/reference/register_on_load.html +++ b/v0.3.5/reference/register_on_load.html @@ -1,5 +1,25 @@ - -Helper Function for Registering Functionality With Suggests Packages — register_on_load • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    register_on_load(
       pkg,
       ver = c(NA_character_, NA_character_),
    @@ -122,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    pkg
    +

    Arguments +

    +
    +
    pkg

    (string)
    package name.

    @@ -144,9 +175,11 @@

    Arguments -

    Value

    +

    Value +

    A logical (invisibly) indicating whether registration was successful. @@ -154,22 +187,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/tmb_cov_type.html b/v0.3.5/reference/tmb_cov_type.html index de2f88833..5618bcaed 100644 --- a/v0.3.5/reference/tmb_cov_type.html +++ b/v0.3.5/reference/tmb_cov_type.html @@ -1,5 +1,25 @@ - -Produce A Covariance Identifier Passing to TMB — tmb_cov_type • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    tmb_cov_type(cov)
    -

    Arguments

    -
    cov
    +

    Arguments +

    +
    +
    cov

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    A string used for method dispatch when passed to TMB.

    + +
    -
    + + - - + + diff --git a/v0.3.5/reference/validate_cov_struct.html b/v0.3.5/reference/validate_cov_struct.html index 070822104..246c59efa 100644 --- a/v0.3.5/reference/validate_cov_struct.html +++ b/v0.3.5/reference/validate_cov_struct.html @@ -1,5 +1,25 @@ - -Validate Covariance Structure Data — validate_cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    validate_cov_struct(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    x if successful, or an error is thrown otherwise.

    + +
    -
    + + - - + + diff --git a/v0.3.6/404.html b/v0.3.6/404.html index e791ecb59..150390d86 100644 --- a/v0.3.6/404.html +++ b/v0.3.6/404.html @@ -1,5 +1,4 @@ - - + @@ -81,11 +80,10 @@ Changelog +v0.2.2 + + - + + - + @@ -110,46 +136,66 @@

    Thank you for your interest in contributing to this repo! Your contribution is highly valued. Please go through this document for guidance on how to contribute.

    -

    Programming conventions

    +

    Programming conventions +

    Please follow the programming conventions to ensure a consistent programming style across the package.

    Generally we follow the tidyverse style guide. Some specific conventions that deviate from this are explained below.

    -

    Functions

    -
    1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
    2. +

      Functions +

      +
        +
      1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
      2. Functions starting with h_ are helper functions and they should not be exported.
      3. Functions should be well documented using roxygen2 (even when they are not exported).
      4. Functions must be unit tested (even when they are not exported).
      5. -
    + +
    -

    Imports

    +

    Imports +

    In package mmrm, we follow the following convention in package imports.

    -
    1. When only a few functions from another package are needed: -
      1. In DESCRIPTION, add that package into Imports.
      2. +
          +
        1. When only a few functions from another package are needed: +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we add a importFrom with a single function from the package. -
            1. The function imported can be any random function within the package.
            2. -
          3. +
              +
            1. The function imported can be any random function within the package.
            2. +
            +
          4. Always use package::function style wherever you need to use the function.
          5. Example: stats.
          6. -
        2. +
        +
      3. When many functions from another package are needed: -
        1. In DESCRIPTION, add that package into Imports.
        2. +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we use a import to import every function.
          3. Use the functions directly without prefix.
          4. Example: checkmate.
          5. -
          -
    + + + +
    -

    Comments

    -
    • Comments should always follow sentence style.
    • +

      Comments +

      +
        +
      • Comments should always follow sentence style.
      • Comments should be as minimal as possible: Generally the code and variable names should be clear enough to not need any comments. Only use them when needed and explain the “Why” and not the “What”.
      • -
    + +
    -

    Documentation

    -
    • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

    • +

      Documentation +

      +
        +
      • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

      • Exported objects must have a lifecycle badge to clarify the maturity.

        -
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • -
      • +
          +
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • +
        +
      • Use Title Style for the title of the documentation.

      • Always include a @description part with at least one sentence describing the object.

      • @@ -161,38 +207,55 @@

        Documentationwebsite.

      • In vignettes, you cannot directly reference help pages but only pkgdown web pages. Note that this includes only exported objects. To make it look similar to the help page references, please here also use function() style.

      • mmrm_review_methods.Rmd is a large vignette and we precompute this vignette to make the GitHub actions faster. Run the script vignettes/precompile.R to regenerate the precomputed vignette and subsequently update it in GitHub. Before every release we need to run this again. Please note you need to install the package and then compile the vignette because efficiency is better after installation to provide a fair comparison.

      • -
    + +
    -

    Github conventions

    +

    Github conventions +

    When using GitHub to collaborate, the following conventions are needed:

    -
    1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. -
      • If you are going to work on this issue, please assign yourself.
      • -
    2. +
        +
      1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. +
          +
        • If you are going to work on this issue, please assign yourself.
        • +
        +
      2. Please create a branch in the mmrm repository, instead of creating forks, unless you are not yet a team member. -
        • Branches should be associated with a GitHub issue and linked to an issue id.
        • +
            +
          • Branches should be associated with a GitHub issue and linked to an issue id.
          • The name of a branch should be of the form: <issue_id>_<short_discription>.
          • -
          +
        +
      3. Add changes to the branch and push it to GitHub. -
        • Please use clear commit messages.
        • +
            +
          • Please use clear commit messages.
          • Please keep your changes focused on the issue. If there are independent changes, please separate it into another PR linking to another issue.
          • -
          +
        +
      4. Please create a Pull Request when you think your code changes are ready: -
        • Functions are well documented.
        • +
            +
          • Functions are well documented.
          • Functions have corresponding unit tests.
          • Changes pass all the GitHub action checks.
          • The checklist in the corresponding issue is completed.
          • -
          +
        +
      5. Address all the comments you receive. -
        • at least one approval is needed to merge.
        • -
      6. -
    +
      +
    • at least one approval is needed to merge.
    • +
    + + +
    -

    Contribution tips

    +

    Contribution tips +

    -

    Development environment Set-up

    +

    Development environment Set-up +

    The development this mmrm package is based on the latest R version and C++ compilers. The package dependencies are the most recent versions from CRAN. We recommend that your working environment is set up in the same way. Additionally, there are some tools we recommend you to install:

    -
    1. +
        +
      1. RTools if you work on a Windows operating system. Alternatively you can use docker to separate the operating system and the development system.
      2. GitKraken is a very useful user interface for git including visualization of git commit graphs, file history, etc.
      3. @@ -200,43 +263,82 @@

        Development environment Set-uplintr will allow you to perform static code analysis.
      4. pre-commit is a Python module that allows you to identify issues before you commit locally.
      5. -

    + +
    -

    Issue labels

    +

    Issue labels +

    The issues are categorized with several labels:

    - +
    Label name
    ++++ + + - + + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + -
    Label name Description
    SPx
    SPx SP (story points) indicate complexity, and the larger the subsequent number, the more time consuming the issue is expected to be
    priority
    priority Issues with this label should be completed with higher priority
    good first issue
    good first issue Good choices for new team members
    blocked
    blocked Blocked by other issues
    bug
    bug Something isn’t working
    devops
    devops Development and Operation
    discussion
    discussion Discussion needed
    documentation
    documentation Improvement of documentation is needed
    duplicate
    duplicate The issue already exists
    enhancement
    enhancement New feature or request
    help wanted
    help wanted Extra attention is needed
    invalid
    invalid This doesn’t seem right
    question
    question Further information needed

    Please choose an issue based on your interest, issue complexity, and priority.

    + + + +

    Please choose an issue based on your interest, issue complexity, and priority.

    -

    Add new unit tests

    +

    Add new unit tests +

    To add a new unit test, you need to first identify the test scope. Does the test fit in the scope of existing tests? If so, please modify the existing test files under tests/testthat/ folder or src/ folder, depending on whether the code to be tested is R or C++. Otherwise please create a new test file, with a name prefix of “test-”.

    In each test case, use the following structure:

    @@ -249,19 +351,25 @@ 

    Add new unit tests -

    Add integration tests

    +

    Add integration tests +

    Integration tests compare the results of SAS and R and assures the quality of our code. To add an integration test, you need to do the following:

    -
    1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
    2. +
        +
      1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
      2. Save the results in .txt format in the design/SAS/ folder.
      3. Decide the key outputs that are needed for comparison.
      4. Add a unit test verifying that the R implementation of the same model has the same results (conversion may be needed).
      5. -
    + +
    -

    Get started with C++

    +

    Get started with C++ +

    If you have no experience with C++, it is totally fine: TMB has provided us with many high-level functionalities that is very similar to R. Here we only list the most important things that you need to go through before you begin C++ programming.

    -
    1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
    2. +
        +
      1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
      2. Types. C++ is a strong type programming language and all objects need to be declared with type. Sometimes you can combine the declaration and definition. -
        1. +
            +
          1. int i = 1; This works, as we declare i as int and define it to be 1.
          2. i = 1; This fails, because i is not declared yet.
          3. @@ -269,53 +377,70 @@

            Get started with C++
          4. in R, if (TRUE) { a = '123' }; print(a) is legal.
          5. +
              +
            1. in R, if (TRUE) { a = '123' }; print(a) is legal.
            2. in C++, if (1) {string a = '123'}; std::stdout << a << std::endl; is illegal, because object a is terminated already.
            3. in C++, string a; if (1) {a = '123'}; std::stdout << a << std::endl; is legal, a is declared prior to if statement.
            4. -
            +

          +
        2. Polymorphism. Unlike in R, where function arguments have no explicitly defined types, in C++ the type of each argument of a function must be pre-specified. -
          1. +
              +
            1. Template is a special function that works with generic argument type. We could imagine a single function that could work on arguments of arbitrary type, and template functions make this possible through separation of function logic from the argument declaration. In this way we can use template functions and avoid the need to replicate the whole code for each type.
            2. -
          2. -

          With these points in mind, you are about ready to go.

          +
        +
      3. +
      +

      With these points in mind, you are about ready to go.

    -

    Get started with TMB

    +

    Get started with TMB +

    In mmrm we are not including any latent variables and so the Laplace approximation aspect of TMB is not used. We only use the automatic differentiation part of TMB. For detailed documentation of TMB, visit the TMB reference.

    One important feature of TMB are the R style matrix/array calculations. This is important because we mainly use this part to conduct our calculations. See matrix_arrays.cpp for examples.

    -

    Add a new covariance structure

    +

    Add a new covariance structure +

    To add a new covariance structure, you need to do the following:

    -
    1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
    2. +
        +
      1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
      2. Implement the covariance structure on the C++ side and the corresponding R interface.
      3. Add unit tests to make sure the new covariance structure is working as expected.
      4. Add integration tests under design/SAS/ folder to make sure SAS and R produce similar results (within tolerance).
      5. -
    + +
    -

    Add additional data

    +

    Add additional data +

    To add additional data to mmrm, please follow the next steps:

    -
    1. Make sure the data is needed.
    2. +
        +
      1. Make sure the data is needed.
      2. Document the data in R/data.R.
      3. Use save to create an rda data only containing this dataset. Here the function usethis::use_data can also be helpful.
      4. -
    + +
    -

    Communications within team

    +

    Communications within team +

    There are several communication channels, please use appropriate ones.

    -

    GitHub

    +

    GitHub +

    GitHub issues and pull requests are where implementations are discussed and reviewed. Feature requests, bugs, enhancements, technical implementations can be discussed here. When you have ideas that needs to be documented, it is better to have them in GitHub.

    -

    Slack

    +

    Slack +

    Slack is a messaging tool and we have the mmrm channel under the rinpharma space. You can put anything in the slack channel, e.g., you have completed a issue and are waiting for review, or you have some questions and don’t want to wait until the next stand-up meeting.

    To join the slack channel, please make sure you have a slack account, and send the email address to any team member.

    -

    Stand-up meetings

    +

    Stand-up meetings +

    We have stand-up meetings currently three times a week. The purpose of stand-up meetings is for team members to discuss the current work progress and raise any issue/questions for team discussion if needed.

    You don’t need to join all three meetings.

    @@ -323,22 +448,26 @@

    Stand-up meetings

    + + + + - - + + diff --git a/v0.3.6/PULL_REQUEST_TEMPLATE.html b/v0.3.6/PULL_REQUEST_TEMPLATE.html index 5af298964..8b5358dd4 100644 --- a/v0.3.6/PULL_REQUEST_TEMPLATE.html +++ b/v0.3.6/PULL_REQUEST_TEMPLATE.html @@ -1,5 +1,23 @@ - -Description • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +44,8 @@ + - + + - + @@ -111,22 +137,26 @@ - + +
    -
    + + - - + + diff --git a/v0.3.6/articles/algorithm.html b/v0.3.6/articles/algorithm.html index b43dfb174..5fab9d72d 100644 --- a/v0.3.6/articles/algorithm.html +++ b/v0.3.6/articles/algorithm.html @@ -1,5 +1,4 @@ - - + @@ -83,11 +82,10 @@ Changelog +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + - + + - + @@ -109,73 +135,101 @@

    Introduction

    -
    Package Introduction
    +
    +
    Package Introduction
    -
    Mixed Models for Repeated Measures
    + +
    Mixed Models for Repeated Measures
    -
    Comparison with other software
    + +
    Comparison with other software
    -
    + +
    +

    Covariance Structures

    -
    Covariance Structures
    +
    +
    Covariance Structures
    -
    + + + + + + + + + + + + + + + + +
    -
    + + - - + + diff --git a/v0.3.6/articles/introduction.html b/v0.3.6/articles/introduction.html index 522a11e6f..4ff135a05 100644 --- a/v0.3.6/articles/introduction.html +++ b/v0.3.6/articles/introduction.html @@ -1,5 +1,4 @@ - - + @@ -83,11 +82,10 @@ Changelog +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + - + + - + @@ -108,7 +134,8 @@

    Authors

    -
    • +
        +
      • Daniel Sabanes Bove. Author, maintainer.

      • @@ -180,7 +207,8 @@

        Authors

        AstraZeneca plc. Copyright holder, funder.

        -
    + +

    Citation

    @@ -199,22 +227,26 @@

    Citation

    }
    + +
    -
    + + - - + + diff --git a/v0.3.6/index.html b/v0.3.6/index.html index 9f252e442..bad1500f7 100644 --- a/v0.3.6/index.html +++ b/v0.3.6/index.html @@ -1,5 +1,4 @@ - - + @@ -107,11 +106,10 @@ Changelog +v0.2.2 + + - + + - + @@ -107,10 +133,13 @@
    -

    mmrm 0.3.6

    +

    mmrm 0.3.6 +

    -

    New Features

    -
    • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
    • +

      New Features +

      +
        +
      • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
      • Add empirical, empirical Jackknife and empirical bias-reduced adjusted coefficients covariance estimates, which can be specified via the new vcov argument of mmrm().
      • Add residual and between-within degrees of freedom methods.
      • Add Kenward-Roger support for spatial covariance structures.
      • @@ -121,76 +150,105 @@

        New FeaturesAdd tidy(), glance() and augment() methods to tidy the fit results into summary tables.
      • Add tidymodels framework support via a parsnip interface.
      • Add argument covariance to mmrm() to allow for easier programmatic access to specifying the model’s covariance structure and to expose covariance customization through the tidymodels interface.
      • -

    + +
    -

    Bug Fixes

    -
    • Previously mmrm() follows the global option na.action and if it is set other than "na.omit" an assertion would fail. This is now fixed and hence NA values are always removed prior to model fitting, independent of the global na.action option.
    • +

      Bug Fixes +

      +
        +
      • Previously mmrm() follows the global option na.action and if it is set other than "na.omit" an assertion would fail. This is now fixed and hence NA values are always removed prior to model fitting, independent of the global na.action option.
      • Previously a model.frame() call on an mmrm object with transformed terms, or new data, e.g. model.frame(mmrm(Y ~ log(X) + ar1(VISIT|ID), data = new_data), would fail. This is now fixed.
      • Previously mmrm() always required a data argument. Now fitting mmrm can also use environment variables instead of requiring data argument. (Note that fit_mmrm is not affected.)
      • Previously emmeans() failed when using transformed terms or not including the visit variable in the model formula. This is now fixed.
      • Previously mmrm() might provide non-finite values in the Jacobian calculations, leading to errors in the Satterthwaite degrees of freedom calculations. This will raise an error now and thus alert the user that the model fit was not successful.
      • -
    + +
    -

    Miscellaneous

    -
    • Use automatic differentiation to calculate Satterthwaite adjusted degrees of freedom, resulting in 10-fold speed-up of the Satterthwaite calculations after the initial model fit.
    • +

      Miscellaneous +

      +
        +
      • Use automatic differentiation to calculate Satterthwaite adjusted degrees of freedom, resulting in 10-fold speed-up of the Satterthwaite calculations after the initial model fit.
      • Add an interactive confirmation step if the number of visit levels is too large for non-spatial covariance structures. Use options(mmrm.max_visits = ) to specify the maximum number of visits allowed in non-interactive mode.
      • Removed free_cores() in favor of parallelly::availableCores(omit = 1).
      • The model.frame() method has been updated: The full argument is deprecated and the include argument can be used instead; by default all relevant variables are returned. Furthermore, it returns a data.frame the size of the number of observations utilized in the model for all combinations of the include argument when na.action= "na.omit".
      • Overall, seven vignettes have been added to the package. All vignettes have a slightly different look now to reduce the size of the overall R package on CRAN.
      • The used optimizer is now available via component(., "optimizer") instead of previously attr(., "optimizer").
      • -
    + +
    -

    mmrm 0.2.2

    CRAN release: 2022-12-20

    +

    mmrm 0.2.2 +

    +

    CRAN release: 2022-12-20

    -

    New Features

    -
    • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
    • +

      New Features +

      +
        +
      • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
      • Update the mmrm arguments to allow users more fine-grained control, e.g. mmrm(..., start = start, optimizer = c("BFGS", "nlminb")) to set the starting values for the variance estimates and to choose the available optimizers. These arguments will be passed to the new function mmrm_control.
      • Add new argument drop_visit_levels to allow users to keep all levels in visits, even when they are not observed in the data. Dropping unobserved levels was done silently previously, and now a message will be given. See ?mmrm_control for more details.
      • -
    + +
    -

    Bug Fixes

    -
    • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
    • +

      Bug Fixes +

      +
        +
      • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
      • Previously in mmrm calls, the weights object in the environment where the formula is defined was replaced by the weights used internally. Now this behavior is removed and your variable weights e.g. in the global environment will no longer be replaced.
      • -
    + +
    -

    Miscellaneous

    -
    • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
    • +

      Miscellaneous +

      +
        +
      • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
      • Deprecated optimizer = "automatic" in favor of not specifying the optimizer. By default, all remaining optimizers will be tried if the first optimizer fails to reach convergence.
      • -
    + +
    -

    mmrm 0.1.5

    CRAN release: 2022-10-18

    -
    • First CRAN version of the package.
    • +

      mmrm 0.1.5 +

      +

      CRAN release: 2022-10-18

      +
        +
      • First CRAN version of the package.
      • The package fits mixed models for repeated measures (MMRM) based on the marginal linear model without random effects.
      • The motivation for this package is to have a fast, reliable (in terms of convergence behavior) and feature complete implementation of MMRM in R.
      • -
      -

      New Features

      -
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • +
      +
      +

      New Features +

      +
        +
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • Fast C++ implementation of Maximum Likelihood (ML) and Restricted Maximum Likelihood (REML) estimation.
      • Currently Satterthwaite adjusted degrees of freedom calculation is supported.
      • Interface to the emmeans package for computing estimated marginal means (also called least-square means) for the coefficients.
      • Multiple optimizers are run to reach convergence in as many cases as possible.
      • Flexible formula based model specification and support for standard S3 methods such as summary, logLik, etc.
      • -
      +
    +
    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/COV_TYPES.html b/v0.3.6/reference/COV_TYPES.html index f902df8c6..2ccd2b888 100644 --- a/v0.3.6/reference/COV_TYPES.html +++ b/v0.3.6/reference/COV_TYPES.html @@ -1,5 +1,25 @@ - -Covariance Type Database — COV_TYPES • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,14 +140,17 @@
    -

    Usage

    +

    Usage +

    COV_TYPES
    -

    Format

    +

    Format +

    A data frame with 5 variables and one record per covariance type:

    -
    name
    +
    +
    name

    The long-form name of the covariance structure type

    abbr
    @@ -138,25 +169,30 @@

    Format<

    A logical value indicating whether the covariance structure is spatial.

    -

    + + + +
    -
    + + - - + + diff --git a/v0.3.6/reference/as.cov_struct.html b/v0.3.6/reference/as.cov_struct.html index ec1e55bd8..ffd54457b 100644 --- a/v0.3.6/reference/as.cov_struct.html +++ b/v0.3.6/reference/as.cov_struct.html @@ -1,5 +1,25 @@ - -Coerce into a Covariance Structure Definition — as.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    as.cov_struct(x, ...)
     
     # S3 method for formula
    @@ -120,8 +149,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    an object from which to derive a covariance structure. See object specific sections for details.

    @@ -134,44 +165,66 @@

    Arguments -

    Value

    +

    Value +

    A cov_struct() object.

    -

    Details

    +

    Details +

    A covariance structure can be parsed from a model definition formula or call. Generally, covariance structures defined using non-standard evaluation take the following form:

    -

    type( (visit, )* visit | (group /)? subject )

    +

    +
    +
    type( (visit, )* visit | (group /)? subject )
    +

    +

    For example, formulas may include terms such as

    -

    us(time | subject)
    +

    +
    +
    us(time | subject)
     cp(time | group / subject)
    -sp_exp(coord1, coord2 | group / subject)

    +sp_exp(coord1, coord2 | group / subject)
    +

    +

    Note that only sp_exp (spatial) covariance structures may provide multiple coordinates, which identify the Euclidean distance between the time points.

    -

    Methods (by class)

    +

    Methods (by class) +

    -
    • as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be +

        +
      • +

        as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be covariance structure definitions and must follow the form:

        -

        y ~ xs + type( (visit, )* visit | (group /)? subject )

        +

        +
        +
        y ~ xs + type( (visit, )* visit | (group /)? subject )
        +

        +

        Any component on the right hand side of a formula is considered when -searching for a covariance definition.

      • -
    +searching for a covariance definition.

    + + +
    -

    See also

    +

    See also +

    Other covariance types: cov_struct(), covariance_types

    -

    Examples

    +

    Examples +

    # provide a covariance structure as a right-sided formula
     as.cov_struct(~ csh(visit | group / subject))
     #> <covariance structure>
    @@ -191,22 +244,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.6/reference/bcva_data.html b/v0.3.6/reference/bcva_data.html index f64577aa6..307c0a635 100644 --- a/v0.3.6/reference/bcva_data.html +++ b/v0.3.6/reference/bcva_data.html @@ -1,5 +1,25 @@ - -Example Data on BCVA — bcva_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,48 +140,59 @@
    -

    Usage

    +

    Usage +

    bcva_data
    -

    Format

    -

    A tibble with 10,000 rows and 7 variables:

    • USUBJID: subject ID.

    • +

      Format +

      +

      A tibble with 10,000 rows and 7 variables:

      +
        +
      • USUBJID: subject ID.

      • VISITN: visit number (numeric).

      • AVISIT: visit number (factor).

      • ARMCD: treatment, TRT or CTL.

      • RACE: 3-category race.

      • BCVA_BL: BCVA at baseline.

      • BCVA_CHG: Change in BCVA at study visits.

      • -
    + +
    -

    Source

    +

    Source +

    This is an artificial dataset.

    -

    Note

    +

    Note +

    Measurements of BCVA (best corrected visual acuity) is a measure of how how many letters a person can read off of an eye chart using corrective lenses or contacts. This a common endpoint in ophthalmology trials.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/cached_mmrm_results.html b/v0.3.6/reference/cached_mmrm_results.html index 613cc226c..a446a66d9 100644 --- a/v0.3.6/reference/cached_mmrm_results.html +++ b/v0.3.6/reference/cached_mmrm_results.html @@ -1,5 +1,25 @@ - -Cache Data for mmrm Model Comparison — cached_mmrm_results • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,25 +140,32 @@
    -

    Usage

    +

    Usage +

    cached_mmrm_results
    -

    Format

    -

    A list with following elements:

    • conv_time_fev: Convergence time on FEV data.

    • +

      Format +

      +

      A list with following elements:

      +
        +
      • conv_time_fev: Convergence time on FEV data.

      • conv_time_bcva: Convergence time on BCVA data.

      • rel_diff_ests_tbl_fev: Relative difference in estimates on FEV data.

      • rel_diff_ests_tbl_bcva: Relative difference in estimates on BCVA data.

      • conv_rate: Convergence rate on data with different missing levels.

      • df_missingness: Summary of missingness on simulated data.

      • -
    + +
    -

    Source

    +

    Source +

    This is created based on simulations on FEV data and BCVA data.

    -

    Note

    +

    Note +

    The cached data for comparison is used for the vignettes generation. Please make sure that this data is refreshed before each package release by running the script data-raw/mmrm_review.R. @@ -139,22 +174,26 @@

    Note

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/check_package_version.html b/v0.3.6/reference/check_package_version.html index 86961f865..ac9116ead 100644 --- a/v0.3.6/reference/check_package_version.html +++ b/v0.3.6/reference/check_package_version.html @@ -1,5 +1,25 @@ - -Check Suggested Dependency Against Version Requirements — check_package_version • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    check_package_version(pkg, ver = c(NA_character_, NA_character_))
    -

    Arguments

    -
    pkg
    +

    Arguments +

    +
    +
    pkg

    (string)
    package name.

    @@ -128,9 +159,11 @@

    Arguments -

    Value

    +

    Value +

    A logical (invisibly) indicating whether the loaded package meets @@ -138,22 +171,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/component.html b/v0.3.6/reference/component.html index 724115bac..83bff74fa 100644 --- a/v0.3.6/reference/component.html +++ b/v0.3.6/reference/component.html @@ -1,5 +1,25 @@ - -Component Access for mmrm_tmb Objects — component • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    component(
       object,
       name = c("cov_type", "subject_var", "n_theta", "n_subjects", "n_timepoints", "n_obs",
    @@ -124,24 +153,31 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    name

    (character)
    the component(s) to be retrieved.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding component of the object, see details.

    -

    Details

    -

    Available component() names are as follows:

    • call: low-level function call which generated the model.

    • +

      Details +

      +

      Available component() names are as follows:

      +
    + +
    -

    See also

    +

    See also +

    In the lme4 package there is a similar function getME().

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -3082,22 +3121,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.6/reference/cov_struct.html b/v0.3.6/reference/cov_struct.html index 3efa78857..7d4a61968 100644 --- a/v0.3.6/reference/cov_struct.html +++ b/v0.3.6/reference/cov_struct.html @@ -1,5 +1,25 @@ - -Define a Covariance Structure — cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    cov_struct(
       type = cov_types(),
       visits,
    @@ -123,8 +152,10 @@ 

    Usage

    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    the name of the covariance structure type to use. For available options, see cov_types(). If a type abbreviation is used that implies heterogeneity (e.g. cph) and no value is provided to @@ -150,22 +181,26 @@

    Arguments -

    Value

    +

    Value +

    A cov_struct object.

    -

    See also

    +

    See also +

    Other covariance types: as.cov_struct(), covariance_types

    -

    Examples

    +

    Examples +

    cov_struct("csh", "AVISITN", "USUBJID")
     #> <covariance structure>
     #> heterogeneous compound symmetry:
    @@ -182,22 +217,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.6/reference/cov_type_abbr.html b/v0.3.6/reference/cov_type_abbr.html index c8958d806..bf7c674e1 100644 --- a/v0.3.6/reference/cov_type_abbr.html +++ b/v0.3.6/reference/cov_type_abbr.html @@ -1,5 +1,25 @@ - -Retrieve Associated Abbreviated Covariance Structure Type Name — cov_type_abbr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    cov_type_abbr(type)
    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    either a full name or abbreviate covariance structure type name to collapse into an abbreviated type.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding abbreviated covariance type name.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/cov_type_name.html b/v0.3.6/reference/cov_type_name.html index 52006c45e..faa1d2110 100644 --- a/v0.3.6/reference/cov_type_name.html +++ b/v0.3.6/reference/cov_type_name.html @@ -1,5 +1,25 @@ - -Retrieve Associated Full Covariance Structure Type Name — cov_type_name • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    cov_type_name(type)
    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    either a full name or abbreviate covariance structure type name to convert to a long-form type.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding abbreviated covariance type name.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/covariance_types.html b/v0.3.6/reference/covariance_types.html index 59f2012b6..690ea8f01 100644 --- a/v0.3.6/reference/covariance_types.html +++ b/v0.3.6/reference/covariance_types.html @@ -1,5 +1,25 @@ - -Covariance Types — covariance_types • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    cov_types(
       form = c("name", "abbr", "habbr"),
       filter = c("heterogeneous", "spatial")
    @@ -120,8 +149,10 @@ 

    Usage

    -

    Arguments

    -
    form
    +

    Arguments +

    +
    +
    form

    (character)
    covariance structure type name form. One or more of "name", "abbr" (abbreviation), or "habbr" (heterogeneous abbreviation).

    @@ -131,67 +162,155 @@

    Arguments or "spatial".

    -

    + +
    -

    Value

    +

    Value +

    A character vector of accepted covariance structure type names and abbreviations.

    -

    Note

    +

    Note +

    The ante-dependence covariance structure in this package refers to homogeneous ante-dependence, while the ante-dependence covariance structure from SAS PROC MIXED refers to heterogeneous ante-dependence and the homogeneous version is not available in SAS.

    For all non-spatial covariance structures, the time variable must -be coded as a factor.

    -

    Spatial Covariance structures:

    +be coded as a factor.

    +
    +

    Spatial Covariance structures: +

    -
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)

    where \(d_{ij}\) denotes the Euclidean distance between time points + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)
    +

    where \(d_{ij}\) denotes the Euclidean distance between time points \(i\) and \(j\).

    -

    Abbreviations for Covariance Structures

    +

    Abbreviations for Covariance Structures +

    -

    Common Covariance Structures:

    +

    Common Covariance Structures: +

    -
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)
    +

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, respectively, out of total \(m\) time points, \(1 \leq i, j \leq m\).

    -

    See also

    +

    See also +

    Other covariance types: as.cov_struct(), cov_struct()

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/df_1d.html b/v0.3.6/reference/df_1d.html index c2e1b9d59..3ae0fc347 100644 --- a/v0.3.6/reference/df_1d.html +++ b/v0.3.6/reference/df_1d.html @@ -1,9 +1,29 @@ - - + + + + + +Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm +Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    df_1d(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -133,16 +164,19 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -168,22 +202,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.6/reference/df_md.html b/v0.3.6/reference/df_md.html index ce859e08c..eee61dd64 100644 --- a/v0.3.6/reference/df_md.html +++ b/v0.3.6/reference/df_md.html @@ -1,11 +1,31 @@ - - + + + + + +Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm +Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -121,13 +149,16 @@
    -

    Usage

    +

    Usage +

    df_md(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -137,16 +168,19 @@

    Arguments -

    Value

    +

    Value +

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

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -169,22 +203,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.6/reference/drop_elements.html b/v0.3.6/reference/drop_elements.html index 3dea56ba3..182cf1db7 100644 --- a/v0.3.6/reference/drop_elements.html +++ b/v0.3.6/reference/drop_elements.html @@ -1,5 +1,25 @@ - -Drop Items from an Indexible — drop_elements • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    drop_elements(x, n)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    Any object that can be consumed by seq_along() and indexed by a logical vector of the same length.

    @@ -126,31 +157,37 @@

    Arguments -

    Value

    +

    Value +

    A subset of x.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/emit_tidymodels_register_msg.html b/v0.3.6/reference/emit_tidymodels_register_msg.html index be0664e04..b48a9b993 100644 --- a/v0.3.6/reference/emit_tidymodels_register_msg.html +++ b/v0.3.6/reference/emit_tidymodels_register_msg.html @@ -1,5 +1,25 @@ - -Format a Message to Emit When Tidymodels is Loaded — emit_tidymodels_register_msg • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,12 +140,14 @@
    -

    Usage

    +

    Usage +

    emit_tidymodels_register_msg()
    -

    Value

    +

    Value +

    A character message to emit. Either a ansi-formatted cli output if @@ -125,22 +155,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/emmeans_support.html b/v0.3.6/reference/emmeans_support.html index 3ca7eff06..4d9e0f110 100644 --- a/v0.3.6/reference/emmeans_support.html +++ b/v0.3.6/reference/emmeans_support.html @@ -1,17 +1,37 @@ - - + + + + + +Support for emmeans — emmeans_support • mmrm +Support for emmeans — emmeans_support • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -36,7 +58,8 @@ + - + + - +
    @@ -132,7 +161,8 @@
    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -161,22 +191,26 @@ 

    Examples#> Results are averaged over the levels of: RACE, SEX

    -
    + +
    + + - - + + diff --git a/v0.3.6/reference/fev_data.html b/v0.3.6/reference/fev_data.html index 60746ebfe..69af12a70 100644 --- a/v0.3.6/reference/fev_data.html +++ b/v0.3.6/reference/fev_data.html @@ -1,5 +1,25 @@ - -Example Data on FEV1 — fev_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,17 @@
    -

    Usage

    +

    Usage +

    fev_data
    -

    Format

    -

    A tibble with 800 rows and 7 variables:

    • USUBJID: subject ID.

    • +

      Format +

      +

      A tibble with 800 rows and 7 variables:

      +
        +
      • USUBJID: subject ID.

      • AVISIT: visit number.

      • ARMCD: treatment, TRT or PBO.

      • RACE: 3-category race.

      • @@ -126,35 +158,42 @@

        Format<
      • FEV1_BL: FEV1 at baseline (%).

      • FEV1: FEV1 at study visits.

      • WEIGHT: weighting variable.

      • -

    + +
    -

    Source

    +

    Source +

    This is an artificial dataset.

    -

    Note

    +

    Note +

    Measurements of FEV1 (forced expired volume in one second) is a measure of how quickly the lungs can be emptied. Low levels of FEV1 may indicate chronic obstructive pulmonary disease (COPD).

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/fill_names.html b/v0.3.6/reference/fill_names.html index 78b8d616f..539caab43 100644 --- a/v0.3.6/reference/fill_names.html +++ b/v0.3.6/reference/fill_names.html @@ -1,5 +1,25 @@ - -Complete character Vector Names From Values — fill_names • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    fill_names(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character or list)
    value whose names should be completed from element values.

    -
    + +
    -

    Value

    +

    Value +

    A named vector or list.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/fit_mmrm.html b/v0.3.6/reference/fit_mmrm.html index 425a4b54a..2ea106313 100644 --- a/v0.3.6/reference/fit_mmrm.html +++ b/v0.3.6/reference/fit_mmrm.html @@ -1,11 +1,31 @@ - - + + + + + +Low-Level Fitting Function for MMRM — fit_mmrm • mmrm +Low-Level Fitting Function for MMRM — fit_mmrm • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -121,7 +149,8 @@
    -

    Usage

    +

    Usage +

    fit_mmrm(
       formula,
       data,
    @@ -135,8 +164,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    model formula with exactly one special term specifying the visits within subjects, see details.

    @@ -175,16 +206,19 @@

    Argumentsmmrm_control().

    -

    + +
    -

    Value

    +

    Value +

    List of class mmrm_tmb, see h_mmrm_tmb_fit() for details. In addition, it contains elements call and optimizer.

    + + - - + + diff --git a/v0.3.6/reference/fit_single_optimizer.html b/v0.3.6/reference/fit_single_optimizer.html index 3986bb650..9e8a63833 100644 --- a/v0.3.6/reference/fit_single_optimizer.html +++ b/v0.3.6/reference/fit_single_optimizer.html @@ -1,9 +1,29 @@ - - + + + + + +Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm +Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,7 +146,8 @@
    -

    Usage

    +

    Usage +

    fit_single_optimizer(
       formula,
       data,
    @@ -133,8 +162,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -174,9 +205,11 @@

    Arguments -

    Value

    +

    Value +

    The mmrm_fit object, with additional attributes containing warnings, @@ -184,7 +217,8 @@

    Value

    mmrm_tmb
    contents.

    + +
    - - + + diff --git a/v0.3.6/reference/flat_expr.html b/v0.3.6/reference/flat_expr.html index fa11f5b80..9a8196bd2 100644 --- a/v0.3.6/reference/flat_expr.html +++ b/v0.3.6/reference/flat_expr.html @@ -1,11 +1,31 @@ - - + + + + + +Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm +Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -121,61 +149,86 @@
    -

    Usage

    +

    Usage +

    flatten_call(call)
     
     flatten_expr(expr)
    -

    Arguments

    -
    call, expr
    +

    Arguments +

    +
    +
    call, expr

    (language)
    a language object to flatten.

    -
    + +
    -

    Value

    +

    Value +

    A list of atomic values, symbols, infix operator names and subexpressions.

    -

    Details

    +

    Details +

    Where 1 + 2 | 3 in R's syntax tree is (|, (+, 1, 2), 3), flattening it into its visual order produces (1, +, 2, |, 3), which makes for more fluent interpretation of non-standard grammar rules used in formulas.

    -

    Functions

    +

    Functions +

    -
    • flatten_call(): Flatten a call into a list of names and argument expressions.

      +
        +
      • +

        flatten_call(): Flatten a call into a list of names and argument expressions.

        The call name and all arguments are flattened into the same list, meaning a call of the form sp_exp(a, b, c | d / e) produces a list of the form (sp_exp, a, b, c, |, d, /, e).

        -

        flatten_call(quote(sp_exp(a, b, c | d / e)))

      • -
      • flatten_expr(): Flatten nested expressions

        -

        flatten_expr(quote(1 + 2 + 3 | 4))

      • -
    +

    +
    +
    flatten_call(quote(sp_exp(a, b, c | d / e)))
    +

    +
    + +
  • +

    flatten_expr(): Flatten nested expressions

    +

    +
    +
    flatten_expr(quote(1 + 2 + 3 | 4))
    +

    +
    +
  • + + + +
    -
    + + - - + + diff --git a/v0.3.6/reference/format.cov_struct.html b/v0.3.6/reference/format.cov_struct.html index cf664c58a..3876aa134 100644 --- a/v0.3.6/reference/format.cov_struct.html +++ b/v0.3.6/reference/format.cov_struct.html @@ -1,5 +1,25 @@ - -Format Covariance Structure Object — format.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,45 +140,54 @@
    -

    Usage

    +

    Usage +

    # S3 method for cov_struct
     format(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    ...

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string for x.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/format_symbols.html b/v0.3.6/reference/format_symbols.html index 8e0cbc46c..270034b0b 100644 --- a/v0.3.6/reference/format_symbols.html +++ b/v0.3.6/reference/format_symbols.html @@ -1,7 +1,27 @@ - -Format Symbol Objects — format_symbols • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,40 +143,49 @@
    -

    Usage

    +

    Usage +

    format_symbols(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character) A vector of variable names.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string of comma-separated variables.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/formula_rhs.html b/v0.3.6/reference/formula_rhs.html index 258747b39..49e3846ac 100644 --- a/v0.3.6/reference/formula_rhs.html +++ b/v0.3.6/reference/formula_rhs.html @@ -1,5 +1,25 @@ - -Extract Right-Hand-Side (rhs) from Formula — formula_rhs • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,47 +140,60 @@
    -

    Usage

    +

    Usage +

    formula_rhs(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula.

    -
    + +
    -

    Value

    +

    Value +

    A formula without a response, derived from the right-hand-side of the formula, f.

    -

    formula_rhs(a ~ b + c)
    -formula_rhs(~ b + c)

    +

    +
    +
    formula_rhs(a ~ b + c)
    +formula_rhs(~ b + c)
    +

    +
    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_add_covariance_terms.html b/v0.3.6/reference/h_add_covariance_terms.html index 28249b546..5cd5e1b92 100644 --- a/v0.3.6/reference/h_add_covariance_terms.html +++ b/v0.3.6/reference/h_add_covariance_terms.html @@ -1,5 +1,25 @@ - -Add Individual Covariance Variables As Terms to Formula — h_add_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_add_covariance_terms(f, covariance)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula to which covariance structure terms should be added.

    @@ -127,37 +158,44 @@

    Arguments -

    Value

    +

    Value +

    A new formula with included covariance terms.

    -

    Details

    +

    Details +

    stats::update() is used to append the covariance structure and the environment attribute will not be changed. This ensures the returned formula and the input formula have the same environment.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_add_terms.html b/v0.3.6/reference/h_add_terms.html index 600d0ba56..a1756cd15 100644 --- a/v0.3.6/reference/h_add_terms.html +++ b/v0.3.6/reference/h_add_terms.html @@ -1,5 +1,25 @@ - -Add Formula Terms with Character — h_add_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_add_terms(f, adds, drop_response = FALSE)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula to be updated.

    @@ -129,37 +160,44 @@

    Arguments -

    Value

    +

    Value +

    A new formula with elements in drops removed.

    -

    Details

    +

    Details +

    Elements in adds will be added from the formula, while the environment of the formula is unchanged. If adds is NULL or character(0), the formula is unchanged.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_coef_table.html b/v0.3.6/reference/h_coef_table.html index 73543e08e..e35d4093d 100644 --- a/v0.3.6/reference/h_coef_table.html +++ b/v0.3.6/reference/h_coef_table.html @@ -1,5 +1,25 @@ - -Coefficients Table for MMRM Fit — h_coef_table • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,18 +140,23 @@
    -

    Usage

    +

    Usage +

    h_coef_table(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    model fit.

    -
    + +
    -

    Value

    +

    Value +

    Matrix with one row per coefficient and columns @@ -131,22 +164,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_confirm_large_levels.html b/v0.3.6/reference/h_confirm_large_levels.html index 6114ad810..305d44f45 100644 --- a/v0.3.6/reference/h_confirm_large_levels.html +++ b/v0.3.6/reference/h_confirm_large_levels.html @@ -1,7 +1,27 @@ - -Ask for Confirmation on Large Visit Levels — h_confirm_large_levels • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,34 +143,42 @@
    -

    Usage

    +

    Usage +

    h_confirm_large_levels(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (numeric)
    number of visit levels.

    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_construct_model_frame_inputs.html b/v0.3.6/reference/h_construct_model_frame_inputs.html index 48cab6a34..855e6bbb3 100644 --- a/v0.3.6/reference/h_construct_model_frame_inputs.html +++ b/v0.3.6/reference/h_construct_model_frame_inputs.html @@ -1,13 +1,33 @@ - - + + + + + +Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm +Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -32,7 +54,8 @@ + - + + - + @@ -124,7 +152,8 @@
    -

    Usage

    +

    Usage +

    h_construct_model_frame_inputs(
       formula,
       data,
    @@ -135,8 +164,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (mmrm)
    mmrm fit object.

    @@ -152,36 +183,45 @@

    Arguments -

    Value

    +

    Value +

    -

    named list with four elements:

    • "formula": the formula including the columns requested in the include= argument.

    • +

      named list with four elements:

      +
        +
      • "formula": the formula including the columns requested in the include= argument.

      • "formula_full": the formula including all columns

      • "data": a data frame including all columns where factor and character columns have been processed with h_factor_ref().

      • "is_full": a logical scalar indicating if the formula and full formula are identical

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_default_value.html b/v0.3.6/reference/h_default_value.html index 0d717d9af..d66ce26d3 100644 --- a/v0.3.6/reference/h_default_value.html +++ b/v0.3.6/reference/h_default_value.html @@ -1,9 +1,29 @@ - -Default Value on NULL -Return default value when first argument is NULL. — h_default_value • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,42 +146,51 @@
    -

    Usage

    +

    Usage +

    h_default_value(x, y)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    Object.

    y

    Object.

    -
    + +
    -

    Details

    +

    Details +

    If x is NULL, returns y. Otherwise return x.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_df_1d_bw.html b/v0.3.6/reference/h_df_1d_bw.html index 3ea0e5ff1..0f30794c3 100644 --- a/v0.3.6/reference/h_df_1d_bw.html +++ b/v0.3.6/reference/h_df_1d_bw.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom for One-Dimensional Contrast — h_df_1d_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_bw(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -127,31 +158,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_df_1d_kr.html b/v0.3.6/reference/h_df_1d_kr.html index 814204bbb..b9a1f46ff 100644 --- a/v0.3.6/reference/h_df_1d_kr.html +++ b/v0.3.6/reference/h_df_1d_kr.html @@ -1,7 +1,27 @@ - -Calculation of Kenward-Roger Degrees of Freedom for One-Dimensional Contrast — h_df_1d_kr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_kr(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -130,31 +161,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_df_1d_res.html b/v0.3.6/reference/h_df_1d_res.html index 7d88cd7bc..ccbc8da24 100644 --- a/v0.3.6/reference/h_df_1d_res.html +++ b/v0.3.6/reference/h_df_1d_res.html @@ -1,7 +1,27 @@ - -Calculation of Residual Degrees of Freedom for One-Dimensional Contrast — h_df_1d_res • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_res(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -130,31 +161,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_df_1d_sat.html b/v0.3.6/reference/h_df_1d_sat.html index 24695f446..3240308ee 100644 --- a/v0.3.6/reference/h_df_1d_sat.html +++ b/v0.3.6/reference/h_df_1d_sat.html @@ -1,7 +1,27 @@ - -Calculation of Satterthwaite Degrees of Freedom for One-Dimensional Contrast — h_df_1d_sat • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_sat(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -130,31 +161,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_df_bw_calc.html b/v0.3.6/reference/h_df_bw_calc.html index 5ebd68fcd..1b206c3ef 100644 --- a/v0.3.6/reference/h_df_bw_calc.html +++ b/v0.3.6/reference/h_df_bw_calc.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom — h_df_bw_calc • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,42 +140,54 @@
    -

    Usage

    +

    Usage +

    h_df_bw_calc(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    -

    List with:

    + + + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_df_md_bw.html b/v0.3.6/reference/h_df_md_bw.html index 93f52fdaf..5594a5557 100644 --- a/v0.3.6/reference/h_df_md_bw.html +++ b/v0.3.6/reference/h_df_md_bw.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_bw(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_df_md_from_1d.html b/v0.3.6/reference/h_df_md_from_1d.html index 3bd2be31e..73f51ac4b 100644 --- a/v0.3.6/reference/h_df_md_from_1d.html +++ b/v0.3.6/reference/h_df_md_from_1d.html @@ -1,5 +1,25 @@ - -Creating F-Statistic Results from One-Dimensional Contrast — h_df_md_from_1d • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,22 +140,27 @@
    -

    Usage

    +

    Usage +

    h_df_md_from_1d(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    model fit.

    contrast

    (numeric)
    one-dimensional contrast.

    -
    + +
    -

    Value

    +

    Value +

    The one-dimensional degrees of freedom are calculated and then @@ -135,22 +168,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_df_md_kr.html b/v0.3.6/reference/h_df_md_kr.html index bd9dc5337..91975f187 100644 --- a/v0.3.6/reference/h_df_md_kr.html +++ b/v0.3.6/reference/h_df_md_kr.html @@ -1,5 +1,25 @@ - -Calculation of Kenward-Roger Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_kr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_kr(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_df_md_res.html b/v0.3.6/reference/h_df_md_res.html index ea01b7f5f..5792509be 100644 --- a/v0.3.6/reference/h_df_md_res.html +++ b/v0.3.6/reference/h_df_md_res.html @@ -1,5 +1,25 @@ - -Calculation of Residual Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_res • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_res(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_df_md_sat.html b/v0.3.6/reference/h_df_md_sat.html index 4a88855b3..210ce6389 100644 --- a/v0.3.6/reference/h_df_md_sat.html +++ b/v0.3.6/reference/h_df_md_sat.html @@ -1,5 +1,25 @@ - -Calculation of Satterthwaite Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_sat • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_sat(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_df_min_bw.html b/v0.3.6/reference/h_df_min_bw.html index 5f9649764..956acc6e5 100644 --- a/v0.3.6/reference/h_df_min_bw.html +++ b/v0.3.6/reference/h_df_min_bw.html @@ -1,5 +1,25 @@ - -Assign Minimum Degrees of Freedom Given Involved Coefficients — h_df_min_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_min_bw(bw_calc, is_coef_involved)
    -

    Arguments

    -
    bw_calc
    +

    Arguments +

    +
    +
    bw_calc

    (list)
    from h_df_bw_calc().

    @@ -126,9 +157,11 @@

    Arguments -

    Value

    +

    Value +

    The minimum of the degrees of freedom assigned to each involved @@ -136,22 +169,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_df_to_tibble.html b/v0.3.6/reference/h_df_to_tibble.html index 59ab0a6a6..f40f94e82 100644 --- a/v0.3.6/reference/h_df_to_tibble.html +++ b/v0.3.6/reference/h_df_to_tibble.html @@ -1,5 +1,25 @@ - -Coerce a Data Frame to a tibble — h_df_to_tibble • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -112,24 +141,30 @@
    -

    Usage

    +

    Usage +

    h_df_to_tibble(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (data.frame)
    what to coerce.

    -
    + +
    -

    Value

    +

    Value +

    The data as a tibble, potentially with a .rownames column.

    -

    Details

    +

    Details +

    This is only a thin wrapper around tibble::as_tibble(), except giving a useful error message and it checks for rownames and adds them as a new column .rownames if they are not just a numeric sequence as @@ -137,22 +172,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.6/reference/h_drop_covariance_terms.html b/v0.3.6/reference/h_drop_covariance_terms.html index b20ce5bb3..44bcd18a2 100644 --- a/v0.3.6/reference/h_drop_covariance_terms.html +++ b/v0.3.6/reference/h_drop_covariance_terms.html @@ -1,5 +1,25 @@ - -Drop Formula Terms used for Covariance Structure Definition — h_drop_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,46 +140,56 @@
    -

    Usage

    +

    Usage +

    h_drop_covariance_terms(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula from which covariance terms should be dropped.

    -
    + +
    -

    Value

    +

    Value +

    The formula without accepted covariance terms.

    -

    Details

    +

    Details +

    terms is used and it will preserve the environment attribute. This ensures the returned formula and the input formula have the same environment.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_extract_covariance_terms.html b/v0.3.6/reference/h_extract_covariance_terms.html index 7a638a376..d65b3f95c 100644 --- a/v0.3.6/reference/h_extract_covariance_terms.html +++ b/v0.3.6/reference/h_extract_covariance_terms.html @@ -1,5 +1,25 @@ - -Extract Formula Terms used for Covariance Structure Definition — h_extract_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    h_extract_covariance_terms(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula from which covariance terms should be extracted.

    -
    + +
    -

    Value

    +

    Value +

    A list of covariance structure expressions found in f.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_factor_ref.html b/v0.3.6/reference/h_factor_ref.html index a781fde89..7269712b7 100644 --- a/v0.3.6/reference/h_factor_ref.html +++ b/v0.3.6/reference/h_factor_ref.html @@ -1,5 +1,25 @@ - -Convert Character to Factor Following Reference — h_factor_ref • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_factor_ref(x, ref, var_name = vname(x))
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character or factor)
    input.

    @@ -129,31 +160,37 @@

    Arguments -

    Details

    +

    Details +

    Use ref to convert x into factor with the same levels. This is needed even if x and ref are both character because in model.matrix if x only has one level there could be errors.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_get_cov_default.html b/v0.3.6/reference/h_get_cov_default.html index 3fc1ea053..86df3d81d 100644 --- a/v0.3.6/reference/h_get_cov_default.html +++ b/v0.3.6/reference/h_get_cov_default.html @@ -1,7 +1,27 @@ - -Obtain Default Covariance Method — h_get_cov_default • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,20 +143,25 @@
    -

    Usage

    +

    Usage +

    h_get_cov_default(
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within")
     )
    -

    Arguments

    -
    method
    +

    Arguments +

    +
    +
    method

    (string)
    degrees of freedom method.

    -
    + +
    -

    Details

    +

    Details +

    The default covariance method is different for different degrees of freedom method. For "Satterthwaite" or "Between-Within", "Asymptotic" is returned. For "Kenward-Roger" only, "Kenward-Roger" is returned. @@ -136,22 +169,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.6/reference/h_get_empirical.html b/v0.3.6/reference/h_get_empirical.html index 8a4ea5117..5ace8b111 100644 --- a/v0.3.6/reference/h_get_empirical.html +++ b/v0.3.6/reference/h_get_empirical.html @@ -1,9 +1,29 @@ - -Obtain Empirical/Jackknife/Bias-Reduced Covariance — h_get_empirical • mmrm +Obtain Empirical/Jackknife/Bias-Reduced Covariance — h_get_empirical • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    h_get_empirical(tmb_data, theta, beta, beta_vcov, type)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    @@ -144,32 +175,41 @@

    Arguments -

    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • cov: matrix empirical covariance.

    • +

      Named list with elements:

      +
        +
      • cov: matrix empirical covariance.

      • df_mat: matrix to calculate Satterthwaite degree of freedom.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_get_kr_comp.html b/v0.3.6/reference/h_get_kr_comp.html index ce1c8fb1a..4749a9ff7 100644 --- a/v0.3.6/reference/h_get_kr_comp.html +++ b/v0.3.6/reference/h_get_kr_comp.html @@ -1,7 +1,27 @@ - -Obtain Kenward-Roger Adjustment Components — h_get_kr_comp • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,30 +143,39 @@
    -

    Usage

    +

    Usage +

    h_get_kr_comp(tmb_data, theta)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    theta

    (numeric)
    theta estimate.

    -
    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • P: matrix of \(P\) component.

    • +

      Named list with elements:

      +
        +
      • P: matrix of \(P\) component.

      • Q: matrix of \(Q\) component.

      • R: matrix of \(R\) component.

      • -
    + +
    -

    Details

    +

    Details +

    the function returns a named list, \(P\), \(Q\) and \(R\), which corresponds to the paper in 1997. The matrices are stacked in columns so that \(P\), \(Q\) and \(R\) has the same column number(number of beta parameters). The number of rows, is dependent on @@ -150,22 +187,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.6/reference/h_get_optimizers.html b/v0.3.6/reference/h_get_optimizers.html index 92406fe30..914ca2e90 100644 --- a/v0.3.6/reference/h_get_optimizers.html +++ b/v0.3.6/reference/h_get_optimizers.html @@ -1,5 +1,25 @@ - -Obtain Optimizer according to Optimizer String Value — h_get_optimizers • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    h_get_optimizers(
       optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"),
       optimizer_fun = h_optimizer_fun(optimizer),
    @@ -122,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    optimizer
    +

    Arguments +

    +
    +
    optimizer

    (character)
    names of built-in optimizers to try, subset of "L-BFGS-B", "BFGS", "CG" and "nlminb".

    @@ -140,46 +171,59 @@

    Arguments -

    Value

    +

    Value +

    Named list of optimizers created by h_partial_fun_args().

    -

    Details

    -

    If you want to use only the built-in optimizers:

    • optimizer is a shortcut to create a list of built-in optimizer functions +

      Details +

      +

      If you want to use only the built-in optimizers:

      +
        +
      • optimizer is a shortcut to create a list of built-in optimizer functions passed to optimizer_fun.

      • Allowed are "L-BFGS-B", "BFGS", "CG" (using stats::optim() with corresponding method) and "nlminb" (using stats::nlminb()).

      • Other arguments should go into optimizer_args.

      • -

      If you want to use your own optimizer function:

      • Make sure that there are three arguments: parameter (start value), objective function +

      +

      If you want to use your own optimizer function:

      +
        +
      • Make sure that there are three arguments: parameter (start value), objective function and gradient function are sequentially in the function arguments.

      • If there are other named arguments in front of these, make sure they are correctly specified through optimizer_args.

      • If the hessian can be used, please make sure its argument name is hessian and please add attribute use_hessian = TRUE to the function, using attr(fun, "use_hessian) <- TRUE.

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_get_prediction.html b/v0.3.6/reference/h_get_prediction.html index 1b59000e0..7b0fb7086 100644 --- a/v0.3.6/reference/h_get_prediction.html +++ b/v0.3.6/reference/h_get_prediction.html @@ -1,5 +1,25 @@ - -Get Prediction — h_get_prediction • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_get_prediction(tmb_data, theta, beta, beta_vcov)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    object.

    @@ -133,37 +164,47 @@

    Arguments -

    Value

    +

    Value +

    -

    List with:

    • prediction: Matrix with columns fit, conf_var, and var.

    • +

      List with:

      +
        +
      • prediction: Matrix with columns fit, conf_var, and var.

      • covariance: List with subject specific covariance matrices.

      • index: List of zero-based subject indices.

      • -
    + +
    -

    Details

    +

    Details +

    See predict function in predict.cpp which is called internally.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_get_prediction_variance.html b/v0.3.6/reference/h_get_prediction_variance.html index f70d02b58..372c15619 100644 --- a/v0.3.6/reference/h_get_prediction_variance.html +++ b/v0.3.6/reference/h_get_prediction_variance.html @@ -1,5 +1,25 @@ - -Get Prediction Variance — h_get_prediction_variance • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_get_prediction_variance(object, nsim, tmb_data)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    @@ -129,25 +160,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.6/reference/h_get_sim_per_subj.html b/v0.3.6/reference/h_get_sim_per_subj.html index 834ea4fa9..ba16546cf 100644 --- a/v0.3.6/reference/h_get_sim_per_subj.html +++ b/v0.3.6/reference/h_get_sim_per_subj.html @@ -1,5 +1,25 @@ - -Get simulated values by patient. — h_get_sim_per_subj • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_get_sim_per_subj(predict_res, nsub, nsim)
    -

    Arguments

    -
    predict_res
    +

    Arguments +

    +
    +
    predict_res

    (list)
    from h_get_prediction().

    @@ -129,25 +160,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.6/reference/h_gradient.html b/v0.3.6/reference/h_gradient.html index c4722d406..7de3819a4 100644 --- a/v0.3.6/reference/h_gradient.html +++ b/v0.3.6/reference/h_gradient.html @@ -1,7 +1,27 @@ - -Computation of a Gradient Given Jacobian and Contrast Vector — h_gradient • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_gradient(jac_list, contrast)
    -

    Arguments

    -
    jac_list
    +

    Arguments +

    +
    +
    jac_list

    (list)
    Jacobian list produced e.g. by h_jac_list().

    @@ -130,9 +161,11 @@

    Arguments -

    Value

    +

    Value +

    Numeric vector which contains the quadratic forms of each element of @@ -140,22 +173,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_jac_list.html b/v0.3.6/reference/h_jac_list.html index 6db7e69a3..21143a19b 100644 --- a/v0.3.6/reference/h_jac_list.html +++ b/v0.3.6/reference/h_jac_list.html @@ -1,5 +1,25 @@ - -Obtain List of Jacobian Matrix Entries for Covariance Matrix — h_jac_list • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_jac_list(tmb_data, theta_est, beta_vcov)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    @@ -129,9 +160,11 @@

    Arguments -

    Value

    +

    Value +

    List with one element per variance parameter containing a matrix @@ -140,22 +173,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_kr_df.html b/v0.3.6/reference/h_kr_df.html index b852da557..25c3026d3 100644 --- a/v0.3.6/reference/h_kr_df.html +++ b/v0.3.6/reference/h_kr_df.html @@ -1,7 +1,27 @@ - -Obtain the Adjusted Kenward-Roger degrees of freedom — h_kr_df • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_kr_df(v0, l, w, p)
    -

    Arguments

    -
    v0
    +

    Arguments +

    +
    +
    v0

    (matrix)
    unadjusted covariance matrix.

    @@ -136,32 +167,41 @@

    Argumentsh_get_kr_comp().

    -

    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • m: numeric degrees of freedom.

    • +

      Named list with elements:

      +
        +
      • m: numeric degrees of freedom.

      • lambda: numeric F statistic scale parameter.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_md_denom_df.html b/v0.3.6/reference/h_md_denom_df.html index d38259c41..4d6ba0738 100644 --- a/v0.3.6/reference/h_md_denom_df.html +++ b/v0.3.6/reference/h_md_denom_df.html @@ -1,5 +1,25 @@ - -Calculating Denominator Degrees of Freedom for the Multi-Dimensional Case — h_md_denom_df • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,47 +140,57 @@
    -

    Usage

    +

    Usage +

    h_md_denom_df(t_stat_df)
    -

    Arguments

    -
    t_stat_df
    +

    Arguments +

    +
    +
    t_stat_df

    (numeric)
    n t-statistic derived degrees of freedom.

    -
    + +
    -

    Value

    +

    Value +

    Usually the calculation is returning 2 * E / (E - n) where E is the sum of t / (t - 2) over all t_stat_df values t.

    -

    Note

    +

    Note +

    If the input values are two similar to each other then just the average of them is returned. If any of the inputs is not larger than 2 then 2 is returned.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_mmrm_tmb_assert_start.html b/v0.3.6/reference/h_mmrm_tmb_assert_start.html index dd10296bf..c91e4ec97 100644 --- a/v0.3.6/reference/h_mmrm_tmb_assert_start.html +++ b/v0.3.6/reference/h_mmrm_tmb_assert_start.html @@ -1,5 +1,25 @@ - -Asserting Sane Start Values for TMB Fit — h_mmrm_tmb_assert_start • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_assert_start(tmb_object)
    -

    Arguments

    -
    tmb_object
    +

    Arguments +

    +
    +
    tmb_object

    (list)
    created with TMB::MakeADFun().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used for assertions.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_mmrm_tmb_check_conv.html b/v0.3.6/reference/h_mmrm_tmb_check_conv.html index 4ca6d09bd..668dc3c99 100644 --- a/v0.3.6/reference/h_mmrm_tmb_check_conv.html +++ b/v0.3.6/reference/h_mmrm_tmb_check_conv.html @@ -1,5 +1,25 @@ - -Checking the TMB Optimization Result — h_mmrm_tmb_check_conv • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,22 +140,27 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_check_conv(tmb_opt, mmrm_tmb)
    -

    Arguments

    -
    tmb_opt
    +

    Arguments +

    +
    +
    tmb_opt

    (list)
    optimization result.

    mmrm_tmb

    (mmrm_tmb)
    result from h_mmrm_tmb_fit().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used to generate warnings in case that the model @@ -135,22 +168,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_mmrm_tmb_data.html b/v0.3.6/reference/h_mmrm_tmb_data.html index 0ee7c07d5..a6a952a66 100644 --- a/v0.3.6/reference/h_mmrm_tmb_data.html +++ b/v0.3.6/reference/h_mmrm_tmb_data.html @@ -1,5 +1,25 @@ - -Data for TMB Fit — h_mmrm_tmb_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_data(
       formula_parts,
       data,
    @@ -126,8 +155,10 @@ 

    Usage

    -

    Arguments

    -
    formula_parts
    +

    Arguments +

    +
    +
    formula_parts

    (mmrm_tmb_formula_parts)
    list with formula parts from h_mmrm_tmb_formula_parts().

    @@ -161,12 +192,16 @@

    Arguments -

    Value

    +

    Value +

    -

    List of class mmrm_tmb_data with elements:

    • full_frame: data.frame with n rows containing all variables needed in the model.

    • +

      List of class mmrm_tmb_data with elements:

      +
        +
      • full_frame: data.frame with n rows containing all variables needed in the model.

      • data: data.frame of input dataset.

      • x_matrix: matrix with n rows and p columns specifying the overall design matrix.

      • x_cols_aliased: logical with potentially more than p elements indicating which @@ -186,9 +221,11 @@

        Value

        reml: int specifying whether REML estimation is used (1), otherwise ML (0).

      • subject_groups: factor specifying the grouping for each subject.

      • n_groups: int with the number of total groups

      • -
    + +
    -

    Details

    +

    Details +

    Note that the subject_var must not be factor but can also be character. If it is character, then it will be converted to factor internally. Here the levels will be the unique values, sorted alphabetically and numerically if there @@ -197,22 +234,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.6/reference/h_mmrm_tmb_extract_cov.html b/v0.3.6/reference/h_mmrm_tmb_extract_cov.html index 9f0d2710b..30f8c6538 100644 --- a/v0.3.6/reference/h_mmrm_tmb_extract_cov.html +++ b/v0.3.6/reference/h_mmrm_tmb_extract_cov.html @@ -1,7 +1,27 @@ - -Extract covariance matrix from TMB report and input data — h_mmrm_tmb_extract_cov • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_extract_cov(tmb_report, tmb_data, visit_var, is_spatial)
    -

    Arguments

    -
    tmb_report
    +

    Arguments +

    +
    +
    tmb_report

    (list)
    report created with TMB::MakeADFun() report function.

    @@ -136,9 +167,11 @@

    Arguments -

    Value

    +

    Value +

    Return a simple covariance matrix if there is no grouping, or a named @@ -147,22 +180,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_mmrm_tmb_fit.html b/v0.3.6/reference/h_mmrm_tmb_fit.html index 543700e26..c9b6c7d97 100644 --- a/v0.3.6/reference/h_mmrm_tmb_fit.html +++ b/v0.3.6/reference/h_mmrm_tmb_fit.html @@ -1,7 +1,27 @@ - -Build TMB Fit Result List — h_mmrm_tmb_fit • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_fit(tmb_object, tmb_opt, formula_parts, tmb_data)
    -

    Arguments

    -
    tmb_object
    +

    Arguments +

    +
    +
    tmb_object

    (list)
    created with TMB::MakeADFun().

    @@ -137,12 +168,16 @@

    Argumentsh_mmrm_tmb_data().

    -

    + +
    -

    Value

    +

    Value +

    -

    List of class mmrm_tmb with:

    • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

    • +

      List of class mmrm_tmb with:

      +
        +
      • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

      • beta_est: vector of coefficient estimates.

      • beta_vcov: Variance-covariance matrix for coefficient estimates.

      • beta_vcov_inv_L: Lower triangular matrix L of the inverse variance-covariance matrix decomposition.

      • @@ -157,31 +192,37 @@

        Value

        opt_details: list with optimization details including convergence code.

      • tmb_object: original TMB object created with TMB::MakeADFun().

      • tmb_data: input.

      • -
    + +
    -

    Details

    +

    Details +

    Instead of inverting or decomposing beta_vcov, it can be more efficient to use its robust Cholesky decomposition LDL^T, therefore we return the corresponding two components L and D as well since they have been available on the C++ side already.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_mmrm_tmb_formula_parts.html b/v0.3.6/reference/h_mmrm_tmb_formula_parts.html index aad8a3357..d980012b5 100644 --- a/v0.3.6/reference/h_mmrm_tmb_formula_parts.html +++ b/v0.3.6/reference/h_mmrm_tmb_formula_parts.html @@ -1,5 +1,25 @@ - -Processing the Formula for TMB Fit — h_mmrm_tmb_formula_parts • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_formula_parts(
       formula,
       covariance = as.cov_struct(formula, warn_partial = FALSE)
    @@ -120,8 +149,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    Original formula.

    @@ -129,12 +160,16 @@

    Arguments -

    Value

    +

    Value +

    -

    List of class mmrm_tmb_formula_parts with elements:

    • formula: the original input.

    • +

      List of class mmrm_tmb_formula_parts with elements:

      +
        +
      • formula: the original input.

      • model_formula: formula with the covariance term is removed.

      • model_formula: formula with the covariance term removed.

      • full_formula: same as model_formula but includes the covariance @@ -146,25 +181,30 @@

        Value

        subject_var: string with the subject variable name.

      • group_var: string with the group variable name. If no group specified, this element is NULL.

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_mmrm_tmb_parameters.html b/v0.3.6/reference/h_mmrm_tmb_parameters.html index e68d8baaa..6f34e0e0d 100644 --- a/v0.3.6/reference/h_mmrm_tmb_parameters.html +++ b/v0.3.6/reference/h_mmrm_tmb_parameters.html @@ -1,5 +1,25 @@ - -Start Parameters for TMB Fit — h_mmrm_tmb_parameters • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_parameters(formula_parts, tmb_data, start, n_groups = 1L)
    -

    Arguments

    -
    formula_parts
    +

    Arguments +

    +
    +
    formula_parts

    (mmrm_tmb_formula_parts)
    produced by h_mmrm_tmb_formula_parts().

    @@ -135,9 +166,11 @@

    Arguments -

    Value

    +

    Value +

    List with element theta containing the start values for the variance @@ -145,22 +178,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_newdata_add_pred.html b/v0.3.6/reference/h_newdata_add_pred.html index 4432eeb74..42fb2627e 100644 --- a/v0.3.6/reference/h_newdata_add_pred.html +++ b/v0.3.6/reference/h_newdata_add_pred.html @@ -1,5 +1,25 @@ - -Add Prediction Results to New Data — h_newdata_add_pred • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_newdata_add_pred(x, newdata, se_fit, interval, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fit.

    @@ -138,9 +169,11 @@

    Argumentspredict.mmrm_tmb().

    -

    + +
    -

    Value

    +

    Value +

    The newdata as a tibble with additional columns .fitted, @@ -151,22 +184,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_optimizer_fun.html b/v0.3.6/reference/h_optimizer_fun.html index a993f20d8..e38f18893 100644 --- a/v0.3.6/reference/h_optimizer_fun.html +++ b/v0.3.6/reference/h_optimizer_fun.html @@ -1,5 +1,25 @@ - -Obtain Optimizer Function with Character — h_optimizer_fun • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_optimizer_fun(optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"))
    -

    Arguments

    -
    optimizer
    +

    Arguments +

    +
    +
    optimizer

    (character)
    vector of optimizers.

    -
    + +
    -

    Value

    +

    Value +

    A (list)
    of optimizer functions generated from h_partial_fun_args().

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_partial_fun_args.html b/v0.3.6/reference/h_partial_fun_args.html index d1e3522a4..532ae4576 100644 --- a/v0.3.6/reference/h_partial_fun_args.html +++ b/v0.3.6/reference/h_partial_fun_args.html @@ -1,5 +1,25 @@ - -Create Partial Functions — h_partial_fun_args • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_partial_fun_args(fun, ..., additional_attr = list())
    -

    Arguments

    -
    fun
    +

    Arguments +

    +
    +
    fun

    (function)
    to be wrapped.

    @@ -129,16 +160,19 @@

    Arguments -

    Value

    +

    Value +

    Object with S3 class "partial", a function with args attribute (and possibly more attributes from additional_attr).

    -

    Details

    +

    Details +

    This function add args attribute to the original function, and add an extra class partial to the function. args is the argument for the function, and elements in ... will override the existing @@ -146,22 +180,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.6/reference/h_print_aic_list.html b/v0.3.6/reference/h_print_aic_list.html index 37a915a1f..b91e7f64c 100644 --- a/v0.3.6/reference/h_print_aic_list.html +++ b/v0.3.6/reference/h_print_aic_list.html @@ -1,5 +1,25 @@ - -Printing AIC and other Model Fit Criteria — h_print_aic_list • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,38 +140,46 @@
    -

    Usage

    +

    Usage +

    h_print_aic_list(aic_list, digits = 1)
    -

    Arguments

    -
    aic_list
    +

    Arguments +

    +
    +
    aic_list

    (list)
    list as part of from summary.mmrm().

    digits

    (number)
    number of decimal places used with round().

    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_print_call.html b/v0.3.6/reference/h_print_call.html index 2b1f89508..3286ca658 100644 --- a/v0.3.6/reference/h_print_call.html +++ b/v0.3.6/reference/h_print_call.html @@ -1,5 +1,25 @@ - -Printing MMRM Function Call — h_print_call • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_print_call(call, n_obs, n_subjects, n_timepoints)
    -

    Arguments

    -
    call
    +

    Arguments +

    +
    +
    call

    (call)
    original mmrm() function call.

    @@ -133,25 +164,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.6/reference/h_print_cov.html b/v0.3.6/reference/h_print_cov.html index 29bc0b054..a4b618682 100644 --- a/v0.3.6/reference/h_print_cov.html +++ b/v0.3.6/reference/h_print_cov.html @@ -1,5 +1,25 @@ - -Printing MMRM Covariance Type — h_print_cov • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_print_cov(cov_type, n_theta, n_groups)
    -

    Arguments

    -
    cov_type
    +

    Arguments +

    +
    +
    cov_type

    (string)
    covariance structure abbreviation.

    @@ -129,25 +160,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.6/reference/h_quad_form.html b/v0.3.6/reference/h_quad_form.html index 406ecbaf7..99adb5722 100644 --- a/v0.3.6/reference/h_quad_form.html +++ b/v0.3.6/reference/h_quad_form.html @@ -1,7 +1,27 @@ - -Quadratic Form Calculations — h_quad_form • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,15 +143,18 @@
    -

    Usage

    +

    Usage +

    h_quad_form_vec(vec, center)
     
     h_quad_form_mat(mat, center)
    -

    Arguments

    -
    vec
    +

    Arguments +

    +
    +
    vec

    (numeric)
    interpreted as a row vector.

    @@ -137,34 +168,42 @@

    Arguments -

    Functions

    +

    Functions +

    -
    • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) +

        +
      • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) as a numeric (not a matrix).

      • h_quad_form_mat(): calculates the quadratic form mat %*% center %*% t(mat) as a matrix, the result is square and has dimensions identical to the number of rows in mat.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_reconcile_cov_struct.html b/v0.3.6/reference/h_reconcile_cov_struct.html index e0d422b40..c2bd93a05 100644 --- a/v0.3.6/reference/h_reconcile_cov_struct.html +++ b/v0.3.6/reference/h_reconcile_cov_struct.html @@ -1,5 +1,25 @@ - -Reconcile Possible Covariance Structure Inputs — h_reconcile_cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_reconcile_cov_struct(formula = NULL, covariance = NULL)
    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -128,9 +159,11 @@

    Argumentsas.cov_struct(). If no value is provided, a structure is derived from the provided formula.

    -

    + +
    -

    Value

    +

    Value +

    The value covariance if it's provided or a covariance structure @@ -139,22 +172,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_record_all_output.html b/v0.3.6/reference/h_record_all_output.html index f6af94cd4..94d42621d 100644 --- a/v0.3.6/reference/h_record_all_output.html +++ b/v0.3.6/reference/h_record_all_output.html @@ -1,9 +1,29 @@ - - + + + + + +Capture all Output — h_record_all_output • mmrm +Capture all Output — h_record_all_output • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    h_record_all_output(expr, remove = list(), divergence = list())
    -

    Arguments

    -
    expr
    +

    Arguments +

    +
    +
    expr

    (expression)
    to be executed.

    @@ -139,35 +170,44 @@

    Arguments -

    Value

    +

    Value +

    -

    A list containing

    • result: The object returned by expr or list() if an error was thrown.

    • +

      A list containing

      +
        +
      • result: The object returned by expr or list() if an error was thrown.

      • warnings: NULL or a character vector if warnings were thrown.

      • errors: NULL or a string if an error was thrown.

      • messages: NULL or a character vector if messages were produced.

      • divergence: NULL or a character vector if divergence messages were caught.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_residuals_normalized.html b/v0.3.6/reference/h_residuals_normalized.html index 6f4ccf1e4..668ab65c9 100644 --- a/v0.3.6/reference/h_residuals_normalized.html +++ b/v0.3.6/reference/h_residuals_normalized.html @@ -1,5 +1,25 @@ - -Calculate normalized residuals — h_residuals_normalized • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_normalized(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_residuals_pearson.html b/v0.3.6/reference/h_residuals_pearson.html index 181fda37a..abf31c575 100644 --- a/v0.3.6/reference/h_residuals_pearson.html +++ b/v0.3.6/reference/h_residuals_pearson.html @@ -1,5 +1,25 @@ - -Calculate Pearson Residuals — h_residuals_pearson • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_pearson(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_residuals_response.html b/v0.3.6/reference/h_residuals_response.html index 4ae0d9a56..f7152fc18 100644 --- a/v0.3.6/reference/h_residuals_response.html +++ b/v0.3.6/reference/h_residuals_response.html @@ -1,5 +1,25 @@ - -Calculate response residuals. — h_residuals_response • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_response(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_split_control.html b/v0.3.6/reference/h_split_control.html index fb092ef6a..a7d07cf27 100644 --- a/v0.3.6/reference/h_split_control.html +++ b/v0.3.6/reference/h_split_control.html @@ -1,7 +1,27 @@ - -Split Control List — h_split_control • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,44 +143,53 @@
    -

    Usage

    +

    Usage +

    h_split_control(control, ...)
    -

    Arguments

    -
    control
    +

    Arguments +

    +
    +
    control

    (mmrm_control)
    object.

    ...

    additional parameters to update the control object.

    -
    + +
    -

    Value

    +

    Value +

    A list of mmrm_control entries.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_summarize_all_fits.html b/v0.3.6/reference/h_summarize_all_fits.html index 0b021e5b9..d32b29a99 100644 --- a/v0.3.6/reference/h_summarize_all_fits.html +++ b/v0.3.6/reference/h_summarize_all_fits.html @@ -1,5 +1,25 @@ - -Summarizing List of Fits — h_summarize_all_fits • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_summarize_all_fits(all_fits)
    -

    Arguments

    -
    all_fits
    +

    Arguments +

    +
    +
    all_fits

    (list of mmrm_fit or try-error)
    list of fits.

    -
    + +
    -

    Value

    +

    Value +

    List with warnings, messages, log_liks and converged results.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_tbl_confint_terms.html b/v0.3.6/reference/h_tbl_confint_terms.html index 7856a17e9..090fce10e 100644 --- a/v0.3.6/reference/h_tbl_confint_terms.html +++ b/v0.3.6/reference/h_tbl_confint_terms.html @@ -1,5 +1,25 @@ - -Extract tibble with Confidence Intervals and Term Names — h_tbl_confint_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,44 +140,53 @@
    -

    Usage

    +

    Usage +

    h_tbl_confint_terms(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fit object.

    ...

    passed to stats::confint(), hence not used at the moment.

    -
    + +
    -

    Value

    +

    Value +

    A tibble with term, conf.low, conf.high columns.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_test_1d.html b/v0.3.6/reference/h_test_1d.html index 05f261d2a..1cd474e54 100644 --- a/v0.3.6/reference/h_test_1d.html +++ b/v0.3.6/reference/h_test_1d.html @@ -1,7 +1,27 @@ - -Creating T-Statistic Test Results For One-Dimensional Contrast — h_test_1d • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_test_1d(object, contrast, df)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -134,31 +165,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val (2-sided p-value).

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_test_md.html b/v0.3.6/reference/h_test_md.html index 95dc138f0..52eb2f272 100644 --- a/v0.3.6/reference/h_test_md.html +++ b/v0.3.6/reference/h_test_md.html @@ -1,7 +1,27 @@ - -Creating F-Statistic Test Results For Multi-Dimensional Contrast — h_test_md • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_test_md(object, contrast, df, f_stat_factor = 1)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -136,31 +167,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_tr.html b/v0.3.6/reference/h_tr.html index 55af75d17..1ce825a21 100644 --- a/v0.3.6/reference/h_tr.html +++ b/v0.3.6/reference/h_tr.html @@ -1,5 +1,25 @@ - -Trace of a Matrix — h_tr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_tr(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (matrix)
    square matrix input.

    -
    + +
    -

    Value

    +

    Value +

    The trace of the square matrix.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_valid_formula.html b/v0.3.6/reference/h_valid_formula.html index 62639741a..e1a592d89 100644 --- a/v0.3.6/reference/h_valid_formula.html +++ b/v0.3.6/reference/h_valid_formula.html @@ -1,5 +1,25 @@ - -Validate mmrm Formula — h_valid_formula • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,39 +140,48 @@
    -

    Usage

    +

    Usage +

    h_valid_formula(formula)
    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    to check.

    -
    + +
    -

    Details

    +

    Details +

    In mmrm models, . is not allowed as it introduces ambiguity of covariates to be used, so it is not allowed to be in formula.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_var_adj.html b/v0.3.6/reference/h_var_adj.html index fadaa57c2..64313cb7b 100644 --- a/v0.3.6/reference/h_var_adj.html +++ b/v0.3.6/reference/h_var_adj.html @@ -1,9 +1,29 @@ - -Obtain the Adjusted Covariance Matrix — h_var_adj • mmrm +Obtain the Adjusted Covariance Matrix — h_var_adj • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    h_var_adj(v, w, p, q, r, linear = FALSE)
    -

    Arguments

    -
    v
    +

    Arguments +

    +
    +
    v

    (matrix)
    unadjusted covariance matrix.

    @@ -147,31 +178,37 @@

    Arguments -

    Value

    +

    Value +

    The matrix of adjusted covariance matrix.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_warn_na_action.html b/v0.3.6/reference/h_warn_na_action.html index 9289d37f2..7f24c4ac5 100644 --- a/v0.3.6/reference/h_warn_na_action.html +++ b/v0.3.6/reference/h_warn_na_action.html @@ -1,5 +1,25 @@ - -Warn on na.action — h_warn_na_action • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,27 +140,32 @@
    -

    Usage

    +

    Usage +

    h_warn_na_action()
    - + +
    -
    + + - - + + diff --git a/v0.3.6/reference/h_within_or_between.html b/v0.3.6/reference/h_within_or_between.html index d7d0cf4d2..91940877a 100644 --- a/v0.3.6/reference/h_within_or_between.html +++ b/v0.3.6/reference/h_within_or_between.html @@ -1,7 +1,27 @@ - -Determine Within or Between for each Design Matrix Column — h_within_or_between • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,22 +143,27 @@
    -

    Usage

    +

    Usage +

    h_within_or_between(x_matrix, subject_ids)
    -

    Arguments

    -
    x_matrix
    +

    Arguments +

    +
    +
    x_matrix

    (matrix)
    the design matrix with column names.

    subject_ids

    (factor)
    the subject IDs.

    -
    + +
    -

    Value

    +

    Value +

    Character vector with "intercept", "within" or "between" for each @@ -138,22 +171,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/index.html b/v0.3.6/reference/index.html index 8d7c48080..685077866 100644 --- a/v0.3.6/reference/index.html +++ b/v0.3.6/reference/index.html @@ -1,5 +1,23 @@ - -Function reference • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +44,8 @@ + - + + - + @@ -106,189 +132,252 @@
    -

    Package

    +

    Package +

    -
    +
    +
    -
    +
    +
    mmrm-package _PACKAGE
    -
    mmrm Package
    -
    -

    Functions

    +
    +mmrm Package
    + +
    +
    +

    Functions +

    -
    +
    +
    -
    +
    +
    mmrm()
    Fit an MMRM
    -
    +
    +
    +
    fit_mmrm()
    Low-Level Fitting Function for MMRM
    -
    +
    +
    +
    mmrm_control()
    Control Parameters for Fitting an MMRM
    -
    +
    +
    +
    fit_single_optimizer()
    Fitting an MMRM with Single Optimizer
    -
    +
    +
    +
    refit_multiple_optimizers()
    Refitting MMRM with Multiple Optimizers
    -
    +
    +
    +
    df_1d()
    Calculation of Degrees of Freedom for One-Dimensional Contrast
    -
    +
    +
    +
    df_md()
    Calculation of Degrees of Freedom for Multi-Dimensional Contrast
    -
    +
    +
    +
    component()
    Component Access for mmrm_tmb Objects
    -
    -

    Methods

    + +
    +
    +

    Methods +

    -
    +
    +
    -

    Covariance Structures

    + +
    +
    +

    Covariance Structures +

    -
    +
    +
    -
    +
    +
    cov_struct()
    Define a Covariance Structure
    -
    +
    +
    +
    as.cov_struct()
    Coerce into a Covariance Structure Definition
    -
    +
    +
    +
    format(<cov_struct>)
    Format Covariance Structure Object
    -
    +
    +
    +
    print(<cov_struct>)
    Print a Covariance Structure Object
    -
    +
    +
    +
    cov_types()
    Covariance Types
    -
    -

    Estimate Marginal Means

    + +
    +
    +

    Estimate Marginal Means +

    -
    +
    +
    -
    +
    +
    emmeans_support
    -
    Support for emmeans
    -
    -

    Datasets

    +
    Support for emmeans +
    + +
    +
    +

    Datasets +

    -
    +
    +
    -
    +
    +
    fev_data
    Example Data on FEV1
    -
    +
    +
    +
    bcva_data
    Example Data on BCVA
    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.6/reference/is_infix.html b/v0.3.6/reference/is_infix.html index a374fec75..7b25a7f4b 100644 --- a/v0.3.6/reference/is_infix.html +++ b/v0.3.6/reference/is_infix.html @@ -1,5 +1,25 @@ - -Test Whether a Symbol is an Infix Operator — is_infix • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,49 +140,62 @@
    -

    Usage

    +

    Usage +

    is_infix(name)
    -

    Arguments

    -
    name
    +

    Arguments +

    +
    +
    name

    (symbol or name or string)
    a possible reference to an infix operator to check.

    -
    + +
    -

    Value

    +

    Value +

    A logical indicating whether the name is the name of an infix operator.

    -

    is_infix(as.name("|"))
    +

    +
    +
    is_infix(as.name("|"))
     is_infix("|")
    -is_infix("c")

    +is_infix("c")
    +

    +
    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/mmrm-package.html b/v0.3.6/reference/mmrm-package.html index 1060af232..a3d4f390d 100644 --- a/v0.3.6/reference/mmrm-package.html +++ b/v0.3.6/reference/mmrm-package.html @@ -1,5 +1,25 @@ - -mmrm Package — mmrm-package • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -113,15 +142,23 @@
    -

    See also

    -
    -

    Author

    +

    Author +

    Maintainer: Daniel Sabanes Bove daniel.sabanes_bove@roche.com

    -

    Authors:

    + +
    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/mmrm.html b/v0.3.6/reference/mmrm.html index a3c81dc16..d8d74d807 100644 --- a/v0.3.6/reference/mmrm.html +++ b/v0.3.6/reference/mmrm.html @@ -1,7 +1,27 @@ - -Fit an MMRM — mmrm • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,7 +143,8 @@
    -

    Usage

    +

    Usage +

    mmrm(
       formula,
       data,
    @@ -128,8 +157,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -162,15 +193,18 @@

    Argumentsmmrm_control().

    -

    + +
    -

    Value

    +

    Value +

    An mmrm object.

    -

    Details

    +

    Details +

    The formula typically looks like: FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID) so specifies response and covariates as usual, and exactly one special term @@ -196,15 +230,19 @@

    Detailsmmrm.

    -

    Note

    +

    Note +

    The mmrm object is also an mmrm_fit and an mmrm_tmb object, therefore corresponding methods also work (see mmrm_tmb_methods).

    -

    Additional contents depend on the choice of the adjustment method:

    • If Satterthwaite adjustment is used, the Jacobian information jac_list +

      Additional contents depend on the choice of the adjustment method:

      +
        +
      • If Satterthwaite adjustment is used, the Jacobian information jac_list is included.

      • If Kenward-Roger adjustment is used, kr_comp contains necessary components and beta_vcov_adj includes the adjusted coefficients covariance matrix.

      • -

      Use of the package emmeans is supported, see emmeans_support.

      +
    +

    Use of the package emmeans is supported, see emmeans_support.

    NA values are always omitted regardless of na.action setting.

    When the number of visit levels is large, it usually requires large memory to create the covariance matrix. By default, the maximum allowed visit levels is 100, and if there are more @@ -215,7 +253,8 @@

    Note

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -239,22 +278,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.6/reference/mmrm_control.html b/v0.3.6/reference/mmrm_control.html index a366163d0..ab7f2db08 100644 --- a/v0.3.6/reference/mmrm_control.html +++ b/v0.3.6/reference/mmrm_control.html @@ -1,9 +1,29 @@ - - + + + + + +Control Parameters for Fitting an MMRM — mmrm_control • mmrm +Control Parameters for Fitting an MMRM — mmrm_control • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,7 +146,8 @@
    -

    Usage

    +

    Usage +

    mmrm_control(
       n_cores = 1L,
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within"),
    @@ -132,8 +161,10 @@ 

    Usage

    -

    Arguments

    -
    n_cores
    +

    Arguments +

    +
    +
    n_cores

    (count)
    number of cores to be used.

    @@ -167,15 +198,18 @@

    Argumentsh_get_optimizers().

    -

    + +
    -

    Value

    +

    Value +

    List of class mmrm_control with the control parameters.

    -

    Details

    +

    Details +

    For example, if the data only has observations at visits VIS1, VIS3 and VIS4, by default they are treated to be equally spaced, the distance from VIS1 to VIS3, and from VIS3 to VIS4, are identical. However, you can manually convert this visit into a factor, with @@ -183,21 +217,54 @@

    DetailsVIS1 to VIS3 will be double, as VIS2 is a valid visit. However, please be cautious because this can lead to convergence failure when using an unstructured covariance matrix and there are no observations -at the missing visits.

    • The method and vcov arguments specify the degrees of freedom and coefficients -covariance matrix adjustment methods, respectively.

      • Allowed vcov includes: "Asymptotic", "Kenward-Roger", "Kenward-Roger-Linear", "Empirical" (CR0), +at the missing visits.

        +
          +
        • +

          The method and vcov arguments specify the degrees of freedom and coefficients +covariance matrix adjustment methods, respectively.

          +
            +
          • Allowed vcov includes: "Asymptotic", "Kenward-Roger", "Kenward-Roger-Linear", "Empirical" (CR0), "Empirical-Jackknife" (CR2), and "Empirical-Bias-Reduced" (CR3).

          • Allowed method includes: "Satterthwaite", "Kenward-Roger", "Between-Within" and "Residual".

          • If method is "Kenward-Roger" then only "Kenward-Roger" or "Kenward-Roger-Linear" are allowed for vcov.

          • -
        • -
        • The vcov argument can be NULL to use the default covariance method depending on the method -used for degrees of freedom, see the following table:

          methodDefault vcov
          SatterthwaiteAsymptotic
          Kenward-RogerKenward-Roger
          ResidualEmpirical
          Between-WithinAsymptotic
        • +
        +
      • +
      • +

        The vcov argument can be NULL to use the default covariance method depending on the method +used for degrees of freedom, see the following table:

        + + + + + + + + + + + + + + + + + + + + + +
        methodDefault vcov +
        SatterthwaiteAsymptotic
        Kenward-RogerKenward-Roger
        ResidualEmpirical
        Between-WithinAsymptotic
        +
      • Please note that "Kenward-Roger" for "Unstructured" covariance gives different results compared to SAS; Use "Kenward-Roger-Linear" for vcov instead for better matching of the SAS results.

      • -

    + +
    -

    Examples

    +

    Examples +

    mmrm_control(
       optimizer_fun = stats::optim,
       optimizer_args = list(method = "L-BFGS-B")
    @@ -301,22 +368,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.6/reference/mmrm_methods.html b/v0.3.6/reference/mmrm_methods.html index 7ca3e4ad5..bc1eeb1e6 100644 --- a/v0.3.6/reference/mmrm_methods.html +++ b/v0.3.6/reference/mmrm_methods.html @@ -1,5 +1,25 @@ - -Methods for mmrm Objects — mmrm_methods • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm
     summary(object, ...)
     
    @@ -126,48 +155,65 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the fitted MMRM including Jacobian and call etc.

    ...

    not used.

    -
    + +
    -

    Value

    +

    Value +

    Depends on the method, see Details and Functions.

    -

    Details

    -

    While printing the summary of (mmrm)
    object, the following will be displayed:

    1. Formula. The formula used in the model.

    2. +

      Details +

      +

      While printing the summary of (mmrm)
      object, the following will be displayed:

      +
        +
      1. Formula. The formula used in the model.

      2. Data. The data used for analysis, including number of subjects, number of valid observations.

      3. Covariance. The covariance structure and number of variance parameters.

      4. Method. Restricted maximum likelihood(REML) or maximum likelihood(ML).

      5. Model selection criteria. AIC, BIC, log likelihood and deviance.

      6. Coefficients. Coefficients of the covariates.

      7. -
      8. Covariance estimate. The covariance estimate(for each group).

        1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available +

        2. +

          Covariance estimate. The covariance estimate(for each group).

          +
            +
          1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available in data will be displayed.

          2. If the covariance structure is spatial, the covariance matrix of two time points with unit distance will be displayed.

          3. -
        3. -
    + + + +
    -

    Functions

    +

    Functions +

    -
    • summary(mmrm): summarizes the MMRM fit results.

    • +
        +
      • summary(mmrm): summarizes the MMRM fit results.

      • print(summary.mmrm): prints the MMRM fit summary.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_tmb_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- mmrm(formula, fev_data)
     # Summary:
    @@ -224,22 +270,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.6/reference/mmrm_tidiers.html b/v0.3.6/reference/mmrm_tidiers.html index 64cbc5202..0788e48dc 100644 --- a/v0.3.6/reference/mmrm_tidiers.html +++ b/v0.3.6/reference/mmrm_tidiers.html @@ -1,9 +1,29 @@ - - + + + + + +Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm +Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,7 +146,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm
     tidy(x, conf.int = FALSE, conf.level = 0.95, ...)
     
    @@ -137,8 +166,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fitted model.

    @@ -170,21 +201,27 @@

    Argumentsresiduals.mmrm_tmb().

    -

    + +
    -

    Functions

    +

    Functions +

    -
    • tidy(mmrm): derives tidy tibble from an mmrm object.

    • +
        +
      • tidy(mmrm): derives tidy tibble from an mmrm object.

      • glance(mmrm): derives glance tibble from an mmrm object.

      • augment(mmrm): derives augment tibble from an mmrm object.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tmb_methods for additional methods.

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -276,22 +313,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.6/reference/mmrm_tmb_methods.html b/v0.3.6/reference/mmrm_tmb_methods.html index 4c2197cb1..2977974a1 100644 --- a/v0.3.6/reference/mmrm_tmb_methods.html +++ b/v0.3.6/reference/mmrm_tmb_methods.html @@ -1,5 +1,25 @@ - -Methods for mmrm_tmb Objects — mmrm_tmb_methods • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm_tmb
     coef(object, complete = TRUE, ...)
     
    @@ -185,8 +214,10 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM object.

    @@ -272,15 +303,18 @@

    Arguments -

    + +
    -

    Value

    +

    Value +

    Depends on the method, see Functions.

    -

    Details

    +

    Details +

    include argument controls the variables the returned model frame will include. Possible options are "response_var", "subject_var", "visit_var" and "group_var", representing the response variable, subject variable, visit variable or group variable. @@ -288,9 +322,11 @@

    Detailsmodel.matrix.

    -

    Functions

    +

    Functions +

    -
    • coef(mmrm_tmb): obtains the estimated coefficients.

    • +
        +
      • coef(mmrm_tmb): obtains the estimated coefficients.

      • fitted(mmrm_tmb): obtains the fitted values.

      • predict(mmrm_tmb): predict conditional means for new data; optionally with standard errors and confidence or prediction intervals. @@ -324,11 +360,14 @@

        Functions -

        References

        +

        References +

        -
        • Hurvich CM, Tsai C (1989). +

          • Gałecki A, Burzykowski T (2013). +

          +
            +
          • Gałecki A, Burzykowski T (2013). “Linear mixed-effects model.” In Linear mixed-effects models using R, 245--273. Springer.

          • -
    + +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- fit_mmrm(formula, fev_data, weights = rep(1, nrow(fev_data)))
     # Estimated coefficients:
    @@ -3863,22 +3907,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.6/reference/parsnip_add_mmrm.html b/v0.3.6/reference/parsnip_add_mmrm.html index ad75b6368..5ede5691c 100644 --- a/v0.3.6/reference/parsnip_add_mmrm.html +++ b/v0.3.6/reference/parsnip_add_mmrm.html @@ -1,5 +1,25 @@ - -Register mmrm For Use With tidymodels — parsnip_add_mmrm • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -112,45 +141,55 @@
    -

    Usage

    +

    Usage +

    parsnip_add_mmrm(quietly = FALSE)
    -

    Arguments

    -
    quietly
    +

    Arguments +

    +
    +
    quietly

    logical: should progress and error messages be suppressed?

    -
    + +
    -

    Value

    +

    Value +

    A logical value indicating whether registration was successful.

    -

    Details

    +

    Details +

    We can use parsnip::show_model_info("linear_reg") to check the registration with parsnip and thus the wider tidymodels ecosystem.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/position_symbol.html b/v0.3.6/reference/position_symbol.html index 6e1c17ff2..37be6aaa0 100644 --- a/v0.3.6/reference/position_symbol.html +++ b/v0.3.6/reference/position_symbol.html @@ -1,9 +1,29 @@ - - + + + + + +Search For the Position of a Symbol — position_symbol • mmrm +Search For the Position of a Symbol — position_symbol • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    position_symbol(x, sym, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (list of language)
    a list of language objects in which to search for a specific symbol.

    @@ -137,9 +168,11 @@

    ArgumentsPosition().

    -

    + +
    -

    Value

    +

    Value +

    The position of the symbol if found, or the nomatch value @@ -147,22 +180,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/print.cov_struct.html b/v0.3.6/reference/print.cov_struct.html index b817b8fa1..e1f90c748 100644 --- a/v0.3.6/reference/print.cov_struct.html +++ b/v0.3.6/reference/print.cov_struct.html @@ -1,5 +1,25 @@ - -Print a Covariance Structure Object — print.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,45 +140,54 @@
    -

    Usage

    +

    Usage +

    # S3 method for cov_struct
     print(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    ...

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    x invisibly.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/reexports.html b/v0.3.6/reference/reexports.html index 98ab3b1a9..e9c6758b8 100644 --- a/v0.3.6/reference/reexports.html +++ b/v0.3.6/reference/reexports.html @@ -1,19 +1,39 @@ - - + + + + + +Objects exported from other packages — reexports • mmrm +Objects exported from other packages — reexports • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -38,7 +60,8 @@ + - + + - + @@ -124,30 +152,36 @@

    These objects are imported from other packages. Follow the links below to see their documentation.

    -
    generics
    +
    +
    generics

    augment, glance, tidy

    -
    + + - + +
    -
    + + - - + + diff --git a/v0.3.6/reference/refit_multiple_optimizers.html b/v0.3.6/reference/refit_multiple_optimizers.html index fe6de8f47..8877fba6b 100644 --- a/v0.3.6/reference/refit_multiple_optimizers.html +++ b/v0.3.6/reference/refit_multiple_optimizers.html @@ -1,5 +1,25 @@ - -Refitting MMRM with Multiple Optimizers — refit_multiple_optimizers • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    refit_multiple_optimizers(fit, ..., control = mmrm_control(...))
    -

    Arguments

    -
    fit
    +

    Arguments +

    +
    +
    fit

    (mmrm_fit)
    original model fit from fit_single_optimizer().

    @@ -129,20 +160,24 @@

    Arguments -

    Value

    +

    Value +

    The best (in terms of log likelihood) fit which converged.

    -

    Note

    +

    Note +

    For Windows, no parallel computations are currently implemented.

    -

    Examples

    +

    Examples +

    fit <- fit_single_optimizer(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data,
    @@ -153,22 +188,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.6/reference/register_on_load.html b/v0.3.6/reference/register_on_load.html index 176b1b4a4..c342d01e3 100644 --- a/v0.3.6/reference/register_on_load.html +++ b/v0.3.6/reference/register_on_load.html @@ -1,5 +1,25 @@ - -Helper Function for Registering Functionality With Suggests Packages — register_on_load • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    register_on_load(
       pkg,
       ver = c(NA_character_, NA_character_),
    @@ -122,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    pkg
    +

    Arguments +

    +
    +
    pkg

    (string)
    package name.

    @@ -144,9 +175,11 @@

    Arguments -

    Value

    +

    Value +

    A logical (invisibly) indicating whether registration was successful. @@ -154,22 +187,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/tmb_cov_type.html b/v0.3.6/reference/tmb_cov_type.html index e6ec53102..8a998eeb2 100644 --- a/v0.3.6/reference/tmb_cov_type.html +++ b/v0.3.6/reference/tmb_cov_type.html @@ -1,5 +1,25 @@ - -Produce A Covariance Identifier Passing to TMB — tmb_cov_type • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    tmb_cov_type(cov)
    -

    Arguments

    -
    cov
    +

    Arguments +

    +
    +
    cov

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    A string used for method dispatch when passed to TMB.

    + +
    -
    + + - - + + diff --git a/v0.3.6/reference/validate_cov_struct.html b/v0.3.6/reference/validate_cov_struct.html index 11b06cbc8..85ec3811e 100644 --- a/v0.3.6/reference/validate_cov_struct.html +++ b/v0.3.6/reference/validate_cov_struct.html @@ -1,5 +1,25 @@ - -Validate Covariance Structure Data — validate_cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    validate_cov_struct(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    x if successful, or an error is thrown otherwise.

    + +
    -
    + + - - + + diff --git a/v0.3.7/404.html b/v0.3.7/404.html index 6e5d70714..5f23bc634 100644 --- a/v0.3.7/404.html +++ b/v0.3.7/404.html @@ -1,5 +1,4 @@ - - + @@ -81,11 +80,10 @@ Changelog +v0.2.2 + + - + + - + @@ -110,46 +136,66 @@

    Thank you for your interest in contributing to this repo! Your contribution is highly valued. Please go through this document for guidance on how to contribute.

    -

    Programming conventions

    +

    Programming conventions +

    Please follow the programming conventions to ensure a consistent programming style across the package.

    Generally we follow the tidyverse style guide. Some specific conventions that deviate from this are explained below.

    -

    Functions

    -
    1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
    2. +

      Functions +

      +
        +
      1. Function names should be explicit and clear. Words should be separated by underscore (snake_case).
      2. Functions starting with h_ are helper functions and they should not be exported.
      3. Functions should be well documented using roxygen2 (even when they are not exported).
      4. Functions must be unit tested (even when they are not exported).
      5. -
    + +
    -

    Imports

    +

    Imports +

    In package mmrm, we follow the following convention in package imports.

    -
    1. When only a few functions from another package are needed: -
      1. In DESCRIPTION, add that package into Imports.
      2. +
          +
        1. When only a few functions from another package are needed: +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we add a importFrom with a single function from the package. -
            1. The function imported can be any random function within the package.
            2. -
          3. +
              +
            1. The function imported can be any random function within the package.
            2. +
            +
          4. Always use package::function style wherever you need to use the function.
          5. Example: stats.
          6. -
        2. +
        +
      3. When many functions from another package are needed: -
        1. In DESCRIPTION, add that package into Imports.
        2. +
            +
          1. In DESCRIPTION, add that package into Imports.
          2. In mmrm-package.R, we use a import to import every function.
          3. Use the functions directly without prefix.
          4. Example: checkmate.
          5. -
          -
    + + + +
    -

    Comments

    -
    • Comments should always follow sentence style.
    • +

      Comments +

      +
        +
      • Comments should always follow sentence style.
      • Comments should be as minimal as possible: Generally the code and variable names should be clear enough to not need any comments. Only use them when needed and explain the “Why” and not the “What”.
      • -
    + +
    -

    Documentation

    -
    • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

    • +

      Documentation +

      +
        +
      • All functions must be documented using roxygen2 chunks, including internal functions (see also above).

      • Exported objects must have a lifecycle badge to clarify the maturity.

        -
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • -
      • +
          +
        • Start with "experimental" status and consider upgrading to "stable" once the interface has been stable for several months.
        • +
        +
      • Use Title Style for the title of the documentation.

      • Always include a @description part with at least one sentence describing the object.

      • @@ -161,38 +207,55 @@

        Documentationwebsite.

      • In vignettes, you cannot directly reference help pages but only pkgdown web pages. Note that this includes only exported objects. To make it look similar to the help page references, please here also use function() style.

      • mmrm_review_methods.Rmd is a large vignette and we precompute this vignette to make the GitHub actions faster. Run the script vignettes/precompile.R to regenerate the precomputed vignette and subsequently update it in GitHub. Before every release we need to run this again. Please note you need to install the package and then compile the vignette because efficiency is better after installation to provide a fair comparison.

      • -
    + +
    -

    Github conventions

    +

    Github conventions +

    When using GitHub to collaborate, the following conventions are needed:

    -
    1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. -
      • If you are going to work on this issue, please assign yourself.
      • -
    2. +
        +
      1. Github issues is for issues, feature requests, bugs. Before creating a issue, please make sure this issue has not been reported yet. +
          +
        • If you are going to work on this issue, please assign yourself.
        • +
        +
      2. Please create a branch in the mmrm repository, instead of creating forks, unless you are not yet a team member. -
        • Branches should be associated with a GitHub issue and linked to an issue id.
        • +
            +
          • Branches should be associated with a GitHub issue and linked to an issue id.
          • The name of a branch should be of the form: <issue_id>_<short_discription>.
          • -
          +
        +
      3. Add changes to the branch and push it to GitHub. -
        • Please use clear commit messages.
        • +
            +
          • Please use clear commit messages.
          • Please keep your changes focused on the issue. If there are independent changes, please separate it into another PR linking to another issue.
          • -
          +
        +
      4. Please create a Pull Request when you think your code changes are ready: -
        • Functions are well documented.
        • +
            +
          • Functions are well documented.
          • Functions have corresponding unit tests.
          • Changes pass all the GitHub action checks.
          • The checklist in the corresponding issue is completed.
          • -
          +
        +
      5. Address all the comments you receive. -
        • at least one approval is needed to merge.
        • -
      6. -
    +
      +
    • at least one approval is needed to merge.
    • +
    + + +
    -

    Contribution tips

    +

    Contribution tips +

    -

    Development environment Set-up

    +

    Development environment Set-up +

    The development this mmrm package is based on the latest R version and C++ compilers. The package dependencies are the most recent versions from CRAN. We recommend that your working environment is set up in the same way. Additionally, there are some tools we recommend you to install:

    -
    1. +
        +
      1. RTools if you work on a Windows operating system. Alternatively you can use docker to separate the operating system and the development system.
      2. GitKraken is a very useful user interface for git including visualization of git commit graphs, file history, etc.
      3. @@ -200,43 +263,82 @@

        Development environment Set-uplintr will allow you to perform static code analysis.
      4. pre-commit is a Python module that allows you to identify issues before you commit locally.
      5. -

    + +
    -

    Issue labels

    +

    Issue labels +

    The issues are categorized with several labels:

    - +
    Label name
    ++++ + + - + + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + - + + + -
    Label name Description
    SPx
    SPx SP (story points) indicate complexity, and the larger the subsequent number, the more time consuming the issue is expected to be
    priority
    priority Issues with this label should be completed with higher priority
    good first issue
    good first issue Good choices for new team members
    blocked
    blocked Blocked by other issues
    bug
    bug Something isn’t working
    devops
    devops Development and Operation
    discussion
    discussion Discussion needed
    documentation
    documentation Improvement of documentation is needed
    duplicate
    duplicate The issue already exists
    enhancement
    enhancement New feature or request
    help wanted
    help wanted Extra attention is needed
    invalid
    invalid This doesn’t seem right
    question
    question Further information needed

    Please choose an issue based on your interest, issue complexity, and priority.

    + + + +

    Please choose an issue based on your interest, issue complexity, and priority.

    -

    Add new unit tests

    +

    Add new unit tests +

    To add a new unit test, you need to first identify the test scope. Does the test fit in the scope of existing tests? If so, please modify the existing test files under tests/testthat/ folder or src/ folder, depending on whether the code to be tested is R or C++. Otherwise please create a new test file, with a name prefix of “test-”.

    In each test case, use the following structure:

    @@ -249,19 +351,25 @@ 

    Add new unit tests -

    Add integration tests

    +

    Add integration tests +

    Integration tests compare the results of SAS and R and assures the quality of our code. To add an integration test, you need to do the following:

    -
    1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
    2. +
        +
      1. Use SAS to run an appropriate mmrm model with proc mixed, using fev_data.
      2. Save the results in .txt format in the design/SAS/ folder.
      3. Decide the key outputs that are needed for comparison.
      4. Add a unit test verifying that the R implementation of the same model has the same results (conversion may be needed).
      5. -
    + +
    -

    Get started with C++

    +

    Get started with C++ +

    If you have no experience with C++, it is totally fine: TMB has provided us with many high-level functionalities that is very similar to R. Here we only list the most important things that you need to go through before you begin C++ programming.

    -
    1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
    2. +
        +
      1. Semicolons. C++ use semicolons to terminate a statement. In R, we can use semicolons or line breaks to do so, but in C++, we need both semicolons and line breaks.
      2. Types. C++ is a strong type programming language and all objects need to be declared with type. Sometimes you can combine the declaration and definition. -
        1. +
            +
          1. int i = 1; This works, as we declare i as int and define it to be 1.
          2. i = 1; This fails, because i is not declared yet.
          3. @@ -269,53 +377,70 @@

            Get started with C++
          4. in R, if (TRUE) { a = '123' }; print(a) is legal.
          5. +
              +
            1. in R, if (TRUE) { a = '123' }; print(a) is legal.
            2. in C++, if (1) {string a = '123'}; std::stdout << a << std::endl; is illegal, because object a is terminated already.
            3. in C++, string a; if (1) {a = '123'}; std::stdout << a << std::endl; is legal, a is declared prior to if statement.
            4. -
            +

          +
        2. Polymorphism. Unlike in R, where function arguments have no explicitly defined types, in C++ the type of each argument of a function must be pre-specified. -
          1. +
              +
            1. Template is a special function that works with generic argument type. We could imagine a single function that could work on arguments of arbitrary type, and template functions make this possible through separation of function logic from the argument declaration. In this way we can use template functions and avoid the need to replicate the whole code for each type.
            2. -
          2. -

          With these points in mind, you are about ready to go.

          +
        +
      3. +
      +

      With these points in mind, you are about ready to go.

    -

    Get started with TMB

    +

    Get started with TMB +

    In mmrm we are not including any latent variables and so the Laplace approximation aspect of TMB is not used. We only use the automatic differentiation part of TMB. For detailed documentation of TMB, visit the TMB reference.

    One important feature of TMB are the R style matrix/array calculations. This is important because we mainly use this part to conduct our calculations. See matrix_arrays.cpp for examples.

    -

    Add a new covariance structure

    +

    Add a new covariance structure +

    To add a new covariance structure, you need to do the following:

    -
    1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
    2. +
        +
      1. Understand the covariance structure and add appropriate documentation in covariance structure. Create a draft pull request to invite discussion from other team members.
      2. Implement the covariance structure on the C++ side and the corresponding R interface.
      3. Add unit tests to make sure the new covariance structure is working as expected.
      4. Add integration tests under design/SAS/ folder to make sure SAS and R produce similar results (within tolerance).
      5. -
    + +
    -

    Add additional data

    +

    Add additional data +

    To add additional data to mmrm, please follow the next steps:

    -
    1. Make sure the data is needed.
    2. +
        +
      1. Make sure the data is needed.
      2. Document the data in R/data.R.
      3. Use save to create an rda data only containing this dataset. Here the function usethis::use_data can also be helpful.
      4. -
    + +
    -

    Communications within team

    +

    Communications within team +

    There are several communication channels, please use appropriate ones.

    -

    GitHub

    +

    GitHub +

    GitHub issues and pull requests are where implementations are discussed and reviewed. Feature requests, bugs, enhancements, technical implementations can be discussed here. When you have ideas that needs to be documented, it is better to have them in GitHub.

    -

    Slack

    +

    Slack +

    Slack is a messaging tool and we have the mmrm channel under the rinpharma space. You can put anything in the slack channel, e.g., you have completed a issue and are waiting for review, or you have some questions and don’t want to wait until the next stand-up meeting.

    To join the slack channel, please make sure you have a slack account, and send the email address to any team member.

    -

    Stand-up meetings

    +

    Stand-up meetings +

    We have stand-up meetings currently three times a week. The purpose of stand-up meetings is for team members to discuss the current work progress and raise any issue/questions for team discussion if needed.

    You don’t need to join all three meetings.

    @@ -323,22 +448,26 @@

    Stand-up meetings

    + + + + - - + + diff --git a/v0.3.7/PULL_REQUEST_TEMPLATE.html b/v0.3.7/PULL_REQUEST_TEMPLATE.html index af2f30338..9c02e4308 100644 --- a/v0.3.7/PULL_REQUEST_TEMPLATE.html +++ b/v0.3.7/PULL_REQUEST_TEMPLATE.html @@ -1,5 +1,23 @@ - -Description • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +44,8 @@ + - + + - + @@ -111,22 +137,26 @@ - + +
    -
    + + - - + + diff --git a/v0.3.7/articles/algorithm.html b/v0.3.7/articles/algorithm.html index 761a4b4a4..061087d2d 100644 --- a/v0.3.7/articles/algorithm.html +++ b/v0.3.7/articles/algorithm.html @@ -1,5 +1,4 @@ - - + @@ -83,11 +82,10 @@ Changelog +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + - + + - + @@ -109,73 +135,101 @@

    Introduction

    -
    Package Introduction
    +
    +
    Package Introduction
    -
    Mixed Models for Repeated Measures
    + +
    Mixed Models for Repeated Measures
    -
    Comparison with other software
    + +
    Comparison with other software
    -
    + +
    +

    Covariance Structures

    -
    Covariance Structures
    +
    +
    Covariance Structures
    -
    + + + + + + + + + + + + + + + + +
    -
    + + - - + + diff --git a/v0.3.7/articles/introduction.html b/v0.3.7/articles/introduction.html index fb77657ad..31673531d 100644 --- a/v0.3.7/articles/introduction.html +++ b/v0.3.7/articles/introduction.html @@ -1,5 +1,4 @@ - - + @@ -83,11 +82,10 @@ Changelog +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + +v0.2.2 + + - + + - + @@ -108,7 +134,8 @@

    Authors

    -
    • +
        +
      • Daniel Sabanes Bove. Author, maintainer.

      • @@ -180,7 +207,8 @@

        Authors

        AstraZeneca plc. Copyright holder, funder.

        -
    + +

    Citation

    @@ -199,22 +227,26 @@

    Citation

    }
    + +
    -
    + + - - + + diff --git a/v0.3.7/index.html b/v0.3.7/index.html index 68ef30b5d..97874de6a 100644 --- a/v0.3.7/index.html +++ b/v0.3.7/index.html @@ -1,5 +1,4 @@ - - + @@ -107,11 +106,10 @@ Changelog +v0.2.2 + + - + + - + @@ -107,18 +133,26 @@
    -

    mmrm 0.3.7

    +

    mmrm 0.3.7 +

    -

    Miscellaneous

    -
    • In documentation of mmrm_control(), the allowed vcov definition is corrected to “Empirical-Jackknife” (CR3), and “Empirical-Bias-Reduced” (CR2).
    • +

      Miscellaneous +

      +
        +
      • In documentation of mmrm_control(), the allowed vcov definition is corrected to “Empirical-Jackknife” (CR3), and “Empirical-Bias-Reduced” (CR2).
      • Fix a compiler warning related to missing format specification in error message function call.
      • -
    + +
    -

    mmrm 0.3.6

    CRAN release: 2023-11-17

    +

    mmrm 0.3.6 +

    +

    CRAN release: 2023-11-17

    -

    New Features

    -
    • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
    • +

      New Features +

      +
        +
      • The argument method of mmrm() now only specifies the method used for the degrees of freedom adjustment.
      • Add empirical, empirical Jackknife and empirical bias-reduced adjusted coefficients covariance estimates, which can be specified via the new vcov argument of mmrm().
      • Add residual and between-within degrees of freedom methods.
      • Add Kenward-Roger support for spatial covariance structures.
      • @@ -129,76 +163,105 @@

        New FeaturesAdd tidy(), glance() and augment() methods to tidy the fit results into summary tables.
      • Add tidymodels framework support via a parsnip interface.
      • Add argument covariance to mmrm() to allow for easier programmatic access to specifying the model’s covariance structure and to expose covariance customization through the tidymodels interface.
      • -

    + +
    -

    Bug Fixes

    -
    • Previously mmrm() follows the global option na.action and if it is set other than "na.omit" an assertion would fail. This is now fixed and hence NA values are always removed prior to model fitting, independent of the global na.action option.
    • +

      Bug Fixes +

      +
        +
      • Previously mmrm() follows the global option na.action and if it is set other than "na.omit" an assertion would fail. This is now fixed and hence NA values are always removed prior to model fitting, independent of the global na.action option.
      • Previously a model.frame() call on an mmrm object with transformed terms, or new data, e.g. model.frame(mmrm(Y ~ log(X) + ar1(VISIT|ID), data = new_data), would fail. This is now fixed.
      • Previously mmrm() always required a data argument. Now fitting mmrm can also use environment variables instead of requiring data argument. (Note that fit_mmrm is not affected.)
      • Previously emmeans() failed when using transformed terms or not including the visit variable in the model formula. This is now fixed.
      • Previously mmrm() might provide non-finite values in the Jacobian calculations, leading to errors in the Satterthwaite degrees of freedom calculations. This will raise an error now and thus alert the user that the model fit was not successful.
      • -
    + +
    -

    Miscellaneous

    -
    • Use automatic differentiation to calculate Satterthwaite adjusted degrees of freedom, resulting in 10-fold speed-up of the Satterthwaite calculations after the initial model fit.
    • +

      Miscellaneous +

      +
        +
      • Use automatic differentiation to calculate Satterthwaite adjusted degrees of freedom, resulting in 10-fold speed-up of the Satterthwaite calculations after the initial model fit.
      • Add an interactive confirmation step if the number of visit levels is too large for non-spatial covariance structures. Use options(mmrm.max_visits = ) to specify the maximum number of visits allowed in non-interactive mode.
      • Removed free_cores() in favor of parallelly::availableCores(omit = 1).
      • The model.frame() method has been updated: The full argument is deprecated and the include argument can be used instead; by default all relevant variables are returned. Furthermore, it returns a data.frame the size of the number of observations utilized in the model for all combinations of the include argument when na.action= "na.omit".
      • Overall, seven vignettes have been added to the package. All vignettes have a slightly different look now to reduce the size of the overall R package on CRAN.
      • The used optimizer is now available via component(., "optimizer") instead of previously attr(., "optimizer").
      • -
    + +
    -

    mmrm 0.2.2

    CRAN release: 2022-12-20

    +

    mmrm 0.2.2 +

    +

    CRAN release: 2022-12-20

    -

    New Features

    -
    • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
    • +

      New Features +

      +
        +
      • Add support for Kenward-Roger adjusted coefficients covariance matrix and degrees of freedom in mmrm function call with argument method. Options are “Kenward-Roger”, “Kenward-Roger-Linear” and “Satterthwaite” (which is still the default). Subsequent methods calls will respect this initial choice, e.g. vcov(fit) will return the adjusted coefficients covariance matrix if a Kenward-Roger method has been used.
      • Update the mmrm arguments to allow users more fine-grained control, e.g. mmrm(..., start = start, optimizer = c("BFGS", "nlminb")) to set the starting values for the variance estimates and to choose the available optimizers. These arguments will be passed to the new function mmrm_control.
      • Add new argument drop_visit_levels to allow users to keep all levels in visits, even when they are not observed in the data. Dropping unobserved levels was done silently previously, and now a message will be given. See ?mmrm_control for more details.
      • -
    + +
    -

    Bug Fixes

    -
    • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
    • +

      Bug Fixes +

      +
        +
      • Previously duplicate time points could be present for a single subject, and this could lead to segmentation faults if more than the total number of unique time points were available for any subject. Now it is checked that there are no duplicate time points per subject, and this is explained also in the function documentation and the introduction vignette.
      • Previously in mmrm calls, the weights object in the environment where the formula is defined was replaced by the weights used internally. Now this behavior is removed and your variable weights e.g. in the global environment will no longer be replaced.
      • -
    + +
    -

    Miscellaneous

    -
    • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
    • +

      Miscellaneous +

      +
        +
      • Deprecated free_cores() in favor of parallelly::availableCores(omit = 1).
      • Deprecated optimizer = "automatic" in favor of not specifying the optimizer. By default, all remaining optimizers will be tried if the first optimizer fails to reach convergence.
      • -
    + +
    -

    mmrm 0.1.5

    CRAN release: 2022-10-18

    -
    • First CRAN version of the package.
    • +

      mmrm 0.1.5 +

      +

      CRAN release: 2022-10-18

      +
        +
      • First CRAN version of the package.
      • The package fits mixed models for repeated measures (MMRM) based on the marginal linear model without random effects.
      • The motivation for this package is to have a fast, reliable (in terms of convergence behavior) and feature complete implementation of MMRM in R.
      • -
      -

      New Features

      -
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • +
      +
      +

      New Features +

      +
        +
      • Currently 10 covariance structures are supported (unstructured; as well as homogeneous and heterogeneous versions of Toeplitz, auto-regressive order one, ante-dependence, compound symmetry; and spatial exponential).
      • Fast C++ implementation of Maximum Likelihood (ML) and Restricted Maximum Likelihood (REML) estimation.
      • Currently Satterthwaite adjusted degrees of freedom calculation is supported.
      • Interface to the emmeans package for computing estimated marginal means (also called least-square means) for the coefficients.
      • Multiple optimizers are run to reach convergence in as many cases as possible.
      • Flexible formula based model specification and support for standard S3 methods such as summary, logLik, etc.
      • -
      +
    +
    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/COV_TYPES.html b/v0.3.7/reference/COV_TYPES.html index cd3121a48..a99c011f3 100644 --- a/v0.3.7/reference/COV_TYPES.html +++ b/v0.3.7/reference/COV_TYPES.html @@ -1,5 +1,25 @@ - -Covariance Type Database — COV_TYPES • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,14 +140,17 @@
    -

    Usage

    +

    Usage +

    COV_TYPES
    -

    Format

    +

    Format +

    A data frame with 5 variables and one record per covariance type:

    -
    name
    +
    +
    name

    The long-form name of the covariance structure type

    abbr
    @@ -138,25 +169,30 @@

    Format<

    A logical value indicating whether the covariance structure is spatial.

    -

    + + + +
    -
    + + - - + + diff --git a/v0.3.7/reference/as.cov_struct.html b/v0.3.7/reference/as.cov_struct.html index 4e3ec6bbe..287e683d9 100644 --- a/v0.3.7/reference/as.cov_struct.html +++ b/v0.3.7/reference/as.cov_struct.html @@ -1,5 +1,25 @@ - -Coerce into a Covariance Structure Definition — as.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    as.cov_struct(x, ...)
     
     # S3 method for formula
    @@ -120,8 +149,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    an object from which to derive a covariance structure. See object specific sections for details.

    @@ -134,44 +165,66 @@

    Arguments -

    Value

    +

    Value +

    A cov_struct() object.

    -

    Details

    +

    Details +

    A covariance structure can be parsed from a model definition formula or call. Generally, covariance structures defined using non-standard evaluation take the following form:

    -

    type( (visit, )* visit | (group /)? subject )

    +

    +
    +
    type( (visit, )* visit | (group /)? subject )
    +

    +

    For example, formulas may include terms such as

    -

    us(time | subject)
    +

    +
    +
    us(time | subject)
     cp(time | group / subject)
    -sp_exp(coord1, coord2 | group / subject)

    +sp_exp(coord1, coord2 | group / subject)
    +

    +

    Note that only sp_exp (spatial) covariance structures may provide multiple coordinates, which identify the Euclidean distance between the time points.

    -

    Methods (by class)

    +

    Methods (by class) +

    -
    • as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be +

        +
      • +

        as.cov_struct(formula): When provided a formula, any specialized functions are assumed to be covariance structure definitions and must follow the form:

        -

        y ~ xs + type( (visit, )* visit | (group /)? subject )

        +

        +
        +
        y ~ xs + type( (visit, )* visit | (group /)? subject )
        +

        +

        Any component on the right hand side of a formula is considered when -searching for a covariance definition.

      • -
    +searching for a covariance definition.

    + + +
    -

    See also

    +

    See also +

    Other covariance types: cov_struct(), covariance_types

    -

    Examples

    +

    Examples +

    # provide a covariance structure as a right-sided formula
     as.cov_struct(~ csh(visit | group / subject))
     #> <covariance structure>
    @@ -191,22 +244,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.7/reference/bcva_data.html b/v0.3.7/reference/bcva_data.html index 72c5312ed..248cb0df9 100644 --- a/v0.3.7/reference/bcva_data.html +++ b/v0.3.7/reference/bcva_data.html @@ -1,5 +1,25 @@ - -Example Data on BCVA — bcva_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,48 +140,59 @@
    -

    Usage

    +

    Usage +

    bcva_data
    -

    Format

    -

    A tibble with 10,000 rows and 7 variables:

    • USUBJID: subject ID.

    • +

      Format +

      +

      A tibble with 10,000 rows and 7 variables:

      +
        +
      • USUBJID: subject ID.

      • VISITN: visit number (numeric).

      • AVISIT: visit number (factor).

      • ARMCD: treatment, TRT or CTL.

      • RACE: 3-category race.

      • BCVA_BL: BCVA at baseline.

      • BCVA_CHG: Change in BCVA at study visits.

      • -
    + +
    -

    Source

    +

    Source +

    This is an artificial dataset.

    -

    Note

    +

    Note +

    Measurements of BCVA (best corrected visual acuity) is a measure of how how many letters a person can read off of an eye chart using corrective lenses or contacts. This a common endpoint in ophthalmology trials.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/cached_mmrm_results.html b/v0.3.7/reference/cached_mmrm_results.html index 1484689ef..784363df2 100644 --- a/v0.3.7/reference/cached_mmrm_results.html +++ b/v0.3.7/reference/cached_mmrm_results.html @@ -1,5 +1,25 @@ - -Cache Data for mmrm Model Comparison — cached_mmrm_results • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,25 +140,32 @@
    -

    Usage

    +

    Usage +

    cached_mmrm_results
    -

    Format

    -

    A list with following elements:

    • conv_time_fev: Convergence time on FEV data.

    • +

      Format +

      +

      A list with following elements:

      +
        +
      • conv_time_fev: Convergence time on FEV data.

      • conv_time_bcva: Convergence time on BCVA data.

      • rel_diff_ests_tbl_fev: Relative difference in estimates on FEV data.

      • rel_diff_ests_tbl_bcva: Relative difference in estimates on BCVA data.

      • conv_rate: Convergence rate on data with different missing levels.

      • df_missingness: Summary of missingness on simulated data.

      • -
    + +
    -

    Source

    +

    Source +

    This is created based on simulations on FEV data and BCVA data.

    -

    Note

    +

    Note +

    The cached data for comparison is used for the vignettes generation. Please make sure that this data is refreshed before each package release by running the script data-raw/mmrm_review.R. @@ -139,22 +174,26 @@

    Note

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/check_package_version.html b/v0.3.7/reference/check_package_version.html index 20d74f435..fbd968709 100644 --- a/v0.3.7/reference/check_package_version.html +++ b/v0.3.7/reference/check_package_version.html @@ -1,5 +1,25 @@ - -Check Suggested Dependency Against Version Requirements — check_package_version • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    check_package_version(pkg, ver = c(NA_character_, NA_character_))
    -

    Arguments

    -
    pkg
    +

    Arguments +

    +
    +
    pkg

    (string)
    package name.

    @@ -128,9 +159,11 @@

    Arguments -

    Value

    +

    Value +

    A logical (invisibly) indicating whether the loaded package meets @@ -138,22 +171,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/component.html b/v0.3.7/reference/component.html index c5f857ce8..4267a2e85 100644 --- a/v0.3.7/reference/component.html +++ b/v0.3.7/reference/component.html @@ -1,5 +1,25 @@ - -Component Access for mmrm_tmb Objects — component • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    component(
       object,
       name = c("cov_type", "subject_var", "n_theta", "n_subjects", "n_timepoints", "n_obs",
    @@ -124,24 +153,31 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    name

    (character)
    the component(s) to be retrieved.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding component of the object, see details.

    -

    Details

    -

    Available component() names are as follows:

    • call: low-level function call which generated the model.

    • +

      Details +

      +

      Available component() names are as follows:

      +
    + +
    -

    See also

    +

    See also +

    In the lme4 package there is a similar function getME().

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -3082,22 +3121,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.7/reference/cov_struct.html b/v0.3.7/reference/cov_struct.html index 1259febb9..1854aa651 100644 --- a/v0.3.7/reference/cov_struct.html +++ b/v0.3.7/reference/cov_struct.html @@ -1,5 +1,25 @@ - -Define a Covariance Structure — cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    cov_struct(
       type = cov_types(),
       visits,
    @@ -123,8 +152,10 @@ 

    Usage

    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    the name of the covariance structure type to use. For available options, see cov_types(). If a type abbreviation is used that implies heterogeneity (e.g. cph) and no value is provided to @@ -150,22 +181,26 @@

    Arguments -

    Value

    +

    Value +

    A cov_struct object.

    -

    See also

    +

    See also +

    Other covariance types: as.cov_struct(), covariance_types

    -

    Examples

    +

    Examples +

    cov_struct("csh", "AVISITN", "USUBJID")
     #> <covariance structure>
     #> heterogeneous compound symmetry:
    @@ -182,22 +217,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.7/reference/cov_type_abbr.html b/v0.3.7/reference/cov_type_abbr.html index 7b061db3a..309f72efe 100644 --- a/v0.3.7/reference/cov_type_abbr.html +++ b/v0.3.7/reference/cov_type_abbr.html @@ -1,5 +1,25 @@ - -Retrieve Associated Abbreviated Covariance Structure Type Name — cov_type_abbr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    cov_type_abbr(type)
    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    either a full name or abbreviate covariance structure type name to collapse into an abbreviated type.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding abbreviated covariance type name.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/cov_type_name.html b/v0.3.7/reference/cov_type_name.html index 8347aa4cc..64607c9f6 100644 --- a/v0.3.7/reference/cov_type_name.html +++ b/v0.3.7/reference/cov_type_name.html @@ -1,5 +1,25 @@ - -Retrieve Associated Full Covariance Structure Type Name — cov_type_name • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    cov_type_name(type)
    -

    Arguments

    -
    type
    +

    Arguments +

    +
    +
    type

    (string)
    either a full name or abbreviate covariance structure type name to convert to a long-form type.

    -
    + +
    -

    Value

    +

    Value +

    The corresponding abbreviated covariance type name.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/covariance_types.html b/v0.3.7/reference/covariance_types.html index 45f1fbea4..9b742de26 100644 --- a/v0.3.7/reference/covariance_types.html +++ b/v0.3.7/reference/covariance_types.html @@ -1,5 +1,25 @@ - -Covariance Types — covariance_types • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    cov_types(
       form = c("name", "abbr", "habbr"),
       filter = c("heterogeneous", "spatial")
    @@ -120,8 +149,10 @@ 

    Usage

    -

    Arguments

    -
    form
    +

    Arguments +

    +
    +
    form

    (character)
    covariance structure type name form. One or more of "name", "abbr" (abbreviation), or "habbr" (heterogeneous abbreviation).

    @@ -131,67 +162,155 @@

    Arguments or "spatial".

    -

    + +
    -

    Value

    +

    Value +

    A character vector of accepted covariance structure type names and abbreviations.

    -

    Note

    +

    Note +

    The ante-dependence covariance structure in this package refers to homogeneous ante-dependence, while the ante-dependence covariance structure from SAS PROC MIXED refers to heterogeneous ante-dependence and the homogeneous version is not available in SAS.

    For all non-spatial covariance structures, the time variable must -be coded as a factor.

    -

    Spatial Covariance structures:

    +be coded as a factor.

    +
    +

    Spatial Covariance structures: +

    -
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)

    where \(d_{ij}\) denotes the Euclidean distance between time points + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    sp_expspatial exponential\(2\)\(\sigma^{2}\rho^{-d_{ij}}\)
    +

    where \(d_{ij}\) denotes the Euclidean distance between time points \(i\) and \(j\).

    -

    Abbreviations for Covariance Structures

    +

    Abbreviations for Covariance Structures +

    -

    Common Covariance Structures:

    +

    Common Covariance Structures: +

    -
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    StructureDescriptionParameters\((i, j)\) element
    adAnte-dependence\(m\)\(\sigma^{2}\prod_{k=i}^{j-1}\rho_{k}\)
    adhHeterogeneous ante-dependence\(2m-1\)\(\sigma_{i}\sigma_{j}\prod_{k=i}^{j-1}\rho_{k}\)
    ar1First-order auto-regressive\(2\)\(\sigma^{2}\rho^{\left \vert {i-j} \right \vert}\)
    ar1hHeterogeneous first-order auto-regressive\(m+1\)\(\sigma_{i}\sigma_{j}\rho^{\left \vert {i-j} \right \vert}\)
    csCompound symmetry\(2\)\(\sigma^{2}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    cshHeterogeneous compound symmetry\(m+1\)\(\sigma_{i}\sigma_{j}\left[ \rho I(i \neq j)+I(i=j) \right]\)
    toepToeplitz\(m\)\(\sigma_{\left \vert {i-j} \right \vert +1}\)
    toephHeterogeneous Toeplitz\(2m-1\)\(\sigma_{i}\sigma_{j}\rho_{\left \vert {i-j} \right \vert}\)
    usUnstructured\(m(m+1)/2\)\(\sigma_{ij}\)
    +

    where \(i\) and \(j\) denote \(i\)-th and \(j\)-th time points, respectively, out of total \(m\) time points, \(1 \leq i, j \leq m\).

    -

    See also

    +

    See also +

    Other covariance types: as.cov_struct(), cov_struct()

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/df_1d.html b/v0.3.7/reference/df_1d.html index fccad4b0b..f34edb06f 100644 --- a/v0.3.7/reference/df_1d.html +++ b/v0.3.7/reference/df_1d.html @@ -1,9 +1,29 @@ - - + + + + + +Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm +Calculation of Degrees of Freedom for One-Dimensional Contrast — df_1d • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    df_1d(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -133,16 +164,19 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -168,22 +202,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.7/reference/df_md.html b/v0.3.7/reference/df_md.html index c66e4d7eb..93449e64e 100644 --- a/v0.3.7/reference/df_md.html +++ b/v0.3.7/reference/df_md.html @@ -1,11 +1,31 @@ - - + + + + + +Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm +Calculation of Degrees of Freedom for Multi-Dimensional Contrast — df_md • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -121,13 +149,16 @@
    -

    Usage

    +

    Usage +

    df_md(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -137,16 +168,19 @@

    Arguments -

    Value

    +

    Value +

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

    -

    Examples

    +

    Examples +

    object <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -169,22 +203,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.7/reference/drop_elements.html b/v0.3.7/reference/drop_elements.html index 2149710c2..80775b48d 100644 --- a/v0.3.7/reference/drop_elements.html +++ b/v0.3.7/reference/drop_elements.html @@ -1,5 +1,25 @@ - -Drop Items from an Indexible — drop_elements • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    drop_elements(x, n)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    Any object that can be consumed by seq_along() and indexed by a logical vector of the same length.

    @@ -126,31 +157,37 @@

    Arguments -

    Value

    +

    Value +

    A subset of x.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/emit_tidymodels_register_msg.html b/v0.3.7/reference/emit_tidymodels_register_msg.html index 5f0133de8..ab76d07e2 100644 --- a/v0.3.7/reference/emit_tidymodels_register_msg.html +++ b/v0.3.7/reference/emit_tidymodels_register_msg.html @@ -1,5 +1,25 @@ - -Format a Message to Emit When Tidymodels is Loaded — emit_tidymodels_register_msg • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,12 +140,14 @@
    -

    Usage

    +

    Usage +

    emit_tidymodels_register_msg()
    -

    Value

    +

    Value +

    A character message to emit. Either a ansi-formatted cli output if @@ -125,22 +155,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/emmeans_support.html b/v0.3.7/reference/emmeans_support.html index 47ae18210..d43b242e3 100644 --- a/v0.3.7/reference/emmeans_support.html +++ b/v0.3.7/reference/emmeans_support.html @@ -1,17 +1,37 @@ - - + + + + + +Support for emmeans — emmeans_support • mmrm +Support for emmeans — emmeans_support • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -36,7 +58,8 @@ + - + + - +
    @@ -132,7 +161,8 @@
    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -161,22 +191,26 @@ 

    Examples#> Results are averaged over the levels of: RACE, SEX

    -
    + +
    + + - - + + diff --git a/v0.3.7/reference/fev_data.html b/v0.3.7/reference/fev_data.html index a92369a0a..43fec632b 100644 --- a/v0.3.7/reference/fev_data.html +++ b/v0.3.7/reference/fev_data.html @@ -1,5 +1,25 @@ - -Example Data on FEV1 — fev_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,17 @@
    -

    Usage

    +

    Usage +

    fev_data
    -

    Format

    -

    A tibble with 800 rows and 7 variables:

    • USUBJID: subject ID.

    • +

      Format +

      +

      A tibble with 800 rows and 7 variables:

      +
        +
      • USUBJID: subject ID.

      • AVISIT: visit number.

      • ARMCD: treatment, TRT or PBO.

      • RACE: 3-category race.

      • @@ -126,35 +158,42 @@

        Format<
      • FEV1_BL: FEV1 at baseline (%).

      • FEV1: FEV1 at study visits.

      • WEIGHT: weighting variable.

      • -

    + +
    -

    Source

    +

    Source +

    This is an artificial dataset.

    -

    Note

    +

    Note +

    Measurements of FEV1 (forced expired volume in one second) is a measure of how quickly the lungs can be emptied. Low levels of FEV1 may indicate chronic obstructive pulmonary disease (COPD).

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/fill_names.html b/v0.3.7/reference/fill_names.html index 1ba82d0e5..fd1536f8c 100644 --- a/v0.3.7/reference/fill_names.html +++ b/v0.3.7/reference/fill_names.html @@ -1,5 +1,25 @@ - -Complete character Vector Names From Values — fill_names • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    fill_names(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character or list)
    value whose names should be completed from element values.

    -
    + +
    -

    Value

    +

    Value +

    A named vector or list.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/fit_mmrm.html b/v0.3.7/reference/fit_mmrm.html index 95d829b17..4b8d5a68f 100644 --- a/v0.3.7/reference/fit_mmrm.html +++ b/v0.3.7/reference/fit_mmrm.html @@ -1,11 +1,31 @@ - - + + + + + +Low-Level Fitting Function for MMRM — fit_mmrm • mmrm +Low-Level Fitting Function for MMRM — fit_mmrm • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -121,7 +149,8 @@
    -

    Usage

    +

    Usage +

    fit_mmrm(
       formula,
       data,
    @@ -135,8 +164,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    model formula with exactly one special term specifying the visits within subjects, see details.

    @@ -175,16 +206,19 @@

    Argumentsmmrm_control().

    -

    + +
    -

    Value

    +

    Value +

    List of class mmrm_tmb, see h_mmrm_tmb_fit() for details. In addition, it contains elements call and optimizer.

    + + - - + + diff --git a/v0.3.7/reference/fit_single_optimizer.html b/v0.3.7/reference/fit_single_optimizer.html index 04e277cd7..5c289d946 100644 --- a/v0.3.7/reference/fit_single_optimizer.html +++ b/v0.3.7/reference/fit_single_optimizer.html @@ -1,9 +1,29 @@ - - + + + + + +Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm +Fitting an MMRM with Single Optimizer — fit_single_optimizer • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,7 +146,8 @@
    -

    Usage

    +

    Usage +

    fit_single_optimizer(
       formula,
       data,
    @@ -133,8 +162,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -174,9 +205,11 @@

    Arguments -

    Value

    +

    Value +

    The mmrm_fit object, with additional attributes containing warnings, @@ -184,7 +217,8 @@

    Value

    mmrm_tmb
    contents.

    + +
    - - + + diff --git a/v0.3.7/reference/flat_expr.html b/v0.3.7/reference/flat_expr.html index 37608a303..edba8d08f 100644 --- a/v0.3.7/reference/flat_expr.html +++ b/v0.3.7/reference/flat_expr.html @@ -1,11 +1,31 @@ - - + + + + + +Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm +Flatten Expressions for Non-standard Evaluation — flat_expr • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -30,7 +52,8 @@ + - + + - + @@ -121,61 +149,86 @@
    -

    Usage

    +

    Usage +

    flatten_call(call)
     
     flatten_expr(expr)
    -

    Arguments

    -
    call, expr
    +

    Arguments +

    +
    +
    call, expr

    (language)
    a language object to flatten.

    -
    + +
    -

    Value

    +

    Value +

    A list of atomic values, symbols, infix operator names and subexpressions.

    -

    Details

    +

    Details +

    Where 1 + 2 | 3 in R's syntax tree is (|, (+, 1, 2), 3), flattening it into its visual order produces (1, +, 2, |, 3), which makes for more fluent interpretation of non-standard grammar rules used in formulas.

    -

    Functions

    +

    Functions +

    -
    • flatten_call(): Flatten a call into a list of names and argument expressions.

      +
        +
      • +

        flatten_call(): Flatten a call into a list of names and argument expressions.

        The call name and all arguments are flattened into the same list, meaning a call of the form sp_exp(a, b, c | d / e) produces a list of the form (sp_exp, a, b, c, |, d, /, e).

        -

        flatten_call(quote(sp_exp(a, b, c | d / e)))

      • -
      • flatten_expr(): Flatten nested expressions

        -

        flatten_expr(quote(1 + 2 + 3 | 4))

      • -
    +

    +
    +
    flatten_call(quote(sp_exp(a, b, c | d / e)))
    +

    +
    + +
  • +

    flatten_expr(): Flatten nested expressions

    +

    +
    +
    flatten_expr(quote(1 + 2 + 3 | 4))
    +

    +
    +
  • + + + +
    -
    + + - - + + diff --git a/v0.3.7/reference/format.cov_struct.html b/v0.3.7/reference/format.cov_struct.html index ebd1fdfe6..08229cf52 100644 --- a/v0.3.7/reference/format.cov_struct.html +++ b/v0.3.7/reference/format.cov_struct.html @@ -1,5 +1,25 @@ - -Format Covariance Structure Object — format.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,45 +140,54 @@
    -

    Usage

    +

    Usage +

    # S3 method for cov_struct
     format(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    ...

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string for x.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/format_symbols.html b/v0.3.7/reference/format_symbols.html index bd5c479b7..88dc1929b 100644 --- a/v0.3.7/reference/format_symbols.html +++ b/v0.3.7/reference/format_symbols.html @@ -1,7 +1,27 @@ - -Format Symbol Objects — format_symbols • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,40 +143,49 @@
    -

    Usage

    +

    Usage +

    format_symbols(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character) A vector of variable names.

    -
    + +
    -

    Value

    +

    Value +

    A formatted string of comma-separated variables.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/formula_rhs.html b/v0.3.7/reference/formula_rhs.html index c99503422..b92beb21f 100644 --- a/v0.3.7/reference/formula_rhs.html +++ b/v0.3.7/reference/formula_rhs.html @@ -1,5 +1,25 @@ - -Extract Right-Hand-Side (rhs) from Formula — formula_rhs • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,47 +140,60 @@
    -

    Usage

    +

    Usage +

    formula_rhs(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula.

    -
    + +
    -

    Value

    +

    Value +

    A formula without a response, derived from the right-hand-side of the formula, f.

    -

    formula_rhs(a ~ b + c)
    -formula_rhs(~ b + c)

    +

    +
    +
    formula_rhs(a ~ b + c)
    +formula_rhs(~ b + c)
    +

    +
    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_add_covariance_terms.html b/v0.3.7/reference/h_add_covariance_terms.html index 59f661452..5efc79c19 100644 --- a/v0.3.7/reference/h_add_covariance_terms.html +++ b/v0.3.7/reference/h_add_covariance_terms.html @@ -1,5 +1,25 @@ - -Add Individual Covariance Variables As Terms to Formula — h_add_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_add_covariance_terms(f, covariance)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula to which covariance structure terms should be added.

    @@ -127,37 +158,44 @@

    Arguments -

    Value

    +

    Value +

    A new formula with included covariance terms.

    -

    Details

    +

    Details +

    stats::update() is used to append the covariance structure and the environment attribute will not be changed. This ensures the returned formula and the input formula have the same environment.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_add_terms.html b/v0.3.7/reference/h_add_terms.html index c84fdc457..2ce6025e4 100644 --- a/v0.3.7/reference/h_add_terms.html +++ b/v0.3.7/reference/h_add_terms.html @@ -1,5 +1,25 @@ - -Add Formula Terms with Character — h_add_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_add_terms(f, adds, drop_response = FALSE)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula to be updated.

    @@ -129,37 +160,44 @@

    Arguments -

    Value

    +

    Value +

    A new formula with elements in drops removed.

    -

    Details

    +

    Details +

    Elements in adds will be added from the formula, while the environment of the formula is unchanged. If adds is NULL or character(0), the formula is unchanged.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_coef_table.html b/v0.3.7/reference/h_coef_table.html index 62771b8db..4ea9fbf64 100644 --- a/v0.3.7/reference/h_coef_table.html +++ b/v0.3.7/reference/h_coef_table.html @@ -1,5 +1,25 @@ - -Coefficients Table for MMRM Fit — h_coef_table • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,18 +140,23 @@
    -

    Usage

    +

    Usage +

    h_coef_table(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    model fit.

    -
    + +
    -

    Value

    +

    Value +

    Matrix with one row per coefficient and columns @@ -131,22 +164,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_confirm_large_levels.html b/v0.3.7/reference/h_confirm_large_levels.html index 7cb61c017..9b6b34776 100644 --- a/v0.3.7/reference/h_confirm_large_levels.html +++ b/v0.3.7/reference/h_confirm_large_levels.html @@ -1,7 +1,27 @@ - -Ask for Confirmation on Large Visit Levels — h_confirm_large_levels • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,34 +143,42 @@
    -

    Usage

    +

    Usage +

    h_confirm_large_levels(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (numeric)
    number of visit levels.

    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_construct_model_frame_inputs.html b/v0.3.7/reference/h_construct_model_frame_inputs.html index 909ca6510..e8cf3f452 100644 --- a/v0.3.7/reference/h_construct_model_frame_inputs.html +++ b/v0.3.7/reference/h_construct_model_frame_inputs.html @@ -1,13 +1,33 @@ - - + + + + + +Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm +Construction of Model Frame Formula and Data Inputs — h_construct_model_frame_inputs • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -32,7 +54,8 @@ + - + + - + @@ -124,7 +152,8 @@
    -

    Usage

    +

    Usage +

    h_construct_model_frame_inputs(
       formula,
       data,
    @@ -135,8 +164,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (mmrm)
    mmrm fit object.

    @@ -152,36 +183,45 @@

    Arguments -

    Value

    +

    Value +

    -

    named list with four elements:

    • "formula": the formula including the columns requested in the include= argument.

    • +

      named list with four elements:

      +
        +
      • "formula": the formula including the columns requested in the include= argument.

      • "formula_full": the formula including all columns

      • "data": a data frame including all columns where factor and character columns have been processed with h_factor_ref().

      • "is_full": a logical scalar indicating if the formula and full formula are identical

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_default_value.html b/v0.3.7/reference/h_default_value.html index f5734b0cd..cc4a86c32 100644 --- a/v0.3.7/reference/h_default_value.html +++ b/v0.3.7/reference/h_default_value.html @@ -1,9 +1,29 @@ - -Default Value on NULL -Return default value when first argument is NULL. — h_default_value • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,42 +146,51 @@
    -

    Usage

    +

    Usage +

    h_default_value(x, y)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    Object.

    y

    Object.

    -
    + +
    -

    Details

    +

    Details +

    If x is NULL, returns y. Otherwise return x.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_df_1d_bw.html b/v0.3.7/reference/h_df_1d_bw.html index 0f3987762..693601679 100644 --- a/v0.3.7/reference/h_df_1d_bw.html +++ b/v0.3.7/reference/h_df_1d_bw.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom for One-Dimensional Contrast — h_df_1d_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_bw(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -127,31 +158,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_df_1d_kr.html b/v0.3.7/reference/h_df_1d_kr.html index a2f941c67..0c153c339 100644 --- a/v0.3.7/reference/h_df_1d_kr.html +++ b/v0.3.7/reference/h_df_1d_kr.html @@ -1,7 +1,27 @@ - -Calculation of Kenward-Roger Degrees of Freedom for One-Dimensional Contrast — h_df_1d_kr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_kr(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -130,31 +161,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_df_1d_res.html b/v0.3.7/reference/h_df_1d_res.html index 335f2fa24..db507a915 100644 --- a/v0.3.7/reference/h_df_1d_res.html +++ b/v0.3.7/reference/h_df_1d_res.html @@ -1,7 +1,27 @@ - -Calculation of Residual Degrees of Freedom for One-Dimensional Contrast — h_df_1d_res • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_res(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -130,31 +161,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_df_1d_sat.html b/v0.3.7/reference/h_df_1d_sat.html index cb69d302b..0251a2ff5 100644 --- a/v0.3.7/reference/h_df_1d_sat.html +++ b/v0.3.7/reference/h_df_1d_sat.html @@ -1,7 +1,27 @@ - -Calculation of Satterthwaite Degrees of Freedom for One-Dimensional Contrast — h_df_1d_sat • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_df_1d_sat(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -130,31 +161,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_df_bw_calc.html b/v0.3.7/reference/h_df_bw_calc.html index b53837b0d..2e2a39ea5 100644 --- a/v0.3.7/reference/h_df_bw_calc.html +++ b/v0.3.7/reference/h_df_bw_calc.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom — h_df_bw_calc • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,42 +140,54 @@
    -

    Usage

    +

    Usage +

    h_df_bw_calc(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    -

    List with:

    + + + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_df_md_bw.html b/v0.3.7/reference/h_df_md_bw.html index e86b61316..c780514ad 100644 --- a/v0.3.7/reference/h_df_md_bw.html +++ b/v0.3.7/reference/h_df_md_bw.html @@ -1,5 +1,25 @@ - -Calculation of Between-Within Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_bw(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_df_md_from_1d.html b/v0.3.7/reference/h_df_md_from_1d.html index 282f84c51..321441284 100644 --- a/v0.3.7/reference/h_df_md_from_1d.html +++ b/v0.3.7/reference/h_df_md_from_1d.html @@ -1,5 +1,25 @@ - -Creating F-Statistic Results from One-Dimensional Contrast — h_df_md_from_1d • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,22 +140,27 @@
    -

    Usage

    +

    Usage +

    h_df_md_from_1d(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    model fit.

    contrast

    (numeric)
    one-dimensional contrast.

    -
    + +
    -

    Value

    +

    Value +

    The one-dimensional degrees of freedom are calculated and then @@ -135,22 +168,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_df_md_kr.html b/v0.3.7/reference/h_df_md_kr.html index 9abf2a492..b0c512c8f 100644 --- a/v0.3.7/reference/h_df_md_kr.html +++ b/v0.3.7/reference/h_df_md_kr.html @@ -1,5 +1,25 @@ - -Calculation of Kenward-Roger Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_kr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_kr(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_df_md_res.html b/v0.3.7/reference/h_df_md_res.html index 274bdfa27..2ab9c7c52 100644 --- a/v0.3.7/reference/h_df_md_res.html +++ b/v0.3.7/reference/h_df_md_res.html @@ -1,5 +1,25 @@ - -Calculation of Residual Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_res • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_res(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_df_md_sat.html b/v0.3.7/reference/h_df_md_sat.html index 27bc2b17e..70c39b07c 100644 --- a/v0.3.7/reference/h_df_md_sat.html +++ b/v0.3.7/reference/h_df_md_sat.html @@ -1,5 +1,25 @@ - -Calculation of Satterthwaite Degrees of Freedom for Multi-Dimensional Contrast — h_df_md_sat • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_md_sat(object, contrast)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -128,31 +159,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_df_min_bw.html b/v0.3.7/reference/h_df_min_bw.html index ac80f8b12..ecd5e54a7 100644 --- a/v0.3.7/reference/h_df_min_bw.html +++ b/v0.3.7/reference/h_df_min_bw.html @@ -1,5 +1,25 @@ - -Assign Minimum Degrees of Freedom Given Involved Coefficients — h_df_min_bw • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_df_min_bw(bw_calc, is_coef_involved)
    -

    Arguments

    -
    bw_calc
    +

    Arguments +

    +
    +
    bw_calc

    (list)
    from h_df_bw_calc().

    @@ -126,9 +157,11 @@

    Arguments -

    Value

    +

    Value +

    The minimum of the degrees of freedom assigned to each involved @@ -136,22 +169,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_df_to_tibble.html b/v0.3.7/reference/h_df_to_tibble.html index 3f171b451..1a725ca43 100644 --- a/v0.3.7/reference/h_df_to_tibble.html +++ b/v0.3.7/reference/h_df_to_tibble.html @@ -1,5 +1,25 @@ - -Coerce a Data Frame to a tibble — h_df_to_tibble • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -112,24 +141,30 @@
    -

    Usage

    +

    Usage +

    h_df_to_tibble(data)
    -

    Arguments

    -
    data
    +

    Arguments +

    +
    +
    data

    (data.frame)
    what to coerce.

    -
    + +
    -

    Value

    +

    Value +

    The data as a tibble, potentially with a .rownames column.

    -

    Details

    +

    Details +

    This is only a thin wrapper around tibble::as_tibble(), except giving a useful error message and it checks for rownames and adds them as a new column .rownames if they are not just a numeric sequence as @@ -137,22 +172,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.7/reference/h_drop_covariance_terms.html b/v0.3.7/reference/h_drop_covariance_terms.html index 2290de281..d7e479924 100644 --- a/v0.3.7/reference/h_drop_covariance_terms.html +++ b/v0.3.7/reference/h_drop_covariance_terms.html @@ -1,5 +1,25 @@ - -Drop Formula Terms used for Covariance Structure Definition — h_drop_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,46 +140,56 @@
    -

    Usage

    +

    Usage +

    h_drop_covariance_terms(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula from which covariance terms should be dropped.

    -
    + +
    -

    Value

    +

    Value +

    The formula without accepted covariance terms.

    -

    Details

    +

    Details +

    terms is used and it will preserve the environment attribute. This ensures the returned formula and the input formula have the same environment.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_extract_covariance_terms.html b/v0.3.7/reference/h_extract_covariance_terms.html index 9882897bf..24b13ac9d 100644 --- a/v0.3.7/reference/h_extract_covariance_terms.html +++ b/v0.3.7/reference/h_extract_covariance_terms.html @@ -1,5 +1,25 @@ - -Extract Formula Terms used for Covariance Structure Definition — h_extract_covariance_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,41 +140,50 @@
    -

    Usage

    +

    Usage +

    h_extract_covariance_terms(f)
    -

    Arguments

    -
    f
    +

    Arguments +

    +
    +
    f

    (formula)
    a formula from which covariance terms should be extracted.

    -
    + +
    -

    Value

    +

    Value +

    A list of covariance structure expressions found in f.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_factor_ref.html b/v0.3.7/reference/h_factor_ref.html index 18bd6391b..2a33c9799 100644 --- a/v0.3.7/reference/h_factor_ref.html +++ b/v0.3.7/reference/h_factor_ref.html @@ -1,5 +1,25 @@ - -Convert Character to Factor Following Reference — h_factor_ref • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_factor_ref(x, ref, var_name = vname(x))
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (character or factor)
    input.

    @@ -129,31 +160,37 @@

    Arguments -

    Details

    +

    Details +

    Use ref to convert x into factor with the same levels. This is needed even if x and ref are both character because in model.matrix if x only has one level there could be errors.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_get_cov_default.html b/v0.3.7/reference/h_get_cov_default.html index 8e3ccb413..014f174b0 100644 --- a/v0.3.7/reference/h_get_cov_default.html +++ b/v0.3.7/reference/h_get_cov_default.html @@ -1,7 +1,27 @@ - -Obtain Default Covariance Method — h_get_cov_default • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,20 +143,25 @@
    -

    Usage

    +

    Usage +

    h_get_cov_default(
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within")
     )
    -

    Arguments

    -
    method
    +

    Arguments +

    +
    +
    method

    (string)
    degrees of freedom method.

    -
    + +
    -

    Details

    +

    Details +

    The default covariance method is different for different degrees of freedom method. For "Satterthwaite" or "Between-Within", "Asymptotic" is returned. For "Kenward-Roger" only, "Kenward-Roger" is returned. @@ -136,22 +169,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.7/reference/h_get_empirical.html b/v0.3.7/reference/h_get_empirical.html index 772cd1947..320e2a787 100644 --- a/v0.3.7/reference/h_get_empirical.html +++ b/v0.3.7/reference/h_get_empirical.html @@ -1,9 +1,29 @@ - -Obtain Empirical/Jackknife/Bias-Reduced Covariance — h_get_empirical • mmrm +Obtain Empirical/Jackknife/Bias-Reduced Covariance — h_get_empirical • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    h_get_empirical(tmb_data, theta, beta, beta_vcov, type)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    @@ -144,32 +175,41 @@

    Arguments -

    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • cov: matrix empirical covariance.

    • +

      Named list with elements:

      +
        +
      • cov: matrix empirical covariance.

      • df_mat: matrix to calculate Satterthwaite degree of freedom.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_get_kr_comp.html b/v0.3.7/reference/h_get_kr_comp.html index 603352ddf..cc322cf4a 100644 --- a/v0.3.7/reference/h_get_kr_comp.html +++ b/v0.3.7/reference/h_get_kr_comp.html @@ -1,7 +1,27 @@ - -Obtain Kenward-Roger Adjustment Components — h_get_kr_comp • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,30 +143,39 @@
    -

    Usage

    +

    Usage +

    h_get_kr_comp(tmb_data, theta)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    theta

    (numeric)
    theta estimate.

    -
    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • P: matrix of \(P\) component.

    • +

      Named list with elements:

      +
        +
      • P: matrix of \(P\) component.

      • Q: matrix of \(Q\) component.

      • R: matrix of \(R\) component.

      • -
    + +
    -

    Details

    +

    Details +

    the function returns a named list, \(P\), \(Q\) and \(R\), which corresponds to the paper in 1997. The matrices are stacked in columns so that \(P\), \(Q\) and \(R\) has the same column number(number of beta parameters). The number of rows, is dependent on @@ -150,22 +187,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.7/reference/h_get_optimizers.html b/v0.3.7/reference/h_get_optimizers.html index 612f661c9..f8d5d7215 100644 --- a/v0.3.7/reference/h_get_optimizers.html +++ b/v0.3.7/reference/h_get_optimizers.html @@ -1,5 +1,25 @@ - -Obtain Optimizer according to Optimizer String Value — h_get_optimizers • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    h_get_optimizers(
       optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"),
       optimizer_fun = h_optimizer_fun(optimizer),
    @@ -122,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    optimizer
    +

    Arguments +

    +
    +
    optimizer

    (character)
    names of built-in optimizers to try, subset of "L-BFGS-B", "BFGS", "CG" and "nlminb".

    @@ -140,46 +171,59 @@

    Arguments -

    Value

    +

    Value +

    Named list of optimizers created by h_partial_fun_args().

    -

    Details

    -

    If you want to use only the built-in optimizers:

    • optimizer is a shortcut to create a list of built-in optimizer functions +

      Details +

      +

      If you want to use only the built-in optimizers:

      +
        +
      • optimizer is a shortcut to create a list of built-in optimizer functions passed to optimizer_fun.

      • Allowed are "L-BFGS-B", "BFGS", "CG" (using stats::optim() with corresponding method) and "nlminb" (using stats::nlminb()).

      • Other arguments should go into optimizer_args.

      • -

      If you want to use your own optimizer function:

      • Make sure that there are three arguments: parameter (start value), objective function +

      +

      If you want to use your own optimizer function:

      +
        +
      • Make sure that there are three arguments: parameter (start value), objective function and gradient function are sequentially in the function arguments.

      • If there are other named arguments in front of these, make sure they are correctly specified through optimizer_args.

      • If the hessian can be used, please make sure its argument name is hessian and please add attribute use_hessian = TRUE to the function, using attr(fun, "use_hessian) <- TRUE.

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_get_prediction.html b/v0.3.7/reference/h_get_prediction.html index 7d3648b92..3118233cf 100644 --- a/v0.3.7/reference/h_get_prediction.html +++ b/v0.3.7/reference/h_get_prediction.html @@ -1,5 +1,25 @@ - -Get Prediction — h_get_prediction • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_get_prediction(tmb_data, theta, beta, beta_vcov)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    object.

    @@ -133,37 +164,47 @@

    Arguments -

    Value

    +

    Value +

    -

    List with:

    • prediction: Matrix with columns fit, conf_var, and var.

    • +

      List with:

      +
        +
      • prediction: Matrix with columns fit, conf_var, and var.

      • covariance: List with subject specific covariance matrices.

      • index: List of zero-based subject indices.

      • -
    + +
    -

    Details

    +

    Details +

    See predict function in predict.cpp which is called internally.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_get_prediction_variance.html b/v0.3.7/reference/h_get_prediction_variance.html index 58174a9ae..5f1b9a058 100644 --- a/v0.3.7/reference/h_get_prediction_variance.html +++ b/v0.3.7/reference/h_get_prediction_variance.html @@ -1,5 +1,25 @@ - -Get Prediction Variance — h_get_prediction_variance • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_get_prediction_variance(object, nsim, tmb_data)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    @@ -129,25 +160,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.7/reference/h_get_sim_per_subj.html b/v0.3.7/reference/h_get_sim_per_subj.html index a8ba41ea5..bdfe027d3 100644 --- a/v0.3.7/reference/h_get_sim_per_subj.html +++ b/v0.3.7/reference/h_get_sim_per_subj.html @@ -1,5 +1,25 @@ - -Get simulated values by patient. — h_get_sim_per_subj • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_get_sim_per_subj(predict_res, nsub, nsim)
    -

    Arguments

    -
    predict_res
    +

    Arguments +

    +
    +
    predict_res

    (list)
    from h_get_prediction().

    @@ -129,25 +160,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.7/reference/h_gradient.html b/v0.3.7/reference/h_gradient.html index 33fc8f4af..32410e63e 100644 --- a/v0.3.7/reference/h_gradient.html +++ b/v0.3.7/reference/h_gradient.html @@ -1,7 +1,27 @@ - -Computation of a Gradient Given Jacobian and Contrast Vector — h_gradient • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_gradient(jac_list, contrast)
    -

    Arguments

    -
    jac_list
    +

    Arguments +

    +
    +
    jac_list

    (list)
    Jacobian list produced e.g. by h_jac_list().

    @@ -130,9 +161,11 @@

    Arguments -

    Value

    +

    Value +

    Numeric vector which contains the quadratic forms of each element of @@ -140,22 +173,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_jac_list.html b/v0.3.7/reference/h_jac_list.html index dfe69a770..8a29dff63 100644 --- a/v0.3.7/reference/h_jac_list.html +++ b/v0.3.7/reference/h_jac_list.html @@ -1,5 +1,25 @@ - -Obtain List of Jacobian Matrix Entries for Covariance Matrix — h_jac_list • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_jac_list(tmb_data, theta_est, beta_vcov)
    -

    Arguments

    -
    tmb_data
    +

    Arguments +

    +
    +
    tmb_data

    (mmrm_tmb_data)
    produced by h_mmrm_tmb_data().

    @@ -129,9 +160,11 @@

    Arguments -

    Value

    +

    Value +

    List with one element per variance parameter containing a matrix @@ -140,22 +173,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_kr_df.html b/v0.3.7/reference/h_kr_df.html index b4787bece..8a76f61c3 100644 --- a/v0.3.7/reference/h_kr_df.html +++ b/v0.3.7/reference/h_kr_df.html @@ -1,7 +1,27 @@ - -Obtain the Adjusted Kenward-Roger degrees of freedom — h_kr_df • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_kr_df(v0, l, w, p)
    -

    Arguments

    -
    v0
    +

    Arguments +

    +
    +
    v0

    (matrix)
    unadjusted covariance matrix.

    @@ -136,32 +167,41 @@

    Argumentsh_get_kr_comp().

    -

    + +
    -

    Value

    +

    Value +

    -

    Named list with elements:

    • m: numeric degrees of freedom.

    • +

      Named list with elements:

      +
        +
      • m: numeric degrees of freedom.

      • lambda: numeric F statistic scale parameter.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_md_denom_df.html b/v0.3.7/reference/h_md_denom_df.html index dfcc71a58..5626dc761 100644 --- a/v0.3.7/reference/h_md_denom_df.html +++ b/v0.3.7/reference/h_md_denom_df.html @@ -1,5 +1,25 @@ - -Calculating Denominator Degrees of Freedom for the Multi-Dimensional Case — h_md_denom_df • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,47 +140,57 @@
    -

    Usage

    +

    Usage +

    h_md_denom_df(t_stat_df)
    -

    Arguments

    -
    t_stat_df
    +

    Arguments +

    +
    +
    t_stat_df

    (numeric)
    n t-statistic derived degrees of freedom.

    -
    + +
    -

    Value

    +

    Value +

    Usually the calculation is returning 2 * E / (E - n) where E is the sum of t / (t - 2) over all t_stat_df values t.

    -

    Note

    +

    Note +

    If the input values are two similar to each other then just the average of them is returned. If any of the inputs is not larger than 2 then 2 is returned.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_mmrm_tmb_assert_start.html b/v0.3.7/reference/h_mmrm_tmb_assert_start.html index d44b0c147..e04bc45f8 100644 --- a/v0.3.7/reference/h_mmrm_tmb_assert_start.html +++ b/v0.3.7/reference/h_mmrm_tmb_assert_start.html @@ -1,5 +1,25 @@ - -Asserting Sane Start Values for TMB Fit — h_mmrm_tmb_assert_start • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_assert_start(tmb_object)
    -

    Arguments

    -
    tmb_object
    +

    Arguments +

    +
    +
    tmb_object

    (list)
    created with TMB::MakeADFun().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used for assertions.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_mmrm_tmb_check_conv.html b/v0.3.7/reference/h_mmrm_tmb_check_conv.html index ff602e116..8e6437480 100644 --- a/v0.3.7/reference/h_mmrm_tmb_check_conv.html +++ b/v0.3.7/reference/h_mmrm_tmb_check_conv.html @@ -1,5 +1,25 @@ - -Checking the TMB Optimization Result — h_mmrm_tmb_check_conv • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,22 +140,27 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_check_conv(tmb_opt, mmrm_tmb)
    -

    Arguments

    -
    tmb_opt
    +

    Arguments +

    +
    +
    tmb_opt

    (list)
    optimization result.

    mmrm_tmb

    (mmrm_tmb)
    result from h_mmrm_tmb_fit().

    -
    + +
    -

    Value

    +

    Value +

    Nothing, only used to generate warnings in case that the model @@ -135,22 +168,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_mmrm_tmb_data.html b/v0.3.7/reference/h_mmrm_tmb_data.html index 83241f320..4f00902c5 100644 --- a/v0.3.7/reference/h_mmrm_tmb_data.html +++ b/v0.3.7/reference/h_mmrm_tmb_data.html @@ -1,5 +1,25 @@ - -Data for TMB Fit — h_mmrm_tmb_data • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_data(
       formula_parts,
       data,
    @@ -126,8 +155,10 @@ 

    Usage

    -

    Arguments

    -
    formula_parts
    +

    Arguments +

    +
    +
    formula_parts

    (mmrm_tmb_formula_parts)
    list with formula parts from h_mmrm_tmb_formula_parts().

    @@ -161,12 +192,16 @@

    Arguments -

    Value

    +

    Value +

    -

    List of class mmrm_tmb_data with elements:

    • full_frame: data.frame with n rows containing all variables needed in the model.

    • +

      List of class mmrm_tmb_data with elements:

      +
        +
      • full_frame: data.frame with n rows containing all variables needed in the model.

      • data: data.frame of input dataset.

      • x_matrix: matrix with n rows and p columns specifying the overall design matrix.

      • x_cols_aliased: logical with potentially more than p elements indicating which @@ -186,9 +221,11 @@

        Value

        reml: int specifying whether REML estimation is used (1), otherwise ML (0).

      • subject_groups: factor specifying the grouping for each subject.

      • n_groups: int with the number of total groups

      • -
    + +
    -

    Details

    +

    Details +

    Note that the subject_var must not be factor but can also be character. If it is character, then it will be converted to factor internally. Here the levels will be the unique values, sorted alphabetically and numerically if there @@ -197,22 +234,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.7/reference/h_mmrm_tmb_extract_cov.html b/v0.3.7/reference/h_mmrm_tmb_extract_cov.html index 2b7683d5b..e8578ef92 100644 --- a/v0.3.7/reference/h_mmrm_tmb_extract_cov.html +++ b/v0.3.7/reference/h_mmrm_tmb_extract_cov.html @@ -1,7 +1,27 @@ - -Extract covariance matrix from TMB report and input data — h_mmrm_tmb_extract_cov • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_extract_cov(tmb_report, tmb_data, visit_var, is_spatial)
    -

    Arguments

    -
    tmb_report
    +

    Arguments +

    +
    +
    tmb_report

    (list)
    report created with TMB::MakeADFun() report function.

    @@ -136,9 +167,11 @@

    Arguments -

    Value

    +

    Value +

    Return a simple covariance matrix if there is no grouping, or a named @@ -147,22 +180,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_mmrm_tmb_fit.html b/v0.3.7/reference/h_mmrm_tmb_fit.html index 5d826afe6..1cf1902ad 100644 --- a/v0.3.7/reference/h_mmrm_tmb_fit.html +++ b/v0.3.7/reference/h_mmrm_tmb_fit.html @@ -1,7 +1,27 @@ - -Build TMB Fit Result List — h_mmrm_tmb_fit • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_fit(tmb_object, tmb_opt, formula_parts, tmb_data)
    -

    Arguments

    -
    tmb_object
    +

    Arguments +

    +
    +
    tmb_object

    (list)
    created with TMB::MakeADFun().

    @@ -137,12 +168,16 @@

    Argumentsh_mmrm_tmb_data().

    -

    + +
    -

    Value

    +

    Value +

    -

    List of class mmrm_tmb with:

    • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

    • +

      List of class mmrm_tmb with:

      +
        +
      • cov: estimated covariance matrix, or named list of estimated group specific covariance matrices.

      • beta_est: vector of coefficient estimates.

      • beta_vcov: Variance-covariance matrix for coefficient estimates.

      • beta_vcov_inv_L: Lower triangular matrix L of the inverse variance-covariance matrix decomposition.

      • @@ -157,31 +192,37 @@

        Value

        opt_details: list with optimization details including convergence code.

      • tmb_object: original TMB object created with TMB::MakeADFun().

      • tmb_data: input.

      • -
    + +
    -

    Details

    +

    Details +

    Instead of inverting or decomposing beta_vcov, it can be more efficient to use its robust Cholesky decomposition LDL^T, therefore we return the corresponding two components L and D as well since they have been available on the C++ side already.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_mmrm_tmb_formula_parts.html b/v0.3.7/reference/h_mmrm_tmb_formula_parts.html index fa2abc09a..aec61eff9 100644 --- a/v0.3.7/reference/h_mmrm_tmb_formula_parts.html +++ b/v0.3.7/reference/h_mmrm_tmb_formula_parts.html @@ -1,5 +1,25 @@ - -Processing the Formula for TMB Fit — h_mmrm_tmb_formula_parts • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_formula_parts(
       formula,
       covariance = as.cov_struct(formula, warn_partial = FALSE)
    @@ -120,8 +149,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    Original formula.

    @@ -129,12 +160,16 @@

    Arguments -

    Value

    +

    Value +

    -

    List of class mmrm_tmb_formula_parts with elements:

    • formula: the original input.

    • +

      List of class mmrm_tmb_formula_parts with elements:

      +
        +
      • formula: the original input.

      • model_formula: formula with the covariance term is removed.

      • model_formula: formula with the covariance term removed.

      • full_formula: same as model_formula but includes the covariance @@ -146,25 +181,30 @@

        Value

        subject_var: string with the subject variable name.

      • group_var: string with the group variable name. If no group specified, this element is NULL.

      • -
    + +
    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_mmrm_tmb_parameters.html b/v0.3.7/reference/h_mmrm_tmb_parameters.html index f056fa8f5..782ffa44e 100644 --- a/v0.3.7/reference/h_mmrm_tmb_parameters.html +++ b/v0.3.7/reference/h_mmrm_tmb_parameters.html @@ -1,5 +1,25 @@ - -Start Parameters for TMB Fit — h_mmrm_tmb_parameters • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_mmrm_tmb_parameters(formula_parts, tmb_data, start, n_groups = 1L)
    -

    Arguments

    -
    formula_parts
    +

    Arguments +

    +
    +
    formula_parts

    (mmrm_tmb_formula_parts)
    produced by h_mmrm_tmb_formula_parts().

    @@ -135,9 +166,11 @@

    Arguments -

    Value

    +

    Value +

    List with element theta containing the start values for the variance @@ -145,22 +178,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_newdata_add_pred.html b/v0.3.7/reference/h_newdata_add_pred.html index 3375613f8..bd0ab4a22 100644 --- a/v0.3.7/reference/h_newdata_add_pred.html +++ b/v0.3.7/reference/h_newdata_add_pred.html @@ -1,5 +1,25 @@ - -Add Prediction Results to New Data — h_newdata_add_pred • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_newdata_add_pred(x, newdata, se_fit, interval, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fit.

    @@ -138,9 +169,11 @@

    Argumentspredict.mmrm_tmb().

    -

    + +
    -

    Value

    +

    Value +

    The newdata as a tibble with additional columns .fitted, @@ -151,22 +184,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_optimizer_fun.html b/v0.3.7/reference/h_optimizer_fun.html index 480c84d8b..1a5798d42 100644 --- a/v0.3.7/reference/h_optimizer_fun.html +++ b/v0.3.7/reference/h_optimizer_fun.html @@ -1,5 +1,25 @@ - -Obtain Optimizer Function with Character — h_optimizer_fun • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_optimizer_fun(optimizer = c("L-BFGS-B", "BFGS", "CG", "nlminb"))
    -

    Arguments

    -
    optimizer
    +

    Arguments +

    +
    +
    optimizer

    (character)
    vector of optimizers.

    -
    + +
    -

    Value

    +

    Value +

    A (list)
    of optimizer functions generated from h_partial_fun_args().

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_partial_fun_args.html b/v0.3.7/reference/h_partial_fun_args.html index 32eef7653..83b78542b 100644 --- a/v0.3.7/reference/h_partial_fun_args.html +++ b/v0.3.7/reference/h_partial_fun_args.html @@ -1,5 +1,25 @@ - -Create Partial Functions — h_partial_fun_args • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_partial_fun_args(fun, ..., additional_attr = list())
    -

    Arguments

    -
    fun
    +

    Arguments +

    +
    +
    fun

    (function)
    to be wrapped.

    @@ -129,16 +160,19 @@

    Arguments -

    Value

    +

    Value +

    Object with S3 class "partial", a function with args attribute (and possibly more attributes from additional_attr).

    -

    Details

    +

    Details +

    This function add args attribute to the original function, and add an extra class partial to the function. args is the argument for the function, and elements in ... will override the existing @@ -146,22 +180,26 @@

    Details

    + + + + - - + + diff --git a/v0.3.7/reference/h_print_aic_list.html b/v0.3.7/reference/h_print_aic_list.html index 3c0b8c7a5..2779803e9 100644 --- a/v0.3.7/reference/h_print_aic_list.html +++ b/v0.3.7/reference/h_print_aic_list.html @@ -1,5 +1,25 @@ - -Printing AIC and other Model Fit Criteria — h_print_aic_list • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,38 +140,46 @@
    -

    Usage

    +

    Usage +

    h_print_aic_list(aic_list, digits = 1)
    -

    Arguments

    -
    aic_list
    +

    Arguments +

    +
    +
    aic_list

    (list)
    list as part of from summary.mmrm().

    digits

    (number)
    number of decimal places used with round().

    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_print_call.html b/v0.3.7/reference/h_print_call.html index 4ff500bd4..5fa153e30 100644 --- a/v0.3.7/reference/h_print_call.html +++ b/v0.3.7/reference/h_print_call.html @@ -1,5 +1,25 @@ - -Printing MMRM Function Call — h_print_call • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_print_call(call, n_obs, n_subjects, n_timepoints)
    -

    Arguments

    -
    call
    +

    Arguments +

    +
    +
    call

    (call)
    original mmrm() function call.

    @@ -133,25 +164,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.7/reference/h_print_cov.html b/v0.3.7/reference/h_print_cov.html index b54de2921..4a0f43426 100644 --- a/v0.3.7/reference/h_print_cov.html +++ b/v0.3.7/reference/h_print_cov.html @@ -1,5 +1,25 @@ - -Printing MMRM Covariance Type — h_print_cov • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_print_cov(cov_type, n_theta, n_groups)
    -

    Arguments

    -
    cov_type
    +

    Arguments +

    +
    +
    cov_type

    (string)
    covariance structure abbreviation.

    @@ -129,25 +160,30 @@

    Arguments

    + + + + - - + + diff --git a/v0.3.7/reference/h_quad_form.html b/v0.3.7/reference/h_quad_form.html index f5236687e..44b9edee0 100644 --- a/v0.3.7/reference/h_quad_form.html +++ b/v0.3.7/reference/h_quad_form.html @@ -1,7 +1,27 @@ - -Quadratic Form Calculations — h_quad_form • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,15 +143,18 @@
    -

    Usage

    +

    Usage +

    h_quad_form_vec(vec, center)
     
     h_quad_form_mat(mat, center)
    -

    Arguments

    -
    vec
    +

    Arguments +

    +
    +
    vec

    (numeric)
    interpreted as a row vector.

    @@ -137,34 +168,42 @@

    Arguments -

    Functions

    +

    Functions +

    -
    • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) +

        +
      • h_quad_form_vec(): calculates the number vec %*% center %*% t(vec) as a numeric (not a matrix).

      • h_quad_form_mat(): calculates the quadratic form mat %*% center %*% t(mat) as a matrix, the result is square and has dimensions identical to the number of rows in mat.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_reconcile_cov_struct.html b/v0.3.7/reference/h_reconcile_cov_struct.html index 8529404f0..5bf038b87 100644 --- a/v0.3.7/reference/h_reconcile_cov_struct.html +++ b/v0.3.7/reference/h_reconcile_cov_struct.html @@ -1,5 +1,25 @@ - -Reconcile Possible Covariance Structure Inputs — h_reconcile_cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    h_reconcile_cov_struct(formula = NULL, covariance = NULL)
    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -128,9 +159,11 @@

    Argumentsas.cov_struct(). If no value is provided, a structure is derived from the provided formula.

    -

    + +
    -

    Value

    +

    Value +

    The value covariance if it's provided or a covariance structure @@ -139,22 +172,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_record_all_output.html b/v0.3.7/reference/h_record_all_output.html index 7682189bf..daaa882f3 100644 --- a/v0.3.7/reference/h_record_all_output.html +++ b/v0.3.7/reference/h_record_all_output.html @@ -1,9 +1,29 @@ - - + + + + + +Capture all Output — h_record_all_output • mmrm +Capture all Output — h_record_all_output • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    h_record_all_output(expr, remove = list(), divergence = list())
    -

    Arguments

    -
    expr
    +

    Arguments +

    +
    +
    expr

    (expression)
    to be executed.

    @@ -139,35 +170,44 @@

    Arguments -

    Value

    +

    Value +

    -

    A list containing

    • result: The object returned by expr or list() if an error was thrown.

    • +

      A list containing

      +
        +
      • result: The object returned by expr or list() if an error was thrown.

      • warnings: NULL or a character vector if warnings were thrown.

      • errors: NULL or a string if an error was thrown.

      • messages: NULL or a character vector if messages were produced.

      • divergence: NULL or a character vector if divergence messages were caught.

      • -
    + + + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_residuals_normalized.html b/v0.3.7/reference/h_residuals_normalized.html index 1a2f4887b..99fdaa491 100644 --- a/v0.3.7/reference/h_residuals_normalized.html +++ b/v0.3.7/reference/h_residuals_normalized.html @@ -1,5 +1,25 @@ - -Calculate normalized residuals — h_residuals_normalized • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_normalized(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_residuals_pearson.html b/v0.3.7/reference/h_residuals_pearson.html index 878d00f22..6be42e037 100644 --- a/v0.3.7/reference/h_residuals_pearson.html +++ b/v0.3.7/reference/h_residuals_pearson.html @@ -1,5 +1,25 @@ - -Calculate Pearson Residuals — h_residuals_pearson • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_pearson(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_residuals_response.html b/v0.3.7/reference/h_residuals_response.html index 9cccf0bd5..d72f0d799 100644 --- a/v0.3.7/reference/h_residuals_response.html +++ b/v0.3.7/reference/h_residuals_response.html @@ -1,5 +1,25 @@ - -Calculate response residuals. — h_residuals_response • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_residuals_response(object)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM.

    -
    + +
    -

    Value

    +

    Value +

    Vector of residuals

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_split_control.html b/v0.3.7/reference/h_split_control.html index 10464ab60..69d0dd07c 100644 --- a/v0.3.7/reference/h_split_control.html +++ b/v0.3.7/reference/h_split_control.html @@ -1,7 +1,27 @@ - -Split Control List — h_split_control • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,44 +143,53 @@
    -

    Usage

    +

    Usage +

    h_split_control(control, ...)
    -

    Arguments

    -
    control
    +

    Arguments +

    +
    +
    control

    (mmrm_control)
    object.

    ...

    additional parameters to update the control object.

    -
    + +
    -

    Value

    +

    Value +

    A list of mmrm_control entries.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_summarize_all_fits.html b/v0.3.7/reference/h_summarize_all_fits.html index 31228439d..2ad507e84 100644 --- a/v0.3.7/reference/h_summarize_all_fits.html +++ b/v0.3.7/reference/h_summarize_all_fits.html @@ -1,5 +1,25 @@ - -Summarizing List of Fits — h_summarize_all_fits • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_summarize_all_fits(all_fits)
    -

    Arguments

    -
    all_fits
    +

    Arguments +

    +
    +
    all_fits

    (list of mmrm_fit or try-error)
    list of fits.

    -
    + +
    -

    Value

    +

    Value +

    List with warnings, messages, log_liks and converged results.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_tbl_confint_terms.html b/v0.3.7/reference/h_tbl_confint_terms.html index 328eabdf1..a4d1cfa92 100644 --- a/v0.3.7/reference/h_tbl_confint_terms.html +++ b/v0.3.7/reference/h_tbl_confint_terms.html @@ -1,5 +1,25 @@ - -Extract tibble with Confidence Intervals and Term Names — h_tbl_confint_terms • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,44 +140,53 @@
    -

    Usage

    +

    Usage +

    h_tbl_confint_terms(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fit object.

    ...

    passed to stats::confint(), hence not used at the moment.

    -
    + +
    -

    Value

    +

    Value +

    A tibble with term, conf.low, conf.high columns.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_test_1d.html b/v0.3.7/reference/h_test_1d.html index 781667aaf..2f03457b4 100644 --- a/v0.3.7/reference/h_test_1d.html +++ b/v0.3.7/reference/h_test_1d.html @@ -1,7 +1,27 @@ - -Creating T-Statistic Test Results For One-Dimensional Contrast — h_test_1d • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_test_1d(object, contrast, df)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -134,31 +165,37 @@

    Arguments -

    Value

    +

    Value +

    List with est, se, df, t_stat and p_val (2-sided p-value).

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_test_md.html b/v0.3.7/reference/h_test_md.html index b912efe1c..f888f2449 100644 --- a/v0.3.7/reference/h_test_md.html +++ b/v0.3.7/reference/h_test_md.html @@ -1,7 +1,27 @@ - -Creating F-Statistic Test Results For Multi-Dimensional Contrast — h_test_md • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,13 +143,16 @@
    -

    Usage

    +

    Usage +

    h_test_md(object, contrast, df, f_stat_factor = 1)
    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the MMRM fit.

    @@ -136,31 +167,37 @@

    Arguments -

    Value

    +

    Value +

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

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_tr.html b/v0.3.7/reference/h_tr.html index 223b019c3..5e22c71aa 100644 --- a/v0.3.7/reference/h_tr.html +++ b/v0.3.7/reference/h_tr.html @@ -1,5 +1,25 @@ - -Trace of a Matrix — h_tr • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    h_tr(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (matrix)
    square matrix input.

    -
    + +
    -

    Value

    +

    Value +

    The trace of the square matrix.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_valid_formula.html b/v0.3.7/reference/h_valid_formula.html index bbca45e54..ba4578502 100644 --- a/v0.3.7/reference/h_valid_formula.html +++ b/v0.3.7/reference/h_valid_formula.html @@ -1,5 +1,25 @@ - -Validate mmrm Formula — h_valid_formula • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,39 +140,48 @@
    -

    Usage

    +

    Usage +

    h_valid_formula(formula)
    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    to check.

    -
    + +
    -

    Details

    +

    Details +

    In mmrm models, . is not allowed as it introduces ambiguity of covariates to be used, so it is not allowed to be in formula.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_var_adj.html b/v0.3.7/reference/h_var_adj.html index bb91208c1..46dfe816e 100644 --- a/v0.3.7/reference/h_var_adj.html +++ b/v0.3.7/reference/h_var_adj.html @@ -1,9 +1,29 @@ - -Obtain the Adjusted Covariance Matrix — h_var_adj • mmrm +Obtain the Adjusted Covariance Matrix — h_var_adj • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    h_var_adj(v, w, p, q, r, linear = FALSE)
    -

    Arguments

    -
    v
    +

    Arguments +

    +
    +
    v

    (matrix)
    unadjusted covariance matrix.

    @@ -147,31 +178,37 @@

    Arguments -

    Value

    +

    Value +

    The matrix of adjusted covariance matrix.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_warn_na_action.html b/v0.3.7/reference/h_warn_na_action.html index 02972f540..980358f2b 100644 --- a/v0.3.7/reference/h_warn_na_action.html +++ b/v0.3.7/reference/h_warn_na_action.html @@ -1,5 +1,25 @@ - -Warn on na.action — h_warn_na_action • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,27 +140,32 @@
    -

    Usage

    +

    Usage +

    h_warn_na_action()
    - + +
    -
    + + - - + + diff --git a/v0.3.7/reference/h_within_or_between.html b/v0.3.7/reference/h_within_or_between.html index a0e5f8940..402c55d82 100644 --- a/v0.3.7/reference/h_within_or_between.html +++ b/v0.3.7/reference/h_within_or_between.html @@ -1,7 +1,27 @@ - -Determine Within or Between for each Design Matrix Column — h_within_or_between • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,22 +143,27 @@
    -

    Usage

    +

    Usage +

    h_within_or_between(x_matrix, subject_ids)
    -

    Arguments

    -
    x_matrix
    +

    Arguments +

    +
    +
    x_matrix

    (matrix)
    the design matrix with column names.

    subject_ids

    (factor)
    the subject IDs.

    -
    + +
    -

    Value

    +

    Value +

    Character vector with "intercept", "within" or "between" for each @@ -138,22 +171,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/index.html b/v0.3.7/reference/index.html index 12d4a35c2..20ad1a19a 100644 --- a/v0.3.7/reference/index.html +++ b/v0.3.7/reference/index.html @@ -1,5 +1,23 @@ - -Function reference • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +44,8 @@ + - + + - + @@ -106,189 +132,252 @@
    -

    Package

    +

    Package +

    -
    +
    +
    -
    +
    +
    mmrm-package _PACKAGE
    -
    mmrm Package
    -
    -

    Functions

    +
    +mmrm Package
    + +
    +
    +

    Functions +

    -
    +
    +
    -
    +
    +
    mmrm()
    Fit an MMRM
    -
    +
    +
    +
    fit_mmrm()
    Low-Level Fitting Function for MMRM
    -
    +
    +
    +
    mmrm_control()
    Control Parameters for Fitting an MMRM
    -
    +
    +
    +
    fit_single_optimizer()
    Fitting an MMRM with Single Optimizer
    -
    +
    +
    +
    refit_multiple_optimizers()
    Refitting MMRM with Multiple Optimizers
    -
    +
    +
    +
    df_1d()
    Calculation of Degrees of Freedom for One-Dimensional Contrast
    -
    +
    +
    +
    df_md()
    Calculation of Degrees of Freedom for Multi-Dimensional Contrast
    -
    +
    +
    +
    component()
    Component Access for mmrm_tmb Objects
    -
    -

    Methods

    + +
    +
    +

    Methods +

    -
    +
    +
    -

    Covariance Structures

    + +
    +
    +

    Covariance Structures +

    -
    +
    +
    -
    +
    +
    cov_struct()
    Define a Covariance Structure
    -
    +
    +
    +
    as.cov_struct()
    Coerce into a Covariance Structure Definition
    -
    +
    +
    +
    format(<cov_struct>)
    Format Covariance Structure Object
    -
    +
    +
    +
    print(<cov_struct>)
    Print a Covariance Structure Object
    -
    +
    +
    +
    cov_types()
    Covariance Types
    -
    -

    Estimate Marginal Means

    + +
    +
    +

    Estimate Marginal Means +

    -
    +
    +
    -
    +
    +
    emmeans_support
    -
    Support for emmeans
    -
    -

    Datasets

    +
    Support for emmeans +
    + +
    +
    +

    Datasets +

    -
    +
    +
    -
    +
    +
    fev_data
    Example Data on FEV1
    -
    +
    +
    +
    bcva_data
    Example Data on BCVA
    -
    + + + +
    -
    + + - - + + diff --git a/v0.3.7/reference/is_infix.html b/v0.3.7/reference/is_infix.html index db9677676..1ef91c5eb 100644 --- a/v0.3.7/reference/is_infix.html +++ b/v0.3.7/reference/is_infix.html @@ -1,5 +1,25 @@ - -Test Whether a Symbol is an Infix Operator — is_infix • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,49 +140,62 @@
    -

    Usage

    +

    Usage +

    is_infix(name)
    -

    Arguments

    -
    name
    +

    Arguments +

    +
    +
    name

    (symbol or name or string)
    a possible reference to an infix operator to check.

    -
    + +
    -

    Value

    +

    Value +

    A logical indicating whether the name is the name of an infix operator.

    -

    is_infix(as.name("|"))
    +

    +
    +
    is_infix(as.name("|"))
     is_infix("|")
    -is_infix("c")

    +is_infix("c")
    +

    +
    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/mmrm-package.html b/v0.3.7/reference/mmrm-package.html index 6fa3fac49..206362d41 100644 --- a/v0.3.7/reference/mmrm-package.html +++ b/v0.3.7/reference/mmrm-package.html @@ -1,5 +1,25 @@ - -mmrm Package — mmrm-package • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -113,15 +142,23 @@
    -

    See also

    -
    -

    Author

    +

    Author +

    Maintainer: Daniel Sabanes Bove daniel.sabanes_bove@roche.com

    -

    Authors:

    + +
    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/mmrm.html b/v0.3.7/reference/mmrm.html index 062f82c5e..d36f5e02a 100644 --- a/v0.3.7/reference/mmrm.html +++ b/v0.3.7/reference/mmrm.html @@ -1,7 +1,27 @@ - -Fit an MMRM — mmrm • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -26,7 +48,8 @@ + - + + - + @@ -115,7 +143,8 @@
    -

    Usage

    +

    Usage +

    mmrm(
       formula,
       data,
    @@ -128,8 +157,10 @@ 

    Usage

    -

    Arguments

    -
    formula
    +

    Arguments +

    +
    +
    formula

    (formula)
    the model formula, see details.

    @@ -162,15 +193,18 @@

    Argumentsmmrm_control().

    -

    + +
    -

    Value

    +

    Value +

    An mmrm object.

    -

    Details

    +

    Details +

    The formula typically looks like: FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID) so specifies response and covariates as usual, and exactly one special term @@ -196,15 +230,19 @@

    Detailsmmrm.

    -

    Note

    +

    Note +

    The mmrm object is also an mmrm_fit and an mmrm_tmb object, therefore corresponding methods also work (see mmrm_tmb_methods).

    -

    Additional contents depend on the choice of the adjustment method:

    • If Satterthwaite adjustment is used, the Jacobian information jac_list +

      Additional contents depend on the choice of the adjustment method:

      +
        +
      • If Satterthwaite adjustment is used, the Jacobian information jac_list is included.

      • If Kenward-Roger adjustment is used, kr_comp contains necessary components and beta_vcov_adj includes the adjusted coefficients covariance matrix.

      • -

      Use of the package emmeans is supported, see emmeans_support.

      +
    +

    Use of the package emmeans is supported, see emmeans_support.

    NA values are always omitted regardless of na.action setting.

    When the number of visit levels is large, it usually requires large memory to create the covariance matrix. By default, the maximum allowed visit levels is 100, and if there are more @@ -215,7 +253,8 @@

    Note

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -239,22 +278,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.7/reference/mmrm_control.html b/v0.3.7/reference/mmrm_control.html index 241531466..6192382bb 100644 --- a/v0.3.7/reference/mmrm_control.html +++ b/v0.3.7/reference/mmrm_control.html @@ -1,9 +1,29 @@ - - + + + + + +Control Parameters for Fitting an MMRM — mmrm_control • mmrm +Control Parameters for Fitting an MMRM — mmrm_control • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,7 +146,8 @@
    -

    Usage

    +

    Usage +

    mmrm_control(
       n_cores = 1L,
       method = c("Satterthwaite", "Kenward-Roger", "Residual", "Between-Within"),
    @@ -132,8 +161,10 @@ 

    Usage

    -

    Arguments

    -
    n_cores
    +

    Arguments +

    +
    +
    n_cores

    (count)
    number of cores to be used.

    @@ -167,15 +198,18 @@

    Argumentsh_get_optimizers().

    -

    + +
    -

    Value

    +

    Value +

    List of class mmrm_control with the control parameters.

    -

    Details

    +

    Details +

    For example, if the data only has observations at visits VIS1, VIS3 and VIS4, by default they are treated to be equally spaced, the distance from VIS1 to VIS3, and from VIS3 to VIS4, are identical. However, you can manually convert this visit into a factor, with @@ -183,21 +217,54 @@

    DetailsVIS1 to VIS3 will be double, as VIS2 is a valid visit. However, please be cautious because this can lead to convergence failure when using an unstructured covariance matrix and there are no observations -at the missing visits.

    • The method and vcov arguments specify the degrees of freedom and coefficients -covariance matrix adjustment methods, respectively.

      • Allowed vcov includes: "Asymptotic", "Kenward-Roger", "Kenward-Roger-Linear", "Empirical" (CR0), +at the missing visits.

        +
          +
        • +

          The method and vcov arguments specify the degrees of freedom and coefficients +covariance matrix adjustment methods, respectively.

          +
            +
          • Allowed vcov includes: "Asymptotic", "Kenward-Roger", "Kenward-Roger-Linear", "Empirical" (CR0), "Empirical-Jackknife" (CR3), and "Empirical-Bias-Reduced" (CR2).

          • Allowed method includes: "Satterthwaite", "Kenward-Roger", "Between-Within" and "Residual".

          • If method is "Kenward-Roger" then only "Kenward-Roger" or "Kenward-Roger-Linear" are allowed for vcov.

          • -
        • -
        • The vcov argument can be NULL to use the default covariance method depending on the method -used for degrees of freedom, see the following table:

          methodDefault vcov
          SatterthwaiteAsymptotic
          Kenward-RogerKenward-Roger
          ResidualEmpirical
          Between-WithinAsymptotic
        • +
        +
      • +
      • +

        The vcov argument can be NULL to use the default covariance method depending on the method +used for degrees of freedom, see the following table:

        + + + + + + + + + + + + + + + + + + + + + +
        methodDefault vcov +
        SatterthwaiteAsymptotic
        Kenward-RogerKenward-Roger
        ResidualEmpirical
        Between-WithinAsymptotic
        +
      • Please note that "Kenward-Roger" for "Unstructured" covariance gives different results compared to SAS; Use "Kenward-Roger-Linear" for vcov instead for better matching of the SAS results.

      • -

    + +
    -

    Examples

    +

    Examples +

    mmrm_control(
       optimizer_fun = stats::optim,
       optimizer_args = list(method = "L-BFGS-B")
    @@ -301,22 +368,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.7/reference/mmrm_methods.html b/v0.3.7/reference/mmrm_methods.html index 768db457a..8ba8c9f37 100644 --- a/v0.3.7/reference/mmrm_methods.html +++ b/v0.3.7/reference/mmrm_methods.html @@ -1,5 +1,25 @@ - -Methods for mmrm Objects — mmrm_methods • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm
     summary(object, ...)
     
    @@ -126,48 +155,65 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm)
    the fitted MMRM including Jacobian and call etc.

    ...

    not used.

    -
    + +
    -

    Value

    +

    Value +

    Depends on the method, see Details and Functions.

    -

    Details

    -

    While printing the summary of (mmrm)
    object, the following will be displayed:

    1. Formula. The formula used in the model.

    2. +

      Details +

      +

      While printing the summary of (mmrm)
      object, the following will be displayed:

      +
        +
      1. Formula. The formula used in the model.

      2. Data. The data used for analysis, including number of subjects, number of valid observations.

      3. Covariance. The covariance structure and number of variance parameters.

      4. Method. Restricted maximum likelihood(REML) or maximum likelihood(ML).

      5. Model selection criteria. AIC, BIC, log likelihood and deviance.

      6. Coefficients. Coefficients of the covariates.

      7. -
      8. Covariance estimate. The covariance estimate(for each group).

        1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available +

        2. +

          Covariance estimate. The covariance estimate(for each group).

          +
            +
          1. If the covariance structure is non-spatial, the covariance matrix of all categorical time points available in data will be displayed.

          2. If the covariance structure is spatial, the covariance matrix of two time points with unit distance will be displayed.

          3. -
        3. -
    + + + +
    -

    Functions

    +

    Functions +

    -
    • summary(mmrm): summarizes the MMRM fit results.

    • +
        +
      • summary(mmrm): summarizes the MMRM fit results.

      • print(summary.mmrm): prints the MMRM fit summary.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_tmb_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- mmrm(formula, fev_data)
     # Summary:
    @@ -224,22 +270,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.7/reference/mmrm_tidiers.html b/v0.3.7/reference/mmrm_tidiers.html index 50a461d1a..eb652aa00 100644 --- a/v0.3.7/reference/mmrm_tidiers.html +++ b/v0.3.7/reference/mmrm_tidiers.html @@ -1,9 +1,29 @@ - - + + + + + +Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm +Tidying Methods for mmrm Objects — mmrm_tidiers • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,7 +146,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm
     tidy(x, conf.int = FALSE, conf.level = 0.95, ...)
     
    @@ -137,8 +166,10 @@ 

    Usage

    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (mmrm)
    fitted model.

    @@ -170,21 +201,27 @@

    Argumentsresiduals.mmrm_tmb().

    -

    + +
    -

    Functions

    +

    Functions +

    -
    • tidy(mmrm): derives tidy tibble from an mmrm object.

    • +
        +
      • tidy(mmrm): derives tidy tibble from an mmrm object.

      • glance(mmrm): derives glance tibble from an mmrm object.

      • augment(mmrm): derives augment tibble from an mmrm object.

      • -
    + +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tmb_methods for additional methods.

    -

    Examples

    +

    Examples +

    fit <- mmrm(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data
    @@ -276,22 +313,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.7/reference/mmrm_tmb_methods.html b/v0.3.7/reference/mmrm_tmb_methods.html index 13790638b..f8a1dee6b 100644 --- a/v0.3.7/reference/mmrm_tmb_methods.html +++ b/v0.3.7/reference/mmrm_tmb_methods.html @@ -1,5 +1,25 @@ - -Methods for mmrm_tmb Objects — mmrm_tmb_methods • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    # S3 method for mmrm_tmb
     coef(object, complete = TRUE, ...)
     
    @@ -185,8 +214,10 @@ 

    Usage

    -

    Arguments

    -
    object
    +

    Arguments +

    +
    +
    object

    (mmrm_tmb)
    the fitted MMRM object.

    @@ -272,15 +303,18 @@

    Arguments -

    + +
    -

    Value

    +

    Value +

    Depends on the method, see Functions.

    -

    Details

    +

    Details +

    include argument controls the variables the returned model frame will include. Possible options are "response_var", "subject_var", "visit_var" and "group_var", representing the response variable, subject variable, visit variable or group variable. @@ -288,9 +322,11 @@

    Detailsmodel.matrix.

    -

    Functions

    +

    Functions +

    -
    • coef(mmrm_tmb): obtains the estimated coefficients.

    • +
        +
      • coef(mmrm_tmb): obtains the estimated coefficients.

      • fitted(mmrm_tmb): obtains the fitted values.

      • predict(mmrm_tmb): predict conditional means for new data; optionally with standard errors and confidence or prediction intervals. @@ -324,11 +360,14 @@

        Functions -

        References

        +

        References +

        -
        • Hurvich CM, Tsai C (1989). +

          • Gałecki A, Burzykowski T (2013). +

          +
            +
          • Gałecki A, Burzykowski T (2013). “Linear mixed-effects model.” In Linear mixed-effects models using R, 245--273. Springer.

          • -
    + +
    -

    See also

    +

    See also +

    mmrm_methods, mmrm_tidiers for additional methods.

    -

    Examples

    +

    Examples +

    formula <- FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID)
     object <- fit_mmrm(formula, fev_data, weights = rep(1, nrow(fev_data)))
     # Estimated coefficients:
    @@ -3863,22 +3907,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.7/reference/parsnip_add_mmrm.html b/v0.3.7/reference/parsnip_add_mmrm.html index 5be94653c..4c592bbe9 100644 --- a/v0.3.7/reference/parsnip_add_mmrm.html +++ b/v0.3.7/reference/parsnip_add_mmrm.html @@ -1,5 +1,25 @@ - -Register mmrm For Use With tidymodels — parsnip_add_mmrm • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - +
    @@ -112,45 +141,55 @@
    -

    Usage

    +

    Usage +

    parsnip_add_mmrm(quietly = FALSE)
    -

    Arguments

    -
    quietly
    +

    Arguments +

    +
    +
    quietly

    logical: should progress and error messages be suppressed?

    -
    + +
    -

    Value

    +

    Value +

    A logical value indicating whether registration was successful.

    -

    Details

    +

    Details +

    We can use parsnip::show_model_info("linear_reg") to check the registration with parsnip and thus the wider tidymodels ecosystem.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/position_symbol.html b/v0.3.7/reference/position_symbol.html index 9ee52efba..293ad7462 100644 --- a/v0.3.7/reference/position_symbol.html +++ b/v0.3.7/reference/position_symbol.html @@ -1,9 +1,29 @@ - - + + + + + +Search For the Position of a Symbol — position_symbol • mmrm +Search For the Position of a Symbol — position_symbol • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -28,7 +50,8 @@ + - + + - + @@ -118,13 +146,16 @@
    -

    Usage

    +

    Usage +

    position_symbol(x, sym, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (list of language)
    a list of language objects in which to search for a specific symbol.

    @@ -137,9 +168,11 @@

    ArgumentsPosition().

    -

    + +
    -

    Value

    +

    Value +

    The position of the symbol if found, or the nomatch value @@ -147,22 +180,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/print.cov_struct.html b/v0.3.7/reference/print.cov_struct.html index a88b386fa..51583bd6c 100644 --- a/v0.3.7/reference/print.cov_struct.html +++ b/v0.3.7/reference/print.cov_struct.html @@ -1,5 +1,25 @@ - -Print a Covariance Structure Object — print.cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,45 +140,54 @@
    -

    Usage

    +

    Usage +

    # S3 method for cov_struct
     print(x, ...)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    ...

    Additional arguments unused.

    -
    + +
    -

    Value

    +

    Value +

    x invisibly.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/reexports.html b/v0.3.7/reference/reexports.html index 7555deae9..e41852bd6 100644 --- a/v0.3.7/reference/reexports.html +++ b/v0.3.7/reference/reexports.html @@ -1,19 +1,39 @@ - - + + + + + +Objects exported from other packages — reexports • mmrm +Objects exported from other packages — reexports • mmrm + + + + + + + + + + + + + + + Skip to contents @@ -38,7 +60,8 @@ + - + + - + @@ -124,30 +152,36 @@

    These objects are imported from other packages. Follow the links below to see their documentation.

    -
    generics
    +
    +
    generics

    augment, glance, tidy

    -
    + + - + +
    -
    + + - - + + diff --git a/v0.3.7/reference/refit_multiple_optimizers.html b/v0.3.7/reference/refit_multiple_optimizers.html index 7e8c2436f..9ec224845 100644 --- a/v0.3.7/reference/refit_multiple_optimizers.html +++ b/v0.3.7/reference/refit_multiple_optimizers.html @@ -1,5 +1,25 @@ - -Refitting MMRM with Multiple Optimizers — refit_multiple_optimizers • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,13 +140,16 @@
    -

    Usage

    +

    Usage +

    refit_multiple_optimizers(fit, ..., control = mmrm_control(...))
    -

    Arguments

    -
    fit
    +

    Arguments +

    +
    +
    fit

    (mmrm_fit)
    original model fit from fit_single_optimizer().

    @@ -129,20 +160,24 @@

    Arguments -

    Value

    +

    Value +

    The best (in terms of log likelihood) fit which converged.

    -

    Note

    +

    Note +

    For Windows, no parallel computations are currently implemented.

    -

    Examples

    +

    Examples +

    fit <- fit_single_optimizer(
       formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
       data = fev_data,
    @@ -153,22 +188,26 @@ 

    Examples

    + +
    + + - - + + diff --git a/v0.3.7/reference/register_on_load.html b/v0.3.7/reference/register_on_load.html index a907d91a6..d8c1272f9 100644 --- a/v0.3.7/reference/register_on_load.html +++ b/v0.3.7/reference/register_on_load.html @@ -1,5 +1,25 @@ - -Helper Function for Registering Functionality With Suggests Packages — register_on_load • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,7 +140,8 @@
    -

    Usage

    +

    Usage +

    register_on_load(
       pkg,
       ver = c(NA_character_, NA_character_),
    @@ -122,8 +151,10 @@ 

    Usage

    -

    Arguments

    -
    pkg
    +

    Arguments +

    +
    +
    pkg

    (string)
    package name.

    @@ -144,9 +175,11 @@

    Arguments -

    Value

    +

    Value +

    A logical (invisibly) indicating whether registration was successful. @@ -154,22 +187,26 @@

    Value

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/tmb_cov_type.html b/v0.3.7/reference/tmb_cov_type.html index 58a52da53..5c2799051 100644 --- a/v0.3.7/reference/tmb_cov_type.html +++ b/v0.3.7/reference/tmb_cov_type.html @@ -1,5 +1,25 @@ - -Produce A Covariance Identifier Passing to TMB — tmb_cov_type • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    tmb_cov_type(cov)
    -

    Arguments

    -
    cov
    +

    Arguments +

    +
    +
    cov

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    A string used for method dispatch when passed to TMB.

    + +
    -
    + + - - + + diff --git a/v0.3.7/reference/validate_cov_struct.html b/v0.3.7/reference/validate_cov_struct.html index 68e08b9da..2c227f404 100644 --- a/v0.3.7/reference/validate_cov_struct.html +++ b/v0.3.7/reference/validate_cov_struct.html @@ -1,5 +1,25 @@ - -Validate Covariance Structure Data — validate_cov_struct • mmrm + + + + + + + + + + + + + + + + Skip to contents @@ -24,7 +46,8 @@ + - + + - + @@ -112,40 +140,49 @@
    -

    Usage

    +

    Usage +

    validate_cov_struct(x)
    -

    Arguments

    -
    x
    +

    Arguments +

    +
    +
    x

    (cov_struct)
    a covariance structure object.

    -
    + +
    -

    Value

    +

    Value +

    x if successful, or an error is thrown otherwise.

    + + + + - - + +