forked from anne-urai/2019_Urai_choice-history-ddm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make_stopos_file.m
48 lines (39 loc) · 1.25 KB
/
make_stopos_file.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
function [] = make_stopos_file()
% Code to fit the history-dependent drift diffusion models as described in
% Urai AE, de Gee JW, Tsetsos K, Donner TH (2019) Choice history biases subsequent evidence accumulation. eLife, in press.
%
% MIT License
% Copyright (c) Anne Urai, 2019
% anne.urai@gmail.com
% ============================================ #
% parameter file for HDDM
% ============================================ #s
nsmp = [5000];
datasets = [0]; % dataset number, 0-5 for all main ones
models = [6]; % the nr of the models
nrTraces = 30; % nr of chains, 15 cores/node (so make sure this is a multiple of 15)
alldat = [];
for n = nsmp,
for b = models,
for a = datasets,
for c = 0:nrTraces-1, % put all chains of same model together on a node
alldat = [alldat; a b c n];
end
end
end
end
% write to a file
dlmwrite('hddmparams', alldat, 'delimiter', ' ');
%size(alldat)
fprintf('to submit all these jobs, need an array of %d jobs \n', length(datasets)*length(models)*2);
% PPC
alldat = [];
for a = datasets,
for v = models,
alldat = [alldat; a v];
end
end
% write to a file
dlmwrite('hddmparams_PPC', alldat, 'delimiter', ' ');
% size(alldat)
%% for PPC & chiSquare