53 array[]
int params_fixed_lookup,
54 array[]
int params_variable_lookup,
55 vector params_value, matrix params) {
56 int n_samples = rows(params);
58 return rep_vector(0, n_samples) ;
59 }
else if (params_fixed_lookup[
id]) {
60 return rep_vector(params_value[params_fixed_lookup[
id]], n_samples);
62 return params[, params_variable_lookup[id]];
80void params_lp(vector params, array[]
int prior_dist,
81 vector prior_dist_params, vector params_lower,
82 vector params_upper) {
84 int num_params = num_elements(params);
85 for (
id in 1:num_params) {
86 if (prior_dist[
id] == 0) {
89 prior_dist_params[params_id], prior_dist_params[params_id + 1]
91 T[params_lower[id], params_upper[id]];
93 }
else if (prior_dist[
id] == 1) {
95 gamma(prior_dist_params[params_id], prior_dist_params[params_id + 1])
96 T[params_lower[id], params_upper[id]];
98 }
else if (prior_dist[
id] == 2) {
100 normal(prior_dist_params[params_id], prior_dist_params[params_id + 1])
101 T[params_lower[id], params_upper[id]];
104 reject(
"dist must be <= 2");
void params_lp(vector params, array[] int prior_dist, vector prior_dist_params, vector params_lower, vector params_upper)
real get_param(int id, array[] int params_fixed_lookup, array[] int params_variable_lookup, vector params_value, vector params)