getLogPreds: Get the Logistic Regression Predictions

Description Usage Arguments Value

View source: R/logisticRegression.R

Description

This function takes in simulation data (see parameter data for more information) and calls the logSetup function if necessary before calling the getLogFit function to fit a logistic regression model predicting the probability of staying based on whether the last trial was rewarded or not, whether the last trial had a common or rare transition, and the interaction between the two. It then uses the predict function and binds the predictions to the original (manipulated with logSetup) dataframe.

Usage

1

Arguments

data

The data can either be the output of logSetup or the output of generateData. If the latter, make sure that manipulateData is called on pure Q-learning simulations. Similarly, for DynaQ simulations, make sure the data has been processed and the Q table has been removed.

Value

The original (modified with logSetup) data frame plus two columns predNoStay and predStay.


jdtrat/dynaq documentation built on July 24, 2020, 7:18 a.m.