Description Usage Arguments Details
View source: R/shouldISwitch.R
Take the decission of whether to set-up a contingency reversal based on the history of key presses.
1 2 | shouldISwitch(data, alpha = 0.05, consecutive_days = 5, quota = 30,
...)
|
data |
Dataframe to analyze. |
alpha |
Alpha level for stablishing a significant preference. |
consecutive_days |
Number of consecutive days when preference for a song must be significant. |
quota |
Quota of playbacks per day. |
... |
Arguments passed to filterByLastPb. |
the function extracts the last 'consecutive_days' rows of 'data' and for each day runs a permutation test to test whether the number of presses for one key was significantly larger than for the other. If the number of presses was significantly higher for one of the keys during the 'consecutive_days', then a reversal is recommended.
In some reinforcement schedules, reversals are recommended only once. Check with your reinforcement schedule to do a reversal before accepting the recommendation given by this function.
The function will exit prematurely if the quota of playbacks for any song has not been reached in any of the days analyzed.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.