plot_sim_vs_recovered: Plot simulated pupil data against recovered weights.

View source: R/pupil_sim_helpers.R

plot_sim_vs_recoveredR Documentation

Plot simulated pupil data against recovered weights.

Description

Only works for model setup like the one by Wierda et al. (2012).

Usage

plot_sim_vs_recovered(
  n_sub,
  aggr_dat,
  sim_obj,
  recovered_coef,
  pulse_locations,
  real_locations,
  pulses_in_time,
  expanded_time,
  expanded_by,
  f_est = 1/(10^24),
  scaling_factor = 1,
  se = NULL,
  plot_avg = T
)

Arguments

n_sub

How many subjects were simulate.

aggr_dat

Aggregated simulation data

sim_obj

The list returned by additive_pupil_sim

recovered_coef

The coefficients returned by papss:pupil_solve()

pulse_locations

The index vector pointing at pulse locations passed to papss::pupil_solve()

real_locations

The vector with the time-points at which pulses are assumed passed to papss::pupil_solve()

pulses_in_time

Boolean vector indicating which pulse was within the time-window. Returned by papss::pupil_solve()

expanded_time

The expanded time series returned by papss:pupil_solve()

expanded_by

Expansion time in ms passed to papss::pupil_solve(expand_by=) divided by sample length in ms

f_est

f parameter value

scaling_factor

A scaling factor to scale up or down the demand signal

se

NULL or list with standard errors recovered for each subject

plot_avg

Whether to plot average or not


JoKra1/papss documentation built on June 15, 2022, 8:57 a.m.