TEfits | R Documentation |
Data is described, interpreted, and tested using indices such as d prime, mean, or psychometric function threshold. This package serves to allow the same questions to be asked about time-evolving aspects of these indices, namely, the starting level, the amount of time that the index takes to change, and the asymptotic level of that index. Nonlinear regression applied to time-evolving functions is made as intuitive and painless as is feasible, with many extensions if desired.
There are three broad approaches to parametric model fitting in TEfits
(i.e.,
fitting a curve to change over time, such as a learning curve). The first, recommended,
approach uses the nonlinear functionality of the brms
package for Bayesian
modeling with Stan. The second approach uses base R likelihood-optimization, and minimizes
dependencies. The third approach uses a stepwise approach and the lme4
framework.
There is a last approach that, rather than fitting a parametric curve to change over time,
uses basis functions over the dimension of time (e.g., trial number)
to approximate arbitrary fluctuations. This can be a powerful way of controlling for
unknown variations over time, as well as recovering those timecourses. The implementation
is a straightforward augmentation of standard mixed-effects models; see time_basisFun_mem
and vignette('mem_basis_vignette',package='TEfits')
.
The TEbrm
function is the recommended user-oriented function of the
TEfits
package. This function, and its associated helper functions, automates
the parameterization of nonlinear time-evolving models. Apart from this, it is largely
simply a wrapper for brm
. Each nonlinear parameter of change is defined
within its own [possibly generalized or mixed-effects] linear model. See TEbrm
for examples.
The TEfit
function is the associated user-oriented function.
It allows for nonlinear fitting of time-related
change in an outcome variable by estimating that outcome variable's value at
each timepoint. See TEfit
, TEfitAll
for fitting
a TEfit
model to subsets of data (e.g., individual participants),
and vignette('TEfits_tutorial')
for an introduction to the framework.
While TEfit
and TEbrm
are intended to interrogate time-evolving trends
themselves within data, TEfits
also includes several extensions to common
regression functions that allow for seamless incorporation of a nonlinear
[exponentially saturating] variable of time. These functions approach time-evolving
dynamics from a common perspective in behavioral research: Behavior "of interest"
occurs after transient initial bias in performance (e.g., initial task learning needs to
occur before the target behavior can be effectively measured). The following functions use a
stepwise method to first estimate the rate of change in the outcome variable, then use these rates to
transform the variable of time into a saturating interpolation between 1 [starting offset] and 0
[asymptotic level], and finally include the time variable in the corresponding
[g
]lm
[er
] model:
TElm
wraps this method for lm
TEglm
wraps this method for glm
TElmem
wraps this method for lmer
TEglmem
wraps this method for glmer
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.