truncate uniform distribution by data range #137
Unanswered
dustinkincaid
asked this question in
Q&A
Replies: 1 comment
-
Try this prior: prior = list(cp_1 = "dunif(MINX + 0.15*(MAXX-MINX), MAXX - 0.2*(MAXX-MINX))") mcp has a few data-based "constants" that it makes available in the JAGS code (and hence for the priors too). I think MEDIANX, MEANX, SDX, etc. are there too. Similarly for Y, but the naming will change slightly in the upcoming v0.4 (e.g., from MEANY to MEANLINKY). You can see some of them used in the default priors: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to truncate a uniform prior for cp_1 for non-normalized data (ie, the data range is not 0 to 1) using values relative to the range of the data. Specifically, I want the min for the distribution to be min(x) + 0.15 x range and the max to be max(x) - 0.20 x range, where range = max(x) - min(x). I know how to generally truncate the prior (ie, prior = list(cp_1 = "dunif(0, 0.5)")), but I'm not sure if it's possible to pass more complex arguments to the max and min for dunif(). I can't calculate and specify the exact values ahead of time because I am using R's purrr::map2() to iterate through several datasets, so the statement needs to be able to calculate the values for each group of data. Any thoughts?
Beta Was this translation helpful? Give feedback.
All reactions