fit_dd | R Documentation |
This function fits a delay-discounting model to the given dataset using the specified equation and method.
fit_dd(dat, equation, method)
dat |
A data frame containing delay ( |
equation |
A character string specifying the delay-discounting equation to use. Options include:
|
method |
A character string specifying the method for fitting the model. Options include:
|
A list object of class "fit_dd"
, containing:
The fitted model(s).
The original dataset (dat
).
The specified method (method
).
data <- data.frame(
id = rep(1:2, each = 6),
x = rep(c(1, 7, 30, 90, 180, 365), 2),
y = c(0.9, 0.5, 0.3, 0.2, 0.1, 0.05, 0.85, 0.55, 0.35, 0.15, 0.1, 0.05)
)
fit_dd(data, equation = "mazur", method = "two stage")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.