theoryforge sits among tools for causal graphs, structural equation modelling, bibliometrics, preregistration and the specification of theories. This page says what each neighbour does, what theoryforge adds or lacks beside it and how a theory moves between them. The routes that run through another package were tried with the versions named. Where a route loses information, the page says what is lost and, where there is one, gives a route that keeps it.
theoryforge appraises one versioned theory object, through the checklist, the causal reading of its propositions, riskiness and post-data severity, the amendment appraisal and the placing of the theory and its rivals in a literature. It does not estimate models from data, learn causal graphs, test implied independencies against data, archive theories with a DOI or fill in registered preregistration templates, and the tools below do one or more of these.
Theory specification: FAIR theory and theorytools
Van Lissa et al. (2026) propose that theories be made findable,
accessible, interoperable and reusable. A FAIR theory lives in a Git
repository with a file that states the theory, a README and a licence,
and is released to Zenodo with a DOI. The R package theorytools
(version 0.1.3) automates this with create_fair_theory(),
which writes the repository and its Zenodo metadata, and
download_theory(), which retrieves one. It also selects
control variables and filters implied independencies through dagitty,
derives regression formulas and simulates data from DAGs whose edges
carry functional forms, and compares definitions by string distance or
embeddings.
The two packages overlap in versioned specification, implied
independencies and the comparison of construct definitions. theorytools
prepares a theory for release on Zenodo, which gives it a DOI, and
simulates data from it. theoryforge’s nearest route is
tf_osf_push(), which uploads the theory’s dossier, and not
the theory file, to an OSF project’s storage. That upload is not a
registration, and it gives the file no DOI of its own. theoryforge holds
predictions, auxiliary assumptions, rivals and test outcomes in a
validated schema, and adds the checklist, the causal reading of claims,
the amendment appraisal and the literature layer, which theorytools does
not.
A FAIR theory whose formal file is DAGitty code reads into
theoryforge with tf_read_dagitty(), as the
self-determination theory example that theorytools ships does. Its
definitions sit in a separate table and have to be added to the
constructs before the theory validates. A prose operationalisation
belongs in a construct’s measurement only when it can serve
as an indicator name, since tf_compile_sem() turns each
entry into a variable name. In the other direction, the
causal_dag view of tf_diagram() writes the
theory’s graph as DAGitty code that a FAIR repository can hold.
theorytools is licensed under the GPL and theoryforge under MIT, so the
two meet through files and share no code.
Causal graphs: DAGitty, ggdag, pgmpy, DoWhy and y0
DAGitty is a browser editor
for causal diagrams (Textor et al., 2011), and the R package dagitty
(Textor et al., 2016; version 0.3-4) analyses the same model code. It
lists implied conditional independencies, tests them against data with
localTests() (Ankan et al., 2021), finds adjustment sets
and instrumental variables, and gives the equivalence class of a graph.
theoryforge writes its graph as DAGitty code through the
causal_dag view and reads DAGitty code with
tf_read_dagitty(), so a diagram drawn in DAGitty can start
a theory and a theory’s graph can be opened in DAGitty. The export
carries no positions, so DAGitty lays the graph out afresh.
M <- tf_read(tf_example_path("modality-switching.theory.yaml"))
code <- tf_diagram(M, "causal_dag")
cat(code)dag {
c_sensorimotor_experience -> c_modality_activation
c_modality_activation -> c_switch_cost
c_modality_activation -> c_conceptual_access
c_lexical_familiarity -> c_conceptual_access
}
back <- tf_read_dagitty(code)
for (p in back$propositions) cat(p$from, p$relation, p$to, "\n")c_sensorimotor_experience causes c_modality_activation
c_modality_activation causes c_switch_cost
c_modality_activation causes c_conceptual_access
c_lexical_familiarity causes c_conceptual_access
The round trip keeps the graph and loses what DAGitty code cannot
hold: the definitions, the measures, the mechanisms and the sign of each
relation. Every edge comes back as causes unless the
relation argument gives all of them one sign.
The two tools also read a graph differently. By default, theoryforge
conditions each implied independence on the parents of both constructs,
which gives Shipley’s (2000) basis set, where DAGitty’s default chooses
smaller sets, and given = "minimal" prunes theoryforge’s
sets to minimal ones. DAGitty reads a graph with a feedback loop by
d-separation without a warning, while theoryforge refuses such a graph
by default and reads it by sigma-separation on request (Bongers et al.,
2021).
One route out of theoryforge reverses the theory’s meaning. dagitty’s
lavaanToGraph() reads the zero-covariance lines that
tf_compile_sem() writes, such as
c_switch_cost ~~ 0*c_conceptual_access, as bidirected
edges, which assert the covariance the line rules out. Pass dagitty the
causal_dag view and not the lavaan syntax.
ggdag draws,
with ggplot2, graphs that dagitty has read, so the
causal_dag view reaches it through
dagitty::dagitty(). theoryforge’s own diagram views draw
the same structure as Graphviz DOT, without ggplot2.
pgmpy (Ankan &
Panda, 2015; version 1.1.2) is a Python library for graphical models.
DAG.from_dagitty() reads the causal_dag view
of an acyclic theory, turns each association into a latent common cause
named u_<a>_<b> and refuses a graph with a
feedback loop. Its metrics module tests the implied
independencies of a graph against data, among other ways by Shipley’s C
(fisher_c()), a step that theoryforge leaves to such tools.
For a theory with associations, the tests fail, since the data hold no
column for the latent common causes, and removing those nodes from the
graph would turn each association into a claimed independence. dagitty’s
localTests() reads the bidirected edges of the
causal_dag view directly and tests such a theory’s
implications. The lavaan route into pgmpy does not work.
DAG.from_lavaan() skips, without a warning, every line
whose names contain an underscore, so the output of
tf_compile_sem(), whose names all contain one, reads as an
empty graph. Use from_dagitty() instead.
DoWhy (version 0.14)
estimates causal effects from data in four steps: modelling,
identification, estimation and refutation. Its gcm module
tests a graph’s local Markov conditions against data. It accepts a graph
as a networkx object, as DOT or as DAGitty code, but DAGitty code loses
its associations there. Whether the causal_dag view is
passed to CausalModel directly or through DoWhy’s
converter, each bidirected line becomes a variable named
<-> and no edge, without an error. In an example
theory of planned behaviour, the adjustment set DoWhy then finds for the
effect of attitude on behaviour is empty, where the theory’s
associations call for adjusting for subjective norm and perceived
control. Pass DoWhy a networkx graph in which each association is a
latent common cause, such as the graph pgmpy’s
from_dagitty() returns, and DoWhy then finds that
adjustment set.
y0 (version 0.2.11)
identifies causal effects on mixed graphs, including counterfactual and
transport queries that theoryforge does not address, and it offers a
sigma-separation test. That test gives a wrong answer on a small graph.
For A → B, B → C, C → B and D → C, are_sigma_separated()
reports that A and D are not sigma-separated, although every path
between them passes through a collider that nothing holds fixed.
tf_implications(cycles = "sigma") gives
A _||_ D for the same graph. A theory moves to y0 by
building its NxMixedGraph from the directed edges and the
associations of the causal_dag view.
Structural equation models: lavaan and semopy
tf_compile_sem() writes a theory as model syntax for lavaan (Rosseel,
2012). The syntax holds a measurement model from each construct’s
measurement, a labelled regression for each path, a
covariance for each association and, as comments, the sign each
increases or decreases proposition states. It
defines with := the effect that each effect claim is about,
and fixes at zero the covariances the graph rules out, which
lavaan::sem() would otherwise free. The indicator names are
the sanitised measurement entries and must match the columns of the
data. Fitting the model, checking its identification and reading its
estimates are left to lavaan, and the estimate and standard error of a
defined effect can be recorded in a test outcome, where
tf_post_data_severity() reads them.
semopy (Igolkina &
Meshcheryakov, 2020; version 2.3.11) fits lavaan-like syntax in Python.
It refuses the := lines of tf_compile_sem(),
which therefore have to be deleted first. It then reads the rest, labels
included, and keeps the fixed covariances at zero. The syntax assumes
the defaults of lavaan::sem() for the covariances it does
not write, so check the covariances semopy frees against those the
theory intends.
Bibliometrics: bibliometrix and openalexR
bibliometrix
(Aria & Cuccurullo, 2017) is a suite for mapping a scientific field.
It reads exports from Web of Science, Scopus, OpenAlex and other
databases, draws co-occurrence, co-citation and thematic maps and
follows themes over time, with the biblioshiny app as its interface. Its
thematicMap() and
tf_litmap(method = "simple_centres") both place themes in a
strategic diagram by centrality and density (Callon et al., 1991). They
cluster the keywords differently, and bibliometrix places the themes by
the ranks of the two measures, so their values are not comparable.
theoryforge’s map is narrower and adds tf_landscape(),
which places a theory and its registered rivals among the themes. A
corpus moves from bibliometrix to theoryforge by writing each record’s
title, year, DOI, keywords and cited references in the corpus
schema.
openalexR
(Aria et al., 2024) is an R client for OpenAlex, with its full filter
syntax, citation chasing (oa_snowball()) and retries.
tf_fetch_corpus() meets a narrower need, turning an
OpenAlex search into a theoryforge corpus with the same records in R and
Python. For anything beyond a search, fetch the records with openalexR
and write them in the corpus schema.
Hypotheses and preregistration: scienceverse, preregr and TOSTER
scienceverse, an R package on GitHub, describes a study in machine-readable form. Each hypothesis is stated as criteria on the results of an analysis, with conditions for corroboration and for falsification that the package evaluates (Lakens & DeBruine, 2021). theoryforge records whether a test passed and leaves the criteria that decide it to the author, and scienceverse holds no theory, propositions or rivals from which a hypothesis is derived. The two complement each other, theoryforge for the theory and the derivation of its predictions and scienceverse for the criteria and their evaluation, and neither package converts the other’s records.
preregr,
archived from CRAN in July 2026, specifies a preregistration as a
structured object, with form definitions such as PRP-QUANT, and exports
it as HTML or PDF for readers and as JSON or YAML for machines.
tf_preregister() writes the theory and hypotheses sections
of a preregistration from the theory, in its own layout and in no
registered template, so its content is copied into the form that a
registry or a journal asks for.
TOSTER runs
equivalence tests (Lakens, 2017), in t-based, bootstrap and
nonparametric variants, and computes power for planning them. For a
claim with two finite bounds, tf_post_data_severity()
equals 1 minus the p value of the z-based two one-sided tests, which
TOSTER’s TOSTmeta() computes from an estimate and its
standard error. TOSTER’s t-based tests suit small samples, in which the
normal approximation of tf_post_data_severity() overstates
the severity of an estimate inside the region, and its power functions
can check a sampling plan that theoryforge records but does not
recompute.
Arguments and formal models: VAST and PsychoModels
The Visual Argument Structure Tool (VAST; Leising et al., 2023) visualises the relations that make up an argument. It keeps concepts apart from the names used for them, and it gives causation, conceptual implication, prediction, transformation and reasoning each a relation of its own, apart from beliefs about what is or ought to be the case. theoryforge’s propositions hold causal relations and associations only, so a definitional or part-whole relation that VAST states has no counterpart, and a VAST diagram has to be reduced to its causal relations before it can be written as a theory.
The PsychoModels database (Nak et al., 2025) is an online repository
that stores, indexes and describes the mathematical and computational
models of psychology by the FAIR principles. A theory whose formal model
is a system of differential equations or an agent-based model can point
to such a model through the spec_ref of its
formal_model, and theoryforge then checks the verbal and
causal structure around the model. theoryforge has no converter for VAST
or PsychoModels.
Computed appraisal, ontologies and signed graphs
Computing an appraisal of a theory has precedents. ECHO implements a theory of explanatory coherence as a connectionist network, in which a hypothesis is accepted when it coheres better overall than its competitors (Thagard, 1989), and IMEC implements explanatory coherence on the Ising model, in an R package that helps researchers evaluate their theories (Maier et al., 2024). Both weigh what a theory explains against what its rivals explain, which theoryforge does not do. Meehl (2002) proposed that a statistical composite of the attributes scientists use in appraising theories, among them parsimony and the number, diversity, novelty and precision of the facts a theory derives, could give an actuarial basis for theory appraisal. theoryforge’s checklist score is a composite of another kind, of how completely the file states what the checklist asks for, and its weights have not been calibrated against the later fate of theories.
The behaviour-change theory ontology represents a theory by its
constructs, each labelled and defined, and by the relationships between
pairs of them, which may be causal, structural or semantic (West et al.,
2019). Its database holds 76 theories as
construct-relationship-construct triples. Of the 71 theories encoded for
it, 36 were finalised only after their constructs, their relationships
or both were changed following feedback from the theories’ authors or
other experts, and the relationship used most often was ‘influences’
(Hale et al., 2020). theoryforge’s propositions hold causal relations
and associations only, so a structural or semantic relationship has no
counterpart, and an unsigned relationship such as ‘influences’ becomes
causes, whose sign the causal reading leaves open.
Loop analysis (Levins, 1974) makes qualitative predictions, by sign
alone, of how the variables of a system of causally interdependent
variables change, and the R package LoopAnalyst
implements it. It is the precedent for deriving signs from a signed
graph, which tf_entailments() does for the effect of an
intervention on one construct and for the association of two.
References
Ankan, A., & Panda, A. (2015). pgmpy: Probabilistic graphical models using Python. In Proceedings of the 14th Python in Science Conference (pp. 6–11). SciPy. https://doi.org/10.25080/Majora-7b98e3ed-001
Ankan, A., Wortel, I. M. N., & Textor, J. (2021). Testing graphical causal models using the R package “dagitty”. Current Protocols, 1(2), Article e45. https://doi.org/10.1002/cpz1.45
Aria, M., & Cuccurullo, C. (2017). bibliometrix: An R-tool for comprehensive science mapping analysis. Journal of Informetrics, 11(4), 959–975. https://doi.org/10.1016/j.joi.2017.08.007
Aria, M., Le, T., Cuccurullo, C., Belfiore, A., & Choe, J. (2024). openalexR: An R-tool for collecting bibliometric data from OpenAlex. The R Journal, 15(4), 167–180. https://doi.org/10.32614/RJ-2023-089
Bongers, S., Forré, P., Peters, J., & Mooij, J. M. (2021). Foundations of structural causal models with cycles and latent variables. The Annals of Statistics, 49(5), 2885–2915. https://doi.org/10.1214/21-AOS2064
Callon, M., Courtial, J. P., & Laville, F. (1991). Co-word analysis as a tool for describing the network of interactions between basic and technological research: The case of polymer chemistry. Scientometrics, 22(1), 155–205. https://doi.org/10.1007/BF02019280
Hale, J., Hastings, J., West, R., Lefevre, C. E., Direito, A., Bohlen, L. C., Godinho, C., Anderson, N., Zink, S., Groarke, H., & Michie, S. (2020). An ontology-based modelling system (OBMS) for representing behaviour change theories applied to 76 theories. Wellcome Open Research, 5, Article 177. https://doi.org/10.12688/wellcomeopenres.16121.1
Igolkina, A. A., & Meshcheryakov, G. (2020). semopy: A Python package for structural equation modeling. Structural Equation Modeling: A Multidisciplinary Journal, 27(6), 952–963. https://doi.org/10.1080/10705511.2019.1704289
Lakens, D. (2017). Equivalence tests: A practical primer for t tests, correlations, and meta-analyses. Social Psychological and Personality Science, 8(4), 355–362. https://doi.org/10.1177/1948550617697177
Lakens, D., & DeBruine, L. M. (2021). Improving transparency, falsifiability, and rigor by making hypothesis tests machine-readable. Advances in Methods and Practices in Psychological Science, 4(2), Article 2515245920970949. https://doi.org/10.1177/2515245920970949
Leising, D., Grenke, O., & Cramer, M. (2023). Visual Argument Structure Tool (VAST) Version 1.0. Meta-Psychology, 7. https://doi.org/10.15626/MP.2021.2911
Levins, R. (1974). Discussion paper: The qualitative analysis of partially specified systems. Annals of the New York Academy of Sciences, 231(1), 123–138. https://doi.org/10.1111/j.1749-6632.1974.tb20562.x
Maier, M., van Dongen, N., & Borsboom, D. (2024). Comparing theories with the Ising model of explanatory coherence. Psychological Methods, 29(3), 519–536. https://doi.org/10.1037/met0000543
Meehl, P. E. (2002). Cliometric metatheory: II. Criteria scientists use in theory appraisal and why it is rational to do so. Psychological Reports, 91(2), 339–404. https://doi.org/10.2466/pr0.2002.91.2.339
Nak, J., Volz, L., Verbrugh, V., Borsboom, D., & van Dongen, N. (2025). The PsychoModels database – Facilitating the exchange of formal models. Zeitschrift für Psychologie, 233(4), 271–278. https://doi.org/10.1027/2151-2604/a000601
Rosseel, Y. (2012). lavaan: An R package for structural equation modeling. Journal of Statistical Software, 48(2), 1–36. https://doi.org/10.18637/jss.v048.i02
Shipley, B. (2000). A new inferential test for path models based on directed acyclic graphs. Structural Equation Modeling: A Multidisciplinary Journal, 7(2), 206–218. https://doi.org/10.1207/S15328007SEM0702_4
Textor, J., Hardt, J., & Knüppel, S. (2011). DAGitty: A graphical tool for analyzing causal diagrams. Epidemiology, 22(5), 745. https://doi.org/10.1097/EDE.0b013e318225c2be
Textor, J., van der Zander, B., Gilthorpe, M. S., Liśkiewicz, M., & Ellison, G. T. H. (2016). Robust causal inference using directed acyclic graphs: The R package ‘dagitty’. International Journal of Epidemiology, 45(6), 1887–1894. https://doi.org/10.1093/ije/dyw341
Thagard, P. (1989). Explanatory coherence. Behavioral and Brain Sciences, 12(3), 435–467. https://doi.org/10.1017/S0140525X00057046
Van Lissa, C. J., Peikert, A., Ernst, M. S., van Dongen, N. N. N., Schönbrodt, F. D., & Brandmaier, A. M. (2026). To be FAIR: Theory specification needs an update. Perspectives on Psychological Science, 21(2), 173–191. https://doi.org/10.1177/17456916251401850
West, R., Godinho, C. A., Bohlen, L. C., Carey, R. N., Hastings, J., Lefevre, C. E., & Michie, S. (2019). Development of a formal system for representing behaviour-change theories. Nature Human Behaviour, 3(5), 526–536. https://doi.org/10.1038/s41562-019-0561-2