Hello Stata,
I am using db bayesmh to run MCMC on my model. My data (y) is 440 observations (i) by 2000 variables (j). My likelihood function is the following:
where y_{i,j} is the data, x_i, alpha_j, and beta_j are all parameters to estimate (with prior normal (0,1)), and Phi is normal cumulative density function. I don't know how to write this as a substitutable expression. The difficulties for me are:
1. How do I index the y_{i,j}, x_i, alpha_j and beta_j inside the summation function sum()?
2. How do I generate the x_i, alpha_j, and beta_j using maybe a for loop instead of writing x_1, x_2, ...?
3. Is it possible for me to use a matrix presentation of those parameters, and use inner product inside the normal() function?
I am using db bayesmh to run MCMC on my model. My data (y) is 440 observations (i) by 2000 variables (j). My likelihood function is the following:
where y_{i,j} is the data, x_i, alpha_j, and beta_j are all parameters to estimate (with prior normal (0,1)), and Phi is normal cumulative density function. I don't know how to write this as a substitutable expression. The difficulties for me are:
1. How do I index the y_{i,j}, x_i, alpha_j and beta_j inside the summation function sum()?
2. How do I generate the x_i, alpha_j, and beta_j using maybe a for loop instead of writing x_1, x_2, ...?
3. Is it possible for me to use a matrix presentation of those parameters, and use inner product inside the normal() function?