tef_mono_expo: Create an integer vector coding a saturating function of time

View source: R/tef_mono_expo.R

tef_mono_expoR Documentation

Create an integer vector coding a saturating function of time

Description

Create an integer vector coding a saturating function of time

Usage

tef_mono_expo(N, style = "increasing")

Arguments

N

Number of time values

style

Should the integer "blocks" be saturating (increasing in length) ("increasing") or equal in size ("equal")

Examples

## Not run: 
# # Make a temporary data set
d_tmp <- anstrain_s1

# # Get an integer-coded time variable
d_tmp$trialNum_mono <- tef_mono_expo(nrow(d_tmp))

# # Look at the new coding of time
plot(d_tmp$trialNum,d_tmp$trialNum_mono)

# # Fit a model predicting accuracy using a monotonic measure of time; see documentation for brms::mo
library(brms)
m <- brm(acc ~ mo(trialNum_mono), d_tmp)

## End(Not run)

akcochrane/TEfits documentation built on June 12, 2025, 11:10 a.m.