adherence_dodd: Estimate a Participant's Probability of Adhering to "N Days...

Description Usage Arguments Details References Examples

Description

Implements the Bayesian approach developed by Dodd and used in the landmark Troiano et al. paper (MSSE 2008).

Usage

1
adherence_dodd(n, x, n.rec = 7, x.rec = 5, posterior = NULL)

Arguments

n

Number of monitoring days.

x

Number of active days.

n.rec

Denominator for recommendation.

x.rec

Numerator for recommendation.

posterior

Can be NULL for original Dodd method or "mean" or "median" for modified version described above.

Details

The approach aims to estimate a participant's probability of meeting guidelines of the form "at least x minutes per day for at least y days per week" based on observing X active days out of n monitoring days. We illustrate here with the "5+ active days per week" guideline that motivated the approach.

The prior assumption for the participant's daily adherence probability is:

p_d ~ Uni(0, 1)

Given p_d, the number of active days out of n monitoring days is distributed:

X|p_d ~ Bin(n, p_d)

It can be shown that the posterior for p_d is:

p_d|X ~ Beta(X + 1, n - X + 1)

Under a somewhat questionable independence assumption, the weekly adherence probability is p_w = P(Y >= 5) with Y ~ Bin(7, p_d). Dodd estimates p_w as:

p_w.hat = P(p_d >= 5/7 | X)

which can be calculated using pbeta.

In my view, the quantity P(p_d >= 5/7 | X) is not a good estimator for p_w. Consider what would happen in a really long protocol. The Beta posterior for p_d would be very tightly centered around the true p_d, and p_w.hat = P(p_d >= 5/7 | X) would be very close to either 0 or 1 – not very close to what we're trying to estimate, p_w.

A solution is to define p_d.hat as the posterior mean, median, or mode, and map that estimate to p_w, i.e. p_w.hat = P(Y >= 5) with Y ~ Bin(7, p_d.hat). So there is an option for that.

References

Dodd, K. (2008). Estimation of the population prevalence of adherence to physical activity recommendations based on NHANES accelerometry measurements. Technical Report. Available at: https://epi.grants.cancer.gov/nhanes_pam/bayesian_adherence_estimation.pdf. Accessed Nov. 13, 2018.

Troiano, R.P., Berrigan, D., Dodd, K.W., Masse, L.C. and McDowell, M. (2008). Physical activity in the United States measured by accelerometer. Medicine \& Science in Sports \& Exercise 40(1): 181–188.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Generate data from hypothetical study with 1000 subjects, valid days 
# randomly sampled from 1-7, and p_d's drawn from Beta(0.5, 3).
set.seed(1)
n <- sample(1: 7, size = 1000, replace = TRUE)
p_d <- rbeta(n = 1000, shape1 = 0.5, shape2 = 3)
x <- rbinom(n = 1000, size = n, prob = p_d)

# Estimate p_w's using Dodd's method
p_w.hat <- adherence_dodd(n = n, x = x)

# Note that the mean p_w.hat differs considerably from the true mean p_w, 
# reflecting bias in the estimator.
mean(p_w.hat)
mean(pbinom(q = 4, size = 7, prob = p_d, lower.tail = FALSE))

vandomed/accelerometry documentation built on May 26, 2019, 5:34 a.m.