Skip to contents

Estimate posterior peak latency inside a declared window

Usage

estimate_pupil_peak_latency(prediction, window, probability = 0.95)

Arguments

prediction

A pupil prediction object.

window

Prespecified event-relative time window.

probability

Credible probability.

Value

A pupil estimand with posterior uncertainty in peak latency.

Examples

grid <- data.frame(.event_time = seq(0, 1, length.out = 5))
draws <- matrix(rnorm(500), nrow = 100)
prediction <- as_pupil_prediction_draws(draws, grid, "millimetres")
estimate_pupil_peak_latency(prediction, c(0.2, 0.8))
#> <gp3bayes_pupil_estimand>
#>   Estimand: peak_latency
#>   Rows: 1
#>   Declared window: 0.2 to 0.8
#>   Automatic significance decision: FALSE