-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstan.snippets
69 lines (46 loc) · 985 Bytes
/
stan.snippets
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
snippet tpl "basic template" b
data {
}
parameters {
}
model {
}
endsnippet
snippet fun "functions block" b
functions {
}
endsnippet
snippet func "functions block" b
functions {
}
endsnippet
snippet int "Integer" b
int<lower=$1> ${2:N};
endsnippet
snippet real "Real number, scalar" b
real${2:<lower=$3, upper=$4>} ${1:x};
endsnippet
snippet reala "Real number, vector" b
real ${1:x}[${2:N}];
endsnippet
snippet areal "Real number, vector" b
real ${1:x}[${2:N}];
endsnippet
snippet normal "Normal Distribution" b
${1:x} ~ normal(${2:mu}, ${3:sigma});
endsnippet
snippet normallp "Normal Distribution PDF" b
normal_lpdf(${1:y} | ${2:mu}, ${3:sigma});
endsnippet
snippet vec "Description" b
vector[${1:N}] ${2:x};
endsnippet
snippet arr "Description" b
${1:dtype} ${2:varname}[${3:size}];
endsnippet
snippet normalr "Normal Distriubiton Random" b
normal_rng(${1:mu}, ${2:sigma});
endsnippet
snippet bernr "Bernoulli Random" b
bernoulli_rng(${1:theta});
endsnippet