Hi,
I am interested if there is a list of all valid PDFs implemented in Stan. Ideally this list would be available in R via some package.
If useful, the use case I have is that I am writing a function which takes a string as input (here family
) and alters the Stan function below using regex to replace the text family
with the specified PDF.
real latent_family_lpdf(vector y, vector mu, vector sigma, vector pwindow,
vector swindow, array[] real obs_t) {
int n = num_elements(y);
vector[n] d = y - pwindow + swindow;
vector[n] obs_time = to_vector(obs_t) - pwindow;
return family_lpdf(d | mu, sigma) - family_lcdf(obs_time | mu, sigma);
}
I’d like to add a check that the string provided is in fact a valid PDF. (This is all then passed into brms
). I think it would be nice to do this, but I imagine Stan might complain in a somewhat obvious way later down the line if the string provided isn’t a valid PDF, so it might not be too hard for a user to figure out the issue.
Let me know if anyone has any ideas, or if it’s unclear what I mean / I could be more specific.
Thanks!
Adam