Skip to contents

A very simple method is used here, i.e., averaging all the levels in the last block.

Usage

staircase(data, .by = NULL, .input = NULL, .extra = NULL)

Arguments

data

Raw data of class data.frame.

.by

The column name(s) in data used to be grouped by. If set to NULL (default), all data will be treated as from one subject and there will be no grouping columns in the value returned.

.input, .extra

Each is a list() containing all the input variable names and special values for certain variables. See more in the details section.

Value

An object with the same class as data contains following values:

thresh_peak_valley

The mean threshold of peaks and valleys.

thresh_last_block

The mean threshold of the last block.

Details

This is under the assumption that the last block is stable enough so that an average of the levels is just the convergence of the threshold.