Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update data sets #94

Merged
merged 3 commits into from
Feb 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
to zero for scaling and as of now cannot be predicted by independent variables because the model would be unidentifiable.
* the arguments used to fit the bmm model are now accessible in the `bmmfit` object via the `fit$bmm_fit_args` list.
* add class('bmmfit') to the object returned from fit_model() allowing for more flexible postprocessing of the underlying `brmsfit` object. The object is now of class('bmmfit', 'brmsfit')
* changes to column names of datasets `ZhangLuck_2008` and `OberauerLin_2017` to make them more consistent

### Bug Fixes
* an error with the treatment of distances in the `IMMfull` and the `IMMbsc` has been corrected. This versions ensures that only positive distances can be passed to any of the two models.
Expand Down
25 changes: 11 additions & 14 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
#' \item{subID}{Integer uniquely identifying different subjects}
#' \item{trial}{Trial identifyier}
#' \item{setsize}{The setsize of the data in this row}
#' \item{RespErr}{The response error, that is the difference between the reponse
#' given and the target color.}
#' \item{Pos_Lure1, Pos_Lure2, Pos_Lure3, Pos_Lure4, Pos_Lure5}{Position of the lure items relative to the target color.}
#' \item{response_error}{The response error, that is the difference between the response
#' given and the target color in radians.}
#' \item{col_lure1, col_Lure2, col_Lure3, col_Lure4, col_Lure5}{Color value of the lure items coded relative to the target color.}
#'
#' }
#'
Expand All @@ -25,19 +25,16 @@
#' with set size 1 to 8 reported by Oberauer & Lin (2017).
#'
#' @format ## `OberauerLin_2017`
#' A data frame with 4,000 rows and 9 columns:
#' A data frame with 15,200 rows and 39 columns:
#' \describe{
#' \item{ID}{Integer uniquely identifying different subjects}
#' \item{Session}{Session number}
#' \item{Trial}{Trial number within each session}
#' \item{SetSize}{The setsize of the data in this row}
#' \item{Response}{The response in degrees given on the color wheel}
#' \item{deviation}{The response error or deviation of the `Response` from the target color (i.e., `Item1_Col`) in degrees.}
#' \item{dev_rad}{The response error converted from degrees to radians.}
#' \item{Item1_Col,Item2_Col,Item3_Col,Item4_Col,Item5_Col,Item6_Col,Item7_Col,Item8_Col}{The absolute colors of all items in degrees of the color wheel. Although there are always eight values given even for set sizes smaller than 8, only the colors from item 1 to the respective set size were shown.}
#' \item{Item1_Pos,Item2_Pos,Item3_Pos,Item4_Pos,Item5_Pos,Item6_Pos,Item7_Pos,Item8_Pos}{The position of all items in clockwise order around the circle. There were 12 possible positions, thus each position was 30 degrees apart from each other. Although positions are always given for all items, only item 1 to the respective set size was shown.}
#' \item{Item1_Col_rad,Item2_Col_rad,Item3_Col_rad,Item4_Col_rad,Item5_Col_rad,Item6_Col,Item7_Col_rad,Item8_Col_rad}{The relative position of colors to the target item (i.e. `Item1_Col`) of all items in radians. Although there are always eight values given even for set sizes smaller than 8, only the colors from item 1 to the respective set size were shown.}
#' \item{Item1_Pos_rad,Item2_Pos_rad,Item3_Pos_rad,Item4_Pos_rad,Item5_Pos_rad,Item6_Pos,Item7_Pos_rad,Item8_Pos_rad}{The relative position of all items to the position of the target item (i.e. `Item1_Pos`) in radians. Although there are always eight values given even for set sizes smaller than 8, only the colors from item 1 to the respective set size were shown.}
#' \item{session}{Session number}
#' \item{trial}{Trial number within each session}
#' \item{set_size}{The setsize of the data in this row}
#' \item{dev_rad}{The response error, that is the difference between the response
#' given and the target color in radians.}
#' \item{col_nt1,col_nt2,col_nt3,col_nt4,col_nt5,col_nt6_Col,col_nt7}{The non-target items' color value relative to the target.}
#' \item{dist_nt1,dist_nt2,dist_nt3,dist_nt4,dist_nt5,dist_nt6_Pos,dist_nt7,dist_nt8}{The spatial distance between all non-target items and the target item in radians.}
#'
#' }
#'
Expand Down
14 changes: 7 additions & 7 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,15 @@ and and in depth explanation of the parameters estimated in the model, please
have a look at `vignette("IMM")`.

``` r
model_formula <- bmmformula(c ~ 0 + SetSize,
a ~ 0 + SetSize,
s ~ 0 + SetSize,
kappa ~ 0 + SetSize)
model_formula <- bmmformula(c ~ 0 + set_size,
a ~ 0 + set_size,
s ~ 0 + set_size,
kappa ~ 0 + set_size)

model <- IMMfull(resp_err = "dev_rad",
nt_features = paste0("Item",2:8,"_Col"),
nt_distances = paste0("Item",2:8,"_Pos"),
setsize = "SetSize")
nt_features = paste0("col_nt", 1:7),
nt_distances = paste0("dist_nt",1:7),
setsize = "set_size")

fit <- fit_model(
formula = model_formula,
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,15 +200,15 @@ description of this model and and in depth explanation of the parameters
estimated in the model, please have a look at `vignette("IMM")`.

``` r
model_formula <- bmmformula(c ~ 0 + SetSize,
a ~ 0 + SetSize,
s ~ 0 + SetSize,
kappa ~ 0 + SetSize)
model_formula <- bmmformula(c ~ 0 + set_size,
a ~ 0 + set_size,
s ~ 0 + set_size,
kappa ~ 0 + set_size)

model <- IMMfull(resp_err = "dev_rad",
nt_features = paste0("Item",2:8,"_Col"),
nt_distances = paste0("Item",2:8,"_Pos"),
setsize = "SetSize")
nt_features = paste0("col_nt", 1:7),
nt_distances = paste0("dist_nt",1:7),
setsize = "set_size")

fit <- fit_model(
formula = model_formula,
Expand Down
Binary file modified data/OberauerLin_2017.rda
Binary file not shown.
Binary file modified data/ZhangLuck_2008.rda
Binary file not shown.
19 changes: 8 additions & 11 deletions man/OberauerLin_2017.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions man/ZhangLuck_2008.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified man/figures/README-unnamed-chunk-4-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.