View source: R/tef_change_expo3.R
tef_change_expo3 | R Documentation |
By defining the model variable associated with time (e.g., trial number), and
formulas defining each of the nonlinear parameters of time-related change,
this function constructs a model that can then be passed to functions for fitting
the model (e.g., TEbrm
).
tef_change_expo3(
timeVar,
parForm = ~1,
startForm = ~1,
rateForm = ~1,
asymForm = ~1,
changeBase = 2,
rateBase = 2
)
timeVar |
String. The name of the variable in the model that corresponds to time. The variable of time should be positive and numeric, and the function of change should be expected to happen with increasing time. Extensive testing has only been done on positive integer time variables with a minimum time of 1. |
parForm |
The right-hand side of the formula defining all nonlinear parameters as well as the null [non-time-varying] model. |
startForm |
The right-hand side of the formula defining the start parameter. If anything besides |
rateForm |
The right-hand side of the formula defining the rate parameter. If anything besides |
asymForm |
The right-hand side of the formula defining the asymptote parameter. If anything besides |
changeBase |
Number. The base of the log (e.g., 2 or exp(1)) of the change function. |
rateBase |
Number. The base of the log (e.g., 2 or exp(1)) of the rate [time constant]. |
Function is under development and is likely to be buggy, and to change frequently.
TEbrm
for examples of how to use this function in specifying models.
equation_to_fit <- tef_change_expo3('timeVar',rateForm = ~ xvar1*xvar2) # both variables should be numeric for TEfit methods! TEbrm should work with factorsas well
equation_to_fit <- tef_change_expo3('timeVar'
, parForm = ~ xvar1 # overall parameter formula; overwritten for time-evolving formulas below, leaving this as just the null model
, startForm = ~ xvar2 # start parameter's regression model
, rateForm = ~ (1|participantID) # rate parameter's [mixed-effects] regression model
, asymForm = ~ xvar3 # asymptote parameter's regression model
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.