get_slope_by_group: Calculate slopes by groups

Description Usage Arguments Value See Also Examples

View source: R/orthogonal.R

Description

Calculate slopes by groups

Usage

1

Arguments

d

wide,dataframe containing the

group

name of column

x, y

names of column in d containing the dependent and independent variables

Value

a dataframe with two columns, one containing the group id and one containing the estimated slope for that group

See Also

get_slope(), cross_threshold()

Examples

1
2
3
4
5
6
7
8
sub02 |>
  tidyr::pivot_wider(names_from = contrast, values_from = y) |>
  get_slope_by_group(voxel, low, high)

# create group with intersection of variables
sub02 |>
  tidyr::pivot_wider(names_from = contrast, values_from = y) |>
  get_slope_by_group(c(voxel, sub), low, high)

psadil/nmmr documentation built on June 13, 2021, 11:42 a.m.