hyunjimoon / DataInDM

Workflow iteration starting from 15.879
3 stars 0 forks source link

Parameter indexing in function and gq block #7

Open hyunjimoon opened 2 years ago

hyunjimoon commented 2 years ago
  1. which is better btw theta[2] vs alpha, beta? as function input argument?
  2. could we vectorize in gq block w.o. extra td block as the solution below?
    theta_tilde[1] = normal_rng(1, 0.5); //TODO U5
    theta_tilde[3] = normal_rng(1, 0.5); //TODO U5
    theta_tilde[2] = normal_rng(0.05, 0.05); //TODO U5
    theta_tilde[4] = normal_rng(0.05, 0.05); //TODO U5

    sol. suggested in here

    
    transformed data {
    int N = 10;
    vector[N] ones_N = rep_vector(1, N);
    }

generated quantities { real yrep [N] = normal_rng(ones_N 1, ones_N 10);
}