Suggest Kernel Bandwidth for Density Estimation
suggest_sigma.RdEstimates a reasonable kernel bandwidth (sigma) for fixation density maps using a 2D variant of Silverman's rule of thumb, adapted for eye-tracking data. The estimate accounts for spatial spread of fixations and sample size.
Arguments
- x
A
fixation_groupobject, or a numeric vector of x-coordinates.- y
A numeric vector of y-coordinates (only used when
xis not afixation_group).- xbounds
Optional numeric vector of length 2 for the x-axis display bounds. Used to scale the estimate relative to display size.
- ybounds
Optional numeric vector of length 2 for the y-axis display bounds. Used to scale the estimate relative to display size.
Value
A single numeric value representing the suggested sigma (kernel standard deviation in coordinate units).