|
@@ -6,49 +6,49 @@ real recs_priors_lpmf(array[] int children,
|
|
|
array [] real age,
|
|
|
matrix truth_vocs,
|
|
|
vector mu_pop_level,
|
|
|
+ real mu_adu,
|
|
|
matrix mu_child_level,
|
|
|
vector alpha_child_level,
|
|
|
real extra_chi_sd,
|
|
|
vector child_dev_age,
|
|
|
real beta_dev,
|
|
|
- real beta_direct,
|
|
|
- real beta_mal_fem
|
|
|
+ real beta_direct
|
|
|
) {
|
|
|
real ll = 0;
|
|
|
|
|
|
for (k in start:end) {
|
|
|
- real expected_adu_input = mu_child_level[children[k-start+1],2]*exp((truth_vocs[k,4]/1000/recs_duration/mu_pop_level[4]-1)*beta_mal_fem/10.0) + mu_child_level[children[k-start+1],3];
|
|
|
+ real expected_adu_input = mu_child_level[children[k-start+1],2] + mu_child_level[children[k-start+1],3];
|
|
|
real chi_mu = mu_pop_level[1]*exp(
|
|
|
(child_dev_age[children[k-start+1]])*age[k]/12.0
|
|
|
- +(expected_adu_input/(mu_pop_level[3]+mu_pop_level[4])-1.0)*(beta_dev*age[k]/12.0/10.0)
|
|
|
- +(((truth_vocs[k,3]+truth_vocs[k,4])/1000/recs_duration)/expected_adu_input-1.0)*(beta_direct/10.0)
|
|
|
+ +((expected_adu_input-mu_adu)/mu_adu)*(beta_dev*age[k]/12.0/10.0)
|
|
|
+ +(((truth_vocs[k,3]+truth_vocs[k,4]-expected_adu_input)/1000/recs_duration)/expected_adu_input)*(beta_direct/10.0)
|
|
|
);
|
|
|
|
|
|
// gamma with fixed mean (chi_mu) and sd (chi_mu/alpha_child_level[1] + extra_chi_sd)
|
|
|
//real b = chi_mu/(square(chi_mu)/alpha_child_level[1]+square(extra_chi_sd));
|
|
|
- real b = chi_mu/(square(chi_mu)/alpha_child_level[1]);
|
|
|
- real a = chi_mu*b;
|
|
|
- ll += gamma_lpdf(truth_vocs[k,1]/1000/recs_duration | a, b);
|
|
|
+ // real b = chi_mu/(square(chi_mu)/alpha_child_level[1]);
|
|
|
+ // real a = chi_mu*b;
|
|
|
+ ll += gamma_lpdf(truth_vocs[k,1]/1000/recs_duration | alpha_child_level[1], alpha_child_level[1]/chi_mu);
|
|
|
|
|
|
// lognormal with fixed mean (chi_mu) and sd (chi_mu/alpha_child_level[1] + extra_chi_sd)
|
|
|
//real mu = log(square(chi_mu)/sqrt(square(chi_mu)*(1+1.0/alpha_child_level[1])+square(extra_chi_sd)));
|
|
|
//real sigma = log(1+1/alpha_child_level[1]+square(extra_chi_sd/chi_mu));
|
|
|
//ll += lognormal_lpdf(truth_vocs[k,1]/1000/recs_duration | mu, sigma);
|
|
|
|
|
|
- // OCH
|
|
|
+ // Other speakers
|
|
|
ll += gamma_lpdf(
|
|
|
- truth_vocs[k,2]/1000/recs_duration | alpha_child_level[2], alpha_child_level[2]/mu_child_level[children[k-start+1],1]
|
|
|
+ truth_vocs[k,2:]/1000/recs_duration | alpha_child_level[2:], alpha_child_level[2:]./mu_child_level[children[k-start+1],2:]' //'
|
|
|
);
|
|
|
|
|
|
- // FEM
|
|
|
- ll += gamma_lpdf(
|
|
|
- truth_vocs[k,3]/1000/recs_duration | alpha_child_level[3], alpha_child_level[3]/(mu_child_level[children[k-start+1],2]*exp((truth_vocs[k,4]/1000/recs_duration/mu_pop_level[4]-1)*beta_mal_fem/10.0))
|
|
|
- );
|
|
|
+ // // FEM
|
|
|
+ // ll += gamma_lpdf(
|
|
|
+ // truth_vocs[k,3]/1000/recs_duration | alpha_child_level[3], alpha_child_level[3]/(mu_child_level[children[k-start+1],2]
|
|
|
+ // );
|
|
|
|
|
|
- // MAL
|
|
|
- ll += gamma_lpdf(
|
|
|
- truth_vocs[k,4]/1000/recs_duration | alpha_child_level[4], alpha_child_level[4]/mu_child_level[children[k-start+1],3]
|
|
|
- );
|
|
|
+ // // MAL
|
|
|
+ // ll += gamma_lpdf(
|
|
|
+ // truth_vocs[k,4]/1000/recs_duration | alpha_child_level[4], alpha_child_level[4]/mu_child_level[children[k-start+1],3]
|
|
|
+ // );
|
|
|
}
|
|
|
|
|
|
return ll;
|