Description Usage Arguments Value
View source: R/logisticRegression.R
This function takes in the output of generateData
(see parameter data for
specifics) and sets it up for logistic regression by mutating the dataframe
so reward and transition refer to the last trial's reward and transition type
and the stay column means that the (first) action on trial n is equal to the
(first) action on trial n = 1. This function gets called in
getLogFit
and getLogPreds
as needed.
1 |
data |
The output of |
A dataframe with 23 columns. New ones include lastAction1
(numeric) that tracks the action taken in the previous trial,
lastReward
that tracks whether the last trial was rewarded,
(numeric), and stay
(factor) which tracks whether trial n and n+1
have the same first action.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.