-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fe99333
commit b4d3cec
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
data { | ||
int<lower=0> N; //número de calificaciones | ||
int<lower=0> n_vinos; //número de vinos | ||
int<lower=0> n_jueces; //número de jueces | ||
vector[N] S; | ||
array[N] int juez; | ||
array[N] int vino; | ||
} | ||
|
||
parameters { | ||
vector[n_vinos] Q; | ||
real <lower=0> sigma; | ||
} | ||
|
||
transformed parameters { | ||
vector[N] media_score; | ||
// determinístico dado parámetros | ||
for (i in 1:N){ | ||
media_score[i] = Q[vino[i]]; | ||
} | ||
} | ||
|
||
model { | ||
// partes no determinísticas | ||
S ~ normal(media_score, sigma); | ||
Q ~ std_normal(); | ||
sigma ~ exponential(1); | ||
} |