Skip to main content
. 2024 Feb 26;6(1):114–128. doi: 10.3390/clockssleep6010009
Algorithm 2 Virtual individual generation: reduced individual variance. Takes as input posterior draws of α,β,σ0,σ1 in Equation (2) and η
  • 1:

    procedure VirtualIndividualReducedVariance (η,α,β,σ0,σ1)

  • 2:

        For all αi posterior draws, shrink towards the grand mean: αi=αi+(α¯αi)(1η) where α¯ is the posterior mean

  • 3:

        For all βi posterior draws, shrink towards the grand mean: βi=βi+(β¯βi)(1η) where β¯ is the posterior mean

  • 4:

        Uniformly sample a set of random (α,β) values from the variance-reduced posterior draw set

  • 5:

        Uniformly sample a set of random (σ0,σ1) values from the posterior draw set

  • 6:

        Sample a from a kernel density approximation of empirical distribution using inverse transform sampling (see [30])

  • 7:

        Calculate a=a+(a50a)(1η) where a50 indicates the median value of the empirical distribution

  • 8:

        Calculate σ=η(σ0+σ1a)

  • 9:

        Draw a value of logbnormal(α+βai,σ)

  • 10:

        Use ed(x)=10a(1+1/(1x))1/b to calculate ED25 (x=0.25) and ED75 (x=0.75) for that individual

  • 11:

        If ED25 is less than half the minimum ED25 in estimates from [22], reject (a,b) and call VirtualIndividualReducedVariance

  • 12:

        If ED75 is greater than 1.5 times the maximum ED75 in estimates from [22], reject (a,b) and call VirtualIndividualReducedVariance

  • 13:

        return (a,b) which characterize a dose-response curve

  • 14:

    end procedure