diff --git a/NEWS.md b/NEWS.md index ef69be90..e0b8abcd 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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. diff --git a/R/data.R b/R/data.R index fa642885..1fd4a56d 100644 --- a/R/data.R +++ b/R/data.R @@ -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.} #' #' } #' @@ -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.} #' #' } #' diff --git a/README.Rmd b/README.Rmd index a1ee9dbf..b0b90f06 100644 --- a/README.Rmd +++ b/README.Rmd @@ -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, diff --git a/README.md b/README.md index c64fce66..4c89adab 100644 --- a/README.md +++ b/README.md @@ -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, diff --git a/data/OberauerLin_2017.rda b/data/OberauerLin_2017.rda index 3b3e4c13..8f74fe15 100644 Binary files a/data/OberauerLin_2017.rda and b/data/OberauerLin_2017.rda differ diff --git a/data/ZhangLuck_2008.rda b/data/ZhangLuck_2008.rda index ae142ad5..f1b717bf 100644 Binary files a/data/ZhangLuck_2008.rda and b/data/ZhangLuck_2008.rda differ diff --git a/man/OberauerLin_2017.Rd b/man/OberauerLin_2017.Rd index 7d5ac035..8b9e0d7a 100644 --- a/man/OberauerLin_2017.Rd +++ b/man/OberauerLin_2017.Rd @@ -7,19 +7,16 @@ \format{ \subsection{\code{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 \code{Response} from the target color (i.e., \code{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. \code{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. \code{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.} } } diff --git a/man/ZhangLuck_2008.Rd b/man/ZhangLuck_2008.Rd index 80a6158c..aba4760a 100644 --- a/man/ZhangLuck_2008.Rd +++ b/man/ZhangLuck_2008.Rd @@ -12,9 +12,9 @@ A data frame with 4,000 rows and 9 columns: \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.} } } diff --git a/man/figures/README-unnamed-chunk-4-1.png b/man/figures/README-unnamed-chunk-4-1.png index fe774bc0..44f9f47f 100644 Binary files a/man/figures/README-unnamed-chunk-4-1.png and b/man/figures/README-unnamed-chunk-4-1.png differ