Add effect/heterogeneity and normalized reports#18
Draft
FBartos wants to merge 1 commit intoastefan1:masterfrom
Draft
Add effect/heterogeneity and normalized reports#18FBartos wants to merge 1 commit intoastefan1:masterfrom
FBartos wants to merge 1 commit intoastefan1:masterfrom
Conversation
Implement Phase 1 of the effect/heterogeneity extension: add public effect and heterogeneity plumbing to the two-group/t-test family, centralize study-level draws, and attach a normalized reporting block to Phase 1 simulations. Many generators (.sim.compscore, .sim.covariates, sim.*Hack wrappers, sim.cutoffHack, sim.compscoreHack, sim.covhack, etc.) now accept effect and heterogeneity and use a per-iteration theta drawn from .draw.study.effect; two-group data generation shifted accordingly. Introduced and used standardized reporting helpers (.report.twogroup, .report.association, .report.group_lm, .report.multicat), changed p-value/analysis selection to use .selectanalysis, and unified result combining with .combine.phase1.results so older legacy fields are preserved. Also updated NAMESPACE imports, bumped RoxygenNote in DESCRIPTION, added man pages and a planning doc (effect_heterogeneity_extension_plan.md), and adjusted tests and Shiny docs to reflect the new API and reporting contract. Backward compatibility is preserved when effect = 0 and heterogeneity = 0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR extends
phackRso simulations can be generated under a nonzero true effect and between-study heterogeneity, and makes the resulting analyses report standardized initial/final summaries in a consistent format.Main Changes
effectandheterogeneityarguments to all exportedsim.*functions.theta_i ~ Normal(effect, heterogeneity).effect.initial,effect.finalse.initial,se.finaln.initial,n.finalstat.initial,stat.finalp.initial,p.finalmethod.initial,method.finalps.*,r2s.*,ds.*, andeta2s.*for compatibility.Implementation Notes
sim.multIVhack()soalternativeis respected for one-sided tests.alternative = "greater"now means a positive effect in the intended direction: treatment/second group > control/first group.ds.*outputs.Shiny App Updates
effectandheterogeneitycontrols to the Shiny UI for all relevant tabs.sim.multIVhack()instead ofsim.multDVhack().startplots.rds.Documentation and Tests
NAMESPACE.Verification
testthat::test_file('phackR/tests/testthat/test-simfunctions.R')knitr::knit('phackR/vignettes/phackR_vignette.Rmd', ...)