Skip to content

Pre-registration

A question can be written before its data exist: it only needs the names it uses. Registered in the protocol, it is saved with the study, and every result says whether its question came before the data.

study.protocol.add_question(q, status="primary")      # the time is recorded by synaptome
study.save("trial.syn")
# ... later, the values arrive ...
r = study.protocol.questions["Slope by group"].test("welch")
r.timing["timing"]                                    # "before data"

Timing

timing Meaning
"before data" registered before the first value of every variable the question reads
"after data" registered after some of those values arrived
"not pre-specified" not in the protocol, or registered with another analysis
"unknown" a time is missing (a file saved before these times were recorded)

The registration time is recorded by add_question and can't be set; the data time is the first time each variable received values, so data added in several batches don't hide that the first ones came earlier. A result matches its registration by title and analysis: rewording the description doesn't count, changing a role, subset or reduce does. The timing is printed under formatted tables.

Amendments

Plans change. add_question(q, replace=True, reason=...) and remove_question(title, reason=...) need a reason; the old version, its time and the reason stay in protocol.amendments, saved with the study. A replaced question is registered anew, so it can lose "before data". See tutorial 12.