Skip to content

Commit

Permalink
new dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
bnicenboim committed Sep 9, 2021
1 parent 352b4ef commit 8822dd1
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 2 deletions.
18 changes: 18 additions & 0 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -1342,3 +1342,21 @@
#' @references
#' \insertAllCited{}
"df_VMJG18E7"



#' Data from a simple visual tracking experiment for schizophrenic patients and controls from \insertCite{belin1990analysis;textual}{bcogsci}
#'
#' Reaction times (in milliseconds) for 11 non-schizophrenics and 6
#' schizophrenics (30 measurements for each person) doing a simple visual tracking experiment from \insertCite{belin1990analysis;textual}{bcogsci}.
#'
#' @format A data frame with 372 rows and 4 variables:
#' \describe{
#' \item{subj}{The subject id.}
#' \item{trial}{Trial number}
#' \item{patient}{Indicates whether the it is a schizophrenic patient (1) or not (0).}
#' \item{rt}{Reaction times in milliseconds.}
#' }
#' @references
#' \insertAllCited{}
"df_schizophrenia"
6 changes: 5 additions & 1 deletion data-raw/data_local.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,8 @@ df_gg05_rc <- df_gg05_complete %>%

df_fallacy <- read.csv("data-raw/datasets/conj_fallacy.csv", header = TRUE) %>% as_tibble()

usethis::use_data(df_spacebar, df_contrasts1, df_contrasts2, df_contrasts3, df_contrasts4, df_contrasts5, df_contrasts6, df_contrasts7, df_BF, df_gg05_complete, df_gg05_rc, df_fallacy, overwrite = TRUE)
df_schizophrenia <- read.csv("data-raw/datasets/BelinRubin1990.csv") %>%
tidyr::pivot_longer(cols = starts_with("rt"), names_to = "trial", values_to = "rt") %>%
mutate(trial = stringr::str_remove(trial, "rt_"))

usethis::use_data(df_spacebar, df_contrasts1, df_contrasts2, df_contrasts3, df_contrasts4, df_contrasts5, df_contrasts6, df_contrasts7, df_BF, df_gg05_complete, df_gg05_rc, df_fallacy, df_schizophrenia, overwrite = TRUE)
18 changes: 18 additions & 0 deletions data-raw/datasets/BelinRubin1990.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
patient,subj,rt_1,rt_2,rt_3,rt_4,rt_5,rt_6,rt_7,rt_8,rt_9,rt_10,rt_11,rt_12,rt_13,rt_14,rt_15,rt_16,rt_17,rt_18,rt_19,rt_20,rt_21,rt_22,rt_23,rt_24,rt_25,rt_26,rt_27,rt_28,rt_29,rt_30
0,1,312,272,350,286,268,328,298,356,292,308,296,372,396,402,280,330,254,282,350,328,332,308,292,258,340,242,306,328,294,272
0,2,354,346,384,342,302,312,322,376,306,402,320,298,308,414,304,422,388,422,426,338,332,426,478,372,392,374,430,388,354,368
0,3,256,284,320,274,324,268,370,430,314,312,362,256,342,388,302,366,298,396,274,226,328,274,258,220,236,272,322,284,274,356
0,4,260,294,306,292,264,290,272,268,344,362,330,280,354,320,334,276,418,288,338,350,350,324,286,322,280,256,218,256,220,356
0,5,204,272,250,260,314,308,246,236,208,268,272,264,308,236,238,350,272,252,252,236,306,238,350,206,260,280,274,318,268,210
0,6,590,312,286,310,778,364,318,316,316,298,344,262,274,330,312,310,376,326,346,334,282,292,282,300,290,302,300,306,294,444
0,7,308,364,374,278,366,310,358,380,294,334,302,250,542,340,352,322,372,348,460,322,374,370,334,360,318,356,338,346,462,510
0,8,244,240,278,262,266,254,240,244,226,266,294,250,284,260,418,280,294,216,308,324,264,232,294,236,226,234,274,258,208,380
0,9,232,262,230,222,210,284,232,228,264,246,264,316,260,266,304,268,384,234,308,266,294,254,222,262,278,290,208,232,206,206
0,10,318,324,282,364,286,342,306,302,280,306,256,334,332,336,360,344,480,310,336,314,392,284,292,280,320,322,286,406,352,324
0,11,240,292,350,254,396,430,260,320,298,312,290,248,276,364,318,434,400,382,318,298,298,248,250,234,280,306,282,234,424,244
1,12,276,272,264,258,278,286,314,340,334,364,286,344,312,380,262,324,310,260,280,262,364,316,270,286,326,302,300,302,344,290
1,13,374,466,432,376,360,454,478,382,524,410,520,470,514,354,434,380,416,384,462,386,404,362,420,360,390,356,550,372,386,396
1,14,594,1014,1586,1344,610,838,772,264,748,1076,446,314,304,1680,1700,334,256,422,302,296,354,322,276,382,502,428,544,286,650,432
1,15,402,466,296,348,680,702,500,500,576,624,406,378,586,826,298,882,564,656,716,380,448,506,1714,748,510,810,984,458,390,642
1,16,620,714,414,358,460,598,324,442,372,410,998,636,968,490,696,560,562,720,618,456,502,974,1032,470,462,798,716,300,586,574
1,17,454,388,344,226,562,766,502,432,608,516,500,796,542,458,448,404,372,524,400,366,374,350,1154,558,440,348,400,460,514,450
Binary file added data/df_schizophrenia.rda
Binary file not shown.
7 changes: 7 additions & 0 deletions inst/REFERENCES.bib
Original file line number Diff line number Diff line change
Expand Up @@ -437,3 +437,10 @@ @article{wickelmaier2018using
year={2018},
publisher={Springer}
}
@inproceedings{belin1990analysis,
title={Analysis of a finite mixture model with variance components},
author={Belin, TR and Rubin, DB},
booktitle={Proceedings of the Social Statistics Section},
pages={211--215},
year={1990}
}
2 changes: 1 addition & 1 deletion inst/stan_models/hierarchical_corr2.stan
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ generated quantities {
corr_matrix[2] rho_u= L_u * L_u';
vector[N_subj] effect_by_subj;
for(i in 1:N_subj)
effect_by_subj[i] = beta + u[i,2];
effect_by_subj[i] = beta + u[i, 2];
}

0 comments on commit 8822dd1

Please sign in to comment.