Description Usage Arguments Value See Also Examples
Get Thresholds
1 | cross_threshold(d, group, x, y, quantiles = c(0, 0.9), participant = NULL)
|
d |
wide,dataframe containing the |
group |
name of column (bare only) |
x, y |
names of column (bare or quoted) in d with which to do the regression |
quantiles |
threshold to apply. |
participant |
optional secondary grouping column. Can be used to nest thresholding (e.g., calculate the quantiles within each participant separately) |
data frame object with one column for the group
, potentially another index
column for participant
, and a new column called Threshold.
The Threshold
column is crossed with the original dataset, but for each crossing, members
of group
are excluded if they do not cross the threshold.
get_slope()
, get_slope_by_group()
1 2 3 4 5 6 7 8 | sub02 |>
tidyr::pivot_wider(names_from = contrast, values_from = y) |>
cross_threshold(voxel, low, high)
# can also calculate within groups
sub02 |>
tidyr::pivot_wider(names_from = contrast, values_from = y) |>
cross_threshold(c(voxel, run), low, high, participant = sub)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.