Automatic Differentiation
 
Loading...
Searching...
No Matches
wiener_full_lpdf.hpp File Reference

Go to the source code of this file.

Namespaces

namespace  stan
 The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation from C or the boost::math::lgamma implementation.
 
namespace  stan::math
 Matrices and templated mathematical functions.
 
namespace  stan::math::internal
 A comparator that works for any container type that has the brackets operator.
 

Functions

template<typename T_y , typename T_a , typename T_v , typename T_w , typename T_sv , typename T_sw , typename T_err >
auto stan::math::internal::wiener7_grad_sw (const T_y &y, const T_a &a, const T_v &v, const T_w &w, const T_sv &sv, const T_sw &sw, T_err log_error)
 Calculate the derivative of the wiener7 density w.r.t.
 
template<GradientCalc GradSW, typename F , typename T_y , typename T_a , typename T_v , typename T_w , typename T_sv , typename T_sw , typename T_err , std::enable_if_t<!GradSW > * = nullptr>
auto stan::math::internal::conditionally_grad_sw (F &&functor, T_y &&y_diff, T_a &&a, T_v &&v, T_w &&w, T_sv &&sv, T_sw &&sw, T_err &&log_error)
 Helper function for agnostically calling wiener5 functions (to be integrated over) or directly calling wiener7 functions, accounting for the different number of arguments.
 
template<GradientCalc GradSW, GradientCalc GradW7 = GradientCalc::OFF, typename Wiener7FunctorT , typename T_err , typename... TArgs>
auto stan::math::internal::wiener7_integrate (const Wiener7FunctorT &wiener7_functor, T_err &&hcubature_err, TArgs &&... args)
 Implementation function for preparing arguments and functor to be passed to the hcubature() function for calculating wiener7 parameters via integration.
 
template<bool propto = false, typename T_y , typename T_a , typename T_t0 , typename T_w , typename T_v , typename T_sv , typename T_sw , typename T_st0 >
auto stan::math::wiener_lpdf (const T_y &y, const T_a &a, const T_t0 &t0, const T_w &w, const T_v &v, const T_sv &sv, const T_sw &sw, const T_st0 &st0, const double &precision_derivatives=1e-4)
 The log of the first passage time density function for a (Wiener) drift diffusion model with up to 7 parameters, where \(y\in \mathbb{R}_{+}\) is the reacion time, \(a \in \mathbb{R}_{+}\) the boundary separation, \(t_0 \in \mathbb{R}_{\geq 0}\) the non-decision time, \(w \in (0, 1)\) the relative starting point (aka a-priori bias), \(v \in \mathbb{R}\) the drifte rate, \(s_v \in \mathbb{R}_{\geq 0}\) the inter-trial variability of the drift rate, \(s_w \in [0, 1)\) the inter-trial variability of the relative starting point, and \(s_{t_0} \in \mathbb{R}_{\geq 0}\) the inter-trial variability of the non-decision time.