Skip to contents

The function computes parameters of the 2-dimensional posterior distrbution, namely, the posterior modes for both dimensions (corresponding to taps 1 and tap 2), the variance, and correlation. The code refers to the two-tap model with equal variance (spatial uncertainty) for both taps as described in Goldreich & Tong (2013), given in Formula A14.

Usage

posterior_params_2Tap_EqVar(x1m, x2m, time_t, sigma_s, sigma_v)

Arguments

x1m

measured/sensed or hypothetical position of tap 1 for which the likelihood (p given the other parameters) is computed

x2m

measured/sensed or hypothetical position of tap 2

time_t

speed prior (in units of space per time; given as a standard deviation)

sigma_s

spatial uncertainty (given as a standard deviation) for the taps (same sd assumed for both positions)

sigma_v

speed prior (in units of space per time; given as a standard deviation)

Value

a list containing the posterior modes, the variance, and the correlation.

References

Goldreich & Tong, 2013, Frontiers in Psychology

Examples

#posterior parameters for the given parameters...
posterior_params_2Tap_EqVar(x1m=2, x2m=4, time_t=0.1, sigma_s=1, sigma_v=10)
#> $x1_star
#> [1] 2.666667
#> 
#> $x2_star
#> [1] 3.333333
#> 
#> $common_sigma_square
#> [1] 0.6666667
#> 
#> $correlation
#> [1] 0.5
#>