shouldISwitch: Take the decission of whether to set-up a contingency...

Description Usage Arguments Details

View source: R/shouldISwitch.R

Description

Take the decission of whether to set-up a contingency reversal based on the history of key presses.

Usage

1
2
shouldISwitch(data, alpha = 0.05, consecutive_days = 5, quota = 30,
  ...)

Arguments

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.

Details

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.


crodriguez-saltos/songPreference documentation built on Sept. 16, 2019, 7:09 a.m.