posterior_x_at_fy.RdFind the posterior distribution of the value of a predictor variable at a particular point along the derivative. For instance, one might be interested in knowing the age value at which a slope is steepest, or closest to zero.
posterior_x_at_fy( object, term, n, eps, find = c("min", "max", "value"), value = NULL, multimodal = TRUE, adjust = 1, prob = 0.95, summary_only = FALSE ) posterior_x_at_miny(...) posterior_x_at_maxy(...) posterior_x_at_yequalto(...)
| object | a |
|---|---|
| term | character; the smooth term for which the derivative is required. |
| n | numeric; the number of points to evaluate the derivative at. |
| eps | numeric; the finite difference. |
| find | the spot along the derivative to find; can be 'min', 'max', or
'value', in which case the |
| value | if |
| multimodal | if the expected posterior might be multimodal, set this to
|
| adjust | passed to |
| prob | the proportion of mass within the HPDI |
| summary_only | set this to |
An object of class curvish.param that contains the summary
from hdi, and the posterior samples. If
summary_only is TRUE, the only the output from
hdi is returned.
posterior_x_at_miny, posterior_x_at_maxy, and
posterior_x_at_yequalto are aliases of posterior_x_at_fy where
find is set to 'min', 'max', or 'value', respectively and are provided
in case they make for more readable code.