Repository navigation
Conversation
A control spec declares what a control removes and plants: the column to permute (default the single treatment), the design strata and unit of the restricted permutation, the unit-grained columns, the numeric targets and the per-level shift in target-SD units, the replicate count and the seed. controls() resolves it against any table with a role table and control_table() regenerates the null, a negative replicate or a positive replicate from its seed. Nothing is re-simulated. The null permutes every analysed column at its grain; the negative permutes the declared column within the strata at its unit; the positive is the same permutation plus the shift, so positive minus negative is the planted truth exactly. A whole-valued target takes a per-level whole shift and a shift that rounds away is refused. The planted vector comes from the spec's seed; a private run seed, for the owner's side, changes the permutations only. Refusals by class for a degenerate permutation, strata not nested above the unit, a target of the wrong kind or grain, an event column as target and a missing seed; both guards were falsified. 314 new expectations, full suite 3494/0. Vignette "Known-truth controls" on john_alpha, both sides.
Rationale for the seed and the unit moved out of the parameter text into the commit record (prose guard P1, P4); file headers and helper comments cut to the contract.
…orrected The vignette tested gen before the blocks, because aov orders interaction terms last, so its pipeline read a false-positive rate of 0.185 (MCSE 0.012) on john_alpha negatives against 0.047 (0.007) with gen last. The real-table p-value moves from 3.6e-7 to 1.5e-5. The docs said a negative control leaves the effect of `on` exactly absent. Within incomplete blocks each block keeps its set of levels, so part of the real effect survives. Examples now use complete replicates as strata, and the vignette and docs state both limits.
A pinned seed reproduced a site's displacement only on a byte-identical table. Draws are now a pure hash of seed, pair, try and site value, so shuffled, added or removed rows leave other sites where they were. Corrects the rebuild table.
…tion The design option keeps block and environment variance with no treatment effect, so a treatment test on the clone has the original's denominator and a true null. Column names give the partition; both run through the existing ladder.
…side controls A plan holds the roles and named specs. mask() resolves each control spec on the source and writes it back; the clone is unchanged by the spec. The analyst works from the clone-vocabulary plan; the owner replays cleaning, checks the table and the spec against the recipe and draws from a private seed. Version 0.17.0.
The clone plan's effect is drawn over sorted clone labels, so its order and the public seed give away no map. Dropped on or target, a spec seed equal to the mask seed, a plan passed to mask_set(), and a local clone at handover are refused. A design level needs three rows to carry a shift, and the audit grades a number that tracks the original row by row. Private seeds leave the manifest.
The audit measures tracking on the rows of small levels, with the means of large terms taken out, so strong environments no longer block a clone and a tracking subset is seen. Owner control seeds derive from a random key on the recipe. Spec names holding hidden names are refused; a lone small level gets no shift; blank handling is limited to on; a numeric alias of any value works on both sides.
…e the 0.17.0 tag The owner's derived seed had 28 bits, and a per-replicate statistic verifies a guess. Permutations on the plan route now come from SHA-256 of a 256-bit system key. The default control unit is the finest legal column, not the coarsest. The recipe's integrity check binds values. The refusal text says what each writer records. Limits of the audit, the ladder and the land test are documented.
Integrity tolerance tightened to the bound of a 15-digit file, with a second sum for small values beside a large one, and column types read back from a file now match. The default unit returns to the coarsest column that can reach a 5 percent level, with a warning when several qualify, because a finer unit hid pseudoreplication. Arrangement counts use label symmetry across strata and keep a unit whose first row is missing. The shape warning covers many levels. str() of controls hides the key.
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…e test checks growth
The negative control leaves any real effect of the permuted column in the outcome. Each released reading is classed by what it estimates, the null is a smoke test that a leak already in the table passes, and the planted size is read against the residual of the pipeline's own model.
This branch has not been deployed
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.
Takes masque to 0.17.0. This PR is here to run CI on every platform before the version is frozen for a study; merging waits for CRAN's answer on 0.16.0.
Controls.
control_spec(),controls()andcontrol_table()derive null, negative and positive datasets by permutation, from a clone and, with a private seed, from the original.Plan and handover.
masque_plan()holds the roles and named specs.mask(df, plan)resolves each control spec on the source and writes it back to the recipe.clone_plan()gives the same plan in the clone's names and labels.handover()writes the clone, that plan, the data card and a note to one folder, after the release gate.controls(real, plan, recipe = rec)runs the spec on the owner's side from a private key.Conditioning.
mask(conditional = "design")keeps design means and carries no treatment effect. Column names give an explicit partition.Behaviour changes.
apply_recipe()andcontrols()with a recipe refuse a table whose values differ from those the recipe was built on.Local checks at
901852f, macOS arm64: suite 3824 expectations, 0 failed. With the Suggests masked, 3339, 0 failed.R CMD checkalso passes on R 4.5.2, where the first CI run found the value fingerprint hashing how text was held in memory.R CMD check --as-cranon the tarball: 0 errors, 0 warnings, 1 NOTE from the sandbox's OpenMP startup message. The pkgdown site was not built, because the favicon service is blocked in the sandbox.