View source: R/tef_mono_expo.R
tef_mono_expo | R Documentation |
Create an integer vector coding a saturating function of time
tef_mono_expo(N, style = "increasing")
N |
Number of time values |
style |
Should the integer "blocks" be saturating (increasing in length) ("increasing") or equal in size ("equal") |
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.