The goal of the delaydiscount package is to provide methods for analyzing delay discounting data using the linearized hyperbolic model.
You can install the development version of delaydiscount from Github.
# install.packages("devtools")
devtools::install_git("https://github.com/davideh-vt/delaydiscount")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
Need a high-speed mirror for your open-source project?
Contact our mirror admin team at info@clientvps.com.
This archive is provided as a free public service to the community.
Proudly supported by infrastructure from VPSPulse , RxServers , BuyNumber , UnitVPS , OffshoreName and secure payment technology by ArionPay.