Skip to content
Open
Changes from 3 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
e777a80
update testing coverage function
NathanielBlairStahn Jan 23, 2026
6109f70
add randomness to testing interval
NathanielBlairStahn Jan 23, 2026
9f5b82d
update BBBM testing history from a 3-year interval to a 5-year interval
NathanielBlairStahn Jan 23, 2026
5fbef6e
adjust algorithm to distribute next test date uniformly between 3 and…
NathanielBlairStahn Jan 24, 2026
144321a
update initialization strategy for BBBM testing and describe it befor…
NathanielBlairStahn Jan 26, 2026
7df9a20
delete old information and add a to-do to explain probability formula
NathanielBlairStahn Jan 26, 2026
346849b
clarifications for how to count time steps
NathanielBlairStahn Jan 26, 2026
695a008
remove testing function knot at 2050
NathanielBlairStahn Jan 26, 2026
f25cfdf
edit BBBM testing algorithm to assign a testing history just in time …
NathanielBlairStahn Jan 27, 2026
875613b
rewrite initialization strategy to assign NaT appropriately
NathanielBlairStahn Jan 27, 2026
4d28ff2
comment out alternate BBBM testing algorithm
NathanielBlairStahn Jan 27, 2026
2bc0abf
Math explanation, adding model run request, adjusting limitations
Jan 27, 2026
bde4322
Merge branch 'main' into alzheimers/model-12
SylLutze Jan 27, 2026
d421514
changing to test immediately upon eligibility
Jan 27, 2026
cce45a0
clarify testing algorithm and clean up assumptions
NathanielBlairStahn Jan 28, 2026
28bc036
Update docs/source/models/intervention_models/alzheimers/testing_diag…
SylLutze Jan 30, 2026
febaa79
Updating age, sensitivity value, and reorganizing the match engineer …
Feb 3, 2026
d6a46ca
Updating to test future date not test history date
Feb 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,20 @@ assign positive/negative diagnosis which will inform treatment in :ref:`Alternat
Time-specific testing rates
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Testing rates do not vary by location, age or sex.
In 2020, 0% of eligible simulants are tested annually. This increases (instantly) to 10% at year 2030,
then increases linearly over time in each six-month period to reach 20% in 2035, to 40% in 2040
and then maxes out at 60% in 2045.
In 2020, 0% of eligible simulants are tested annually. This becomes
nonzero in 2027, increasing to 10% at year 2030,
then increases linearly for awhile, then levels off and eventually maxes
out at 60% after 2045. We will model this as a piecewise linear function
with knots at the following (year, coverage) values:

* (2020.0, 0%)
* (2027.0, 0%) -- Note that this is 0% at the *beginning* of 2027, but
coverage will become positive on the second time step that year
* (2030.5, 10%) -- Note that this is 10% at **mid**-year
* (2045.0, 50%)
* (2050.0, 57%)
* (2055.0, 60%)
* (2100.0, 60%)

.. _bbbm_propensity:

Expand All @@ -225,42 +236,55 @@ On each timestep, use the following steps to assign BBBM tests:

.. _bbbm_requirements:

1. Assess eligibility based on the following requirements:

- Simulant is not in MCI or AD dementia state (only susceptible, or pre-clinical)
- Simulant age is >=60 and <80
- Simulant has not received a BBBM test in the last three years (or
six time steps)
- Simulant has never received a positive BBBM test

2. If eligible (meets all requirements), check propensity.
If the propensity value is less than the time-specific testing rate, give the test. If not, do not give the test.
3. Assign a positive diagnosis to 90% of people and a negative diagnosis to 10% of people. This 90% draw should be independent of any previous draws, e.g., people who test negative still have a 90% chance of being positive on a re-test.
4. Record time of last test, yes/no diagnosis for future testing eligibility.
#. Assess eligibility based on the following requirements:

- Simulant is not in MCI or AD dementia state (only susceptible, or pre-clinical)
- Simulant age is :math:`\ge 60` and :math:`< 80`
- Simulant has not received a BBBM test in the last three years (or
six time steps)
- Simulant has never received a positive BBBM test

#. If eligible (meets all requirements), check testing propensity. If
the propensity value is less than the time-specific testing rate, the
simulant has the opportunity to get tested on this time step (but may
not be). If not, the simulant won't be tested.
#. If the simulant has the opportunity to be tested on this time step
(their propensity is less than the testing rate), give them a BBBM
test with probability 0.5, independently of other random choices
(see explanation below).
#. For those who get tested, assign a positive diagnosis to 90% of people and a negative diagnosis to 10% of people. This 90% draw should be independent of any previous draws, e.g., people who test negative still have a 90% chance of being positive on a re-test.
#. Record time of last test and yes/no diagnosis for determining future testing eligibility.

The strategy of giving eligible simulants a test with probability 0.5 on
each time step is to introduce randomness to the time between testing,
rather than having all simulants be retested at a fixed interval of 3
years (which caused oscillations in the number of tests over time). The
probability 0.5 was chosen as a convenient value that will guarantee
that most people will get retested within 5 years (Lilly requested that
tests occur every 3-5 years). Specifically, the probability that a
simulant *doesn't* get retested between 3 and 5 years (i.e., on one of
the 5 time steps at 3, 3.5, 4, 4.5, 5) is :math:`(1-0.5)^5 = 3.125\%`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm this works I suppose. I had done it differently in the MSLT and would need to math it out more to compare the relative distribution of testing across years. The MSLT will also be the vast majority of retesting so it probably won't make a huge difference what we do here.

I was thinking, especially since it is the same simulants being retested every time, that when a simulant tested negative we would assign them a "re-test date" uniformly selected for 3-5 years in the future. This would take more data storage, but since everyone in the sim is positive we shouldn't have all that many people testing negative and needing future dates stored.

I suppose I could also update the MSLT to reflect this new methos if we prefer it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's have Nathaniel update this to request the time until retest be uniformly distributed between 3 and 5 years, as we discussed this morning. How to accomplish this can be a detail left to the engineers, but I expect that having a retest_by column of pd.Timestamp data will be a straightforward approach for them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, instead of introducing an explicit "re-test date," I updated my hazard function to be non-constant so that it results in a uniform distribution for the waiting time instead of a geometric distribution.


On initialization
'''''''''''''''''

In order to avoid having all eligible simulants be tested immediately
upon entering the simulation, we will assign a BBBM testing history to
each initialized simulant who is eligible for a BBBM test. Since
simulants are only eligible for testing every three years (more
precisely, every 6 time steps), we will assign a random test date within
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aflaxman I wrote this section post hoc to describe what the engineers actually did, which involves counting time steps explicitly. I think they do it that way to ensure uniformity in sampling since the time steps are not exactly half a year (though really they should be if we wanted to do things better...), so maybe if we just rounded from a continuous time, it would tend to be biased in one direction or the other (though I'm not totally sure). Now that we're re-doing this piece, do you think I should rewrite this in terms of continuous time to avoid locking us into a particular time step, or is it fine to leave it in terms of the number of time steps? Rewriting it will require an explicit strategy for mapping continuous time to a discrete time step -- I'm not sure what the best strategy is or what strategies are compatible with how the engineers think about time steps. I think we are slated to have a wider team meeting about time-step-related issues like this at some point, but I'm not sure when.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine to keep to minimal change and not rewrite

the last three years before entering the simulation, as follows.
In order to avoid having a large fraction of eligible simulants be
tested immediately upon entering the simulation, we will assign a BBBM
testing history to each initialized simulant who is eligible for a BBBM
test. Since simulants are only eligible for testing every three years
(more precisely, every 6 time steps) and are likely to be tested at most
every five years (10 time steps), we will assign a random test date
within the last five years before entering the simulation, as follows.

On initialization of each eligible simulant, choose uniformly at random
from one of the last 6 time steps when they could have been tested,
omitting any time steps before 2030 when testing is not yet available.
If there are no such time steps (i.e., all 6 are before 2030), assign
"not a time" (NaT) for the simulant's previous test date. Otherwise, the
first time the simulant could be eligible for testing again is 6 time
steps after the chosen previous test date. We assume for simplicity that
there were no prior false positive tests among simulants entering the
simulation, so all previous BBBM tests are negative.

Even with prior BBBM testing history in place, due to test coverage
jumping from 0% to 10% in 2030, we expect a large group to be
immediately tested and then a drop-off in testing counts.
from one of the last 10 time steps when they could have been tested. If
the chosen time step occurs before the first date in 2027 when testing
becomes available, assign "not a time" (NaT) for the simulant's previous
test date. Otherwise, the first time the simulant could be eligible for
testing again is 6 time steps after the chosen previous test date. We
assume for simplicity that there were no prior false positive tests
among simulants entering the simulation, so all previous BBBM tests are
negative.

.. note::

Expand Down