This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// contest model | |
data{ | |
int N_choices; // amount of data points | |
int N_items; // unique stimuli | |
int N_raters; // unique raters | |
int y[N_choices]; // outcome | |
int item1[N_choices]; // which stimulus 1 in each trials | |
int item2[N_choices]; // which stimulus 2 in each trials | |
int rater[N_choices]; // which rater in each trials | |
real Period[N_items]; // item feature: period |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# TO DO: ADJUST TO OTHER PARAMETERS (E:G: WHAT IF THERE ARE STIMULUS EFFECTS? OR MORE FIX EFFS?) | |
createNewData <- function (J,K,model){ | |
# J is the number of subjects | |
# K is the number of visits | |
# HP is the hyperparameter matrix from get Hyperparam | |
# TO DO: LOOP THROUGH ALL FE ROWS AND AUTOMATICALLY EXTRACT NAMES OF FIXED EFFECTS AND ESTIMATES | |
fe <- fixef(model) | |
Intercept <- fe[1] #intercept | |
bVisit <- fe[2] #visit | |
bDiagnosis <- fe[3] #diagnosis |
NewerOlder