ALGAE Protocol: Calculations and Algorithms

An automated protocol for assigning early life exposures to longitudinal cohort studies

Calculations and Algorithms

by Kevin Garwood

Exposure Measurement Error Calculations

ALGAE's cleaning process will ensure that study members occupy exactly one location for each day of their exposure time frames. Gaps and overlaps may occur in the administrative records that are used to create residential address histories. These two types of problems make it uncertain where they may have lived.

If an exposure day is affected by a correction for a gap or an overlap, ALGAE assigns an exposure measurement error that is based on the difference between two locations: the address that cleaning assigned and the address that could have otherwise been used.

Assessing the error for exposure values because of data cleaning..

Percent Error Calculations

ALGAE conducts exposure assessment in different ways, and then compares corresponding results between pairs of them. See the section Aggregate Daily Exposure Methods Using Different Methods.

Assessing the error for exposure values because of data cleaning..

Life Stage Calculations

Calculation of temporal boundaries for life stages

Most of the temporal boundaries for life stages in the early analysis the early life analysis are based on the date of conception, which is calculated as follows:

conception date = birth date - (7 x gestation age at birth in weeks) - 1 day
Life Stage Description Start Date End Date
T1 Trimester 1 conception date conception date + 92 days
T2 Trimester 2 conception date + 93 days conception date + 183 days
T3 Trimester 3 conception date + 184 days birth date - 1 day
EL Early life period birth date birth date + 1 year - 1 day
YRn Year n of life birth date + n years birth date + (n + 1) years - 1 day
Default life stage calculations.

Algorithm for fixing life stage boundaries in cases of premature birth

In the early life analysis, if the cohort member has a gestation age at birth of less than 26 weeks, then one or both of T2 or T3 will overlap with the EL period. In order to correct this, we use an algorithm described by the following pseudo-code:

	If life stage = 'EL' then 
		do not change the start and end dates
	Else if life stage start date > birth date then
		assign the life stage null values for its start and end dates
	Else if life stage end date > birth date then
		end date = birth date - 1 day