knitr::opts_chunk$set( collapse = TRUE, comment = "" ) library(dplyr) library(icager) #library(kableExtra)
The presented dataset consists of choices made by sample agents performing probabilistic reversal learning task. It includes actions /visits/ performed by 3 random agents, first 10 per each of 11 experimental contingencies.
data(dx)
import()
imports all experimentals files stored in a given directory, parses on the basis on a default format and returns a list. Different settings can be provided as a list to the .list.form
argument. If the software version is known providing the .version
makes the import faster.
mydata <- icager::import(.version = 1) %>% dplyr::bind_rows()
If uncertain call ?digform
.
simple()
function call all the bare neccessities with defaults to provide easily ready to use complete dataset (import, bind, check for duplicated rows, standardise and assign contingency).
mydata <- simple()
This function help decode the data if initial software settings
are long gone. The hint()
provides help to decode markings.
hint(dx)
The specify()
gives basic description of provided dataset.
specify(dx)
The applied here experimental scheme corresponds to probabilistic reversal learning task*, in which assignment between proposed options and probabilities of access to reward are steadily reversed. An option is called a corner
and assigned to it probability of reward - reward probability (rp
). The value denotes chances of
inner doors, barring access to a bottle, to get opened. Each such assignment is a state of all the corner
s' rp
at a current moment and is refered to as contingency
. To add the contingency states, also termed as experimental phases call contingencise(data)
on a dataset. To easily visualise it call printscheme(data)
.
*It bases on the assumption that a change in value of a current corner's condition
denotes start of a new contingency. Thus it would suit any procedure with scheme changes based on corner's condition
values.
dx <- contingencise(dx)
The optionally provided metadata
argument ought to contain assignment of reward probability ?digcondition
, digcondition()
and/or hint(data)$hint
.
unique(dx$contingency)
Plase note that the division to contingencies is based solely on the actual choices so the user-set start and finish of them are unknown. They also do not neccessarilly overlap subsequent ones.
printscheme(dx)
printscheme(dx) %>% knitr::kable(format = "html") %>% kableExtra::kable_styling(bootstrap_options = c("striped", "hover", "condensed", "responsive"))
Various contingencies may belong to different categories of experimental scheme, e.x. module of adaptation consists of contingencies labelled as "0x0.9" or/and "0x0", whereas the reversals stage of "0x0.3x0.9" or/and "0.3x0.9". As each experiment varies in scheme a such assignment could not be done automatically and the specify()
function is deprecated.
The plot presents an abstract representation of experimental scheme. Numbers in boxes denote contingency duration in hours; on the x axis contingency, on y corner number.
plotit(dx)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.