Skip to contents

Assembles a reviewer-facing document that gathers what the theory file records and what the package derives from it. Test outcomes, evidence, registrations and declared severities are as the author recorded them. The dossier flags a recorded pass whose estimate lies outside its claimed region, a recorded failure whose estimate lies inside it and a declared severity more than 0.2 above the claim-form rubric, and checks nothing else that the author entered, so it is not an independent audit. The output is deterministic, so the same theory file gives the same dossier for the same cycles.

Usage

tf_dossier(theory, cycles = "refuse")

Arguments

theory

A theory object (named list), such as one from tf_read().

cycles

"refuse" (the default) or "sigma", passed to tf_check(), tf_entailments(), tf_discriminate() and tf_preregister(), so that the header and the body read a graph with feedback loops in the same way.

Value

The dossier Markdown as a single string (LF line endings, single trailing newline).

Details

The header gives the content hash, the maturity, the checklist version, the checklist score with the lowest and highest score under equal weights or one weight halved or doubled, the checklist coverage, the gate and the blockers that failed. When the causal graph has a feedback loop, the header ends with a line saying how the dossier reads it, refused under the default and read by sigma-separation with cycles = "sigma". A fixed paragraph in italics follows, saying what the checklist score describes, what the gate checks and what the dossier is. The checklist table marks the two items whose failure blocks the gate with (blocker) beside their ids and prints n/a for an item with nothing to assess. The severity list gives each prediction's claim-form rubric values and, when the prediction declares a severity, that value too, with a note when it exceeds the rubric by more than 0.2. The test record lists every test outcome in file order, with what it found and the observation, date and registration it records, and with the post-data severity of tf_post_data_severity() where it can be computed, an open bound written as -inf or inf. The evidence lists the prediction each entry supports, its direction and its DOI. The claims and the causal graph, with the assumptions their verdicts rest on, the equivalent models for observational data, the rivals and the provenance follow, and the preregistration (its theory and hypotheses sections, without the severity section) closes it, its title and headings two levels lower than in the preregistration itself. The implied independencies appear once, in the preregistration. Every value is written on one line, ids and dates included.

It stops, as tf_check() does, when a test outcome's passed is present and not TRUE or FALSE, or when a prediction's severity is not a finite number from 0 to 1.

Examples

theory <- tf_theory("demo-1", "A demonstration theory") |>
  tf_add_construct("c_arousal", "Arousal", "Bodily activation.") |>
  tf_add_construct("c_threat", "Perceived threat", "Appraised danger.") |>
  tf_add_proposition("p1", "c_arousal", "c_threat", "causes",
                     mechanism = "Activation raises salience of threat cues.") |>
  tf_add_prediction("h1", "The effect is 0.30, within 0.05.", "point",
                    derives_from = "p1", bounds = list(lower = 0.25, upper = 0.35))
cat(tf_dossier(theory))
#> # theoryforge dossier: A demonstration theory
#> 
#> - Theory ID: demo-1
#> - Content hash: sha256:24f34464859fe33e442cd3a119c8d9f52e58f12de059a5dc75ca024e1ea8008f
#> - Maturity: building
#> - Checklist version: 3.1
#> - Checklist score: 71.7 (62.7 to 75.7 with equal weights or one weight halved or doubled)
#> - Checklist coverage: 0.92
#> - Gate: pass
#> - Blockers failed: 0
#> 
#> _Generated by theoryforge from the file with the content hash above. The checklist score describes how completely the file states what checklist 3.1 asks for. Most items read whether a field is filled in or how a prediction is labelled, and stated claims are checked against the causal graph. Test outcomes are read only by the parsimony item, the weights are conventions, and no study has established what difference between two scores is meaningful. The score does not show that the theory is true or well reasoned. The gate reports whether either blocking item failed: at least one prediction is typed point, interval or directional, and every prediction cites declared propositions whose graph entails any claim it states, with no stated phenomenon contradicted. Under the default reading of feedback loops, a claim that names a construct on a loop or downstream of one is not read and blocks nothing. The labels are the author's and are not checked against the statements. Test outcomes, evidence, registrations and declared severities are as the author recorded them. The dossier flags a recorded pass whose estimate lies outside its claimed region, a recorded failure whose estimate lies inside it and a declared severity more than 0.2 above the rubric, and checks nothing else that the author entered. It is not an independent audit._
#> 
#> ## Checklist
#> 
#> | item | criterion | status | score | weight |
#> | --- | --- | --- | --- | --- |
#> | falsifiability (blocker) | At least one prediction is typed point, interval or directional; the label is the author's | pass | 1.0 | 0.15 |
#> | precision | Share of predictions typed point or interval with a finite lower and upper bound, at or above threshold; the width of the region is not read | pass | 1.0 | 0.1 |
#> | risk_severity | Mean prediction riskiness (declared severity, else the claim-form rubric) at or above threshold | pass | 0.9 | 0.1 |
#> | parsimony | No auxiliary assumption added for an anomaly (named in added_for) lacks independent corroboration | n/a | n/a | 0.08 |
#> | non_redundancy | Every construct is defined, and no two have near-duplicate or contained definitions or one label, and no construct's measures are all listed for another (lexical screen) | pass | 1.0 | 0.1 |
#> | construct_clarity | Every construct has definition + measurement + boundary conditions | warn | 0.0 | 0.08 |
#> | scope | Boundary conditions explicitly stated | warn | 0.0 | 0.06 |
#> | logical_why | Every proposition's mechanism field is filled in; its text is not judged | pass | 1.0 | 0.08 |
#> | causal_testability | At least one proposition states a causal relation | pass | 1.0 | 0.06 |
#> | diagnosticity | At least one prediction names a registered alternative it discriminates from (declared, and not shown false where the claim and the rival's propositions are stated) | warn | 0.0 | 0.06 |
#> | formalisation | A formal model of a recognised type (ode, abm, network, sem) is declared | warn | 0.0 | 0.05 |
#> | derivation_chain (blocker) | Every prediction cites declared propositions, the causal graph entails any claim it states and contradicts no phenomenon's claim (a claim left unread because of a feedback loop warns) | pass | 1.0 | 0.08 |
#> 
#> ## Severity (pre-data rubric of claim form)
#> 
#> - h1: severity 0.9, risk 0.9
#> 
#> ## Test record
#> 
#> _No test outcomes recorded._
#> 
#> ## Evidence
#> 
#> _No evidence recorded._
#> 
#> ## Claims and the causal graph
#> 
#> _No prediction or phenomenon states a claim._
#> 
#> ## Equivalent models (observational data)
#> 
#> - p1: c_arousal -> c_threat (reversed in some equivalent model)
#> 
#> ## Rivals
#> 
#> _No alternative states propositions._
#> 
#> ## Provenance
#> 
#> 1. tf_theory: demo-1
#> 2. tf_add_construct: c_arousal
#> 3. tf_add_construct: c_threat
#> 4. tf_add_proposition: p1
#> 5. tf_add_prediction: h1
#> 
#> ## Preregistration
#> 
#> ### Preregistration: A demonstration theory
#> 
#> - Theory ID: demo-1
#> - Schema version: 1.1
#> - Content hash: sha256:24f34464859fe33e442cd3a119c8d9f52e58f12de059a5dc75ca024e1ea8008f
#> - Maturity: building
#> - Derivation references resolve, the causal graph entails every claim a prediction states and contradicts no claim a phenomenon states: yes
#> 
#> _Generated by theoryforge from the theory file. It holds the theory and hypotheses sections of a preregistration, with any sampling plan the file records. The study design, the analysis plan, the inference criteria and whatever the sampling plan leaves out must be added before registration. The content hash identifies the file and is not a time stamp._
#> 
#> #### Theory
#> 
#> ##### Constructs
#> - c_arousal (Arousal): Bodily activation.
#> - c_threat (Perceived threat): Appraised danger.
#> 
#> ##### Propositions
#> - p1: c_arousal causes c_threat. Mechanism: Activation raises salience of threat cues.
#> 
#> #### Hypotheses
#> 1. [point] The effect is 0.30, within 0.05. (h1; derives from: p1)
#>    - Region the claim allows: [0.25, 0.35]
#>    - Test record: untested
#> 
#> #### Implied conditional independencies (derived from the causal graph, not predictions)
#> _None: every pair of constructs in the causal graph is adjacent._