The CBS package uses a smooth monotonic function to approximate latent utility functions in intertemporal choice and risky choice data. The goal is to build an agnostic model of delay discounting and risky choice that can predict better than parametric utility models but still provide interpretable insights.
Citation: Lee, S., Glaze, C. M., Bradlow, E. T., & Kable, J. W. (2020). Flexible Utility Function Approximation via Cubic Bezier Splines. Psychometrika, 1-22.
The T-PLS package is useful for building a linear predictor when the number of features are large (~millions), have high spatial correlation, and hugely outnumber the number of observations. T-PLS offers extremely efficient computation time due to its ‘fit-once-tune-later’ approach : unlike modern models that are fit multiple times to test different tuning parameters, TPLS only needs to be fit once and allows for post-hoc choosing of tuning parameters.
This package fits parametric utility models for delay discounting choice data and risky choice data to estimate utility function parameters such as the discount rate, risk-aversion, etc. Currently only supported in MATLAB, porting to other language in works.
Link: [MATLAB]
In our 2022 PNAS paper, "we construct a neural signature of the vividness of prospective thought, using an fMRI dataset where the vividness of imagined future events is orthogonal to their valence by design. Then, we apply this neural signature in two additional fMRI datasets, each using a different delay-discounting task, to show that neural measures of vividness decline as rewards are delayed farther into the future"
The predictors are created using fmriprep's 2mm template MNI152NLin2009cAsym. Since most voxels have zero weight, I recommend resampling your brain images into this template and applying the predictor via dot product as opposed to resampling the predictor into the template you're working in. Feel free to reach out for help if needed.
Link: [Vividness predictor] [Valence predictor] [MNI152NLin2009cAsym]
A simple function that reads text file generated from eprime and converts it into a cell array in matlab. Useful if you have many eprime files that you want to batch process.
Link: [MATLAB]
This is a patch of GLMNET for MATLAB (original source code here:https://web.stanford.edu/~hastie/glmnet_matlab/). The original code was not updated for a while, and as a result, the API for mex function connecting the FORTRAN code to matlab was outdated. This made it impossible to load and use large arrays, which are only supported in 64-bit mex API for FORTRAN. So I've updated the source FORTRAN code to 64-bit API.
Link: [MATLAB]
This function adds an additional feature to MATLAB's ridge: speeding up computations when the matrix is wide. Usage is the same as MATLAB's default ridge function. The function checks the dimension of X to automatically decide whether to use MATLAB's algorithm, which is adding pseudo observations, or to use the new algorithm, which is based on the following equality:
(X'X + kI)\X' = X'/(XX' + kI)
Link: [MATLAB]