Fit Linearized Hyperbolic Model for Delay Discounting Curves

Functions for estimating parameters and hyperparameters of the linearized hyperbolic model, and testing equality of hyperparameters.


delaydiscount

The goal of the delaydiscount package is to provide methods for analyzing delay discounting data using the linearized hyperbolic model.

Installation

You can install the development version of delaydiscount from Github.

# install.packages("devtools")
devtools::install_git("https://github.com/davideh-vt/delaydiscount")

Example

To fit a model on a dataset of delay discounting data, first run prepare_data_frame on the dataset, then run dd_hyperbolic_model on the output.

library(delaydiscount)
## basic example of fitting a model
prep_remedi <- prepare_data_frame(remedi)
fit <- dd_hyperbolic_model(prep_remedi)
fit$ln_k_mean
#>     condition ln_k_mean   std_err
#> EFT       EFT -6.877057 0.1638994
#> HIT       HIT -5.860534 0.1506689
#> NCC       NCC -6.078229 0.1369001
fit$var
#>  sigma_sq         g 
#>  1.978107 10.407330

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("delaydiscount")

0.0.1 by David Hinds, 6 months ago


https://github.com/davideh-vt/delaydiscount, https://davideh-vt.github.io/delaydiscount/


Report a bug at https://github.com/davideh-vt/delaydiscount/issues


Browse source code at https://github.com/cran/delaydiscount


Authors: David Hinds [aut, cre] , Marco Ferreira [aut] , Allison Tegge [ctb] , Jeff Stein [ctb]


Documentation:   PDF Manual  


GPL-3 license


Imports dplyr, magrittr, rlang

Suggests knitr, rmarkdown, testthat


See at CRAN