Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ neg_binomial_2_log_glm()

__kernel void stan::math::opencl_kernels::neg_binomial_2_log_glm ( __global double *  logp_global,
__global double *  theta_derivative_global,
__global double *  theta_derivative_sum,
__global double *  phi_derivative_global,
const __global int *  y_global,
const __global double *  x,
const __global double *  alpha,
const __global double *  beta,
const __global double *  phi_global,
const int  N,
const int  M,
const int  is_y_vector,
const int  is_alpha_vector,
const int  is_phi_vector,
const int  need_theta_derivative,
const int  need_theta_derivative_sum,
const int  need_phi_derivative,
const int  need_phi_derivative_sum,
const int  need_logp1,
const int  need_logp2,
const int  need_logp3,
const int  need_logp4 
)

GPU implementation of Generalized Linear Model (GLM) with Negative-Binomial-2 distribution and log link function.

Must be run with at least N threads and local size equal to LOCAL_SIZE_.

Parameters
[out]logp_globalpartially summed log probability (1 value per work group)
[out]theta_derivative_globalintermediate variable used in the model
[out]theta_derivative_sumpartially summed theta_derivative_global (1 value per work group)
[out]phi_derivative_globalderivative with respect to phi
[in]y_globalfailures count vector parameter
[in]xdesign matrix
[in]alphaintercept (in log odds)
[in]betaweight vector
[in]phi_global(vector of) precision parameter(s)
Nnumber of cases
Mnumber of attributes
is_y_vector0 or 1 - whether y is a vector (alternatively it is a scalar)
is_alpha_vector0 or 1 - whether alpha is a vector (alternatively it is a scalar)
is_phi_vector0 or 1 - whether phi is a vector (alternatively it is a scalar)
need_theta_derivativewhether theta_derivative needs to be computed
need_theta_derivative_sumwhether theta_derivative_sum needs to be computed
need_phi_derivativewhether phi_derivative needs to be computed
need_phi_derivative_sumwhether phi_derivative_sum needs to be computed
need_logp1interpreted as boolean - whether first part logp_global needs to be computed
need_logp2interpreted as boolean - whether second part logp_global needs to be computed
need_logp3interpreted as boolean - whether third part logp_global needs to be computed
need_logp4interpreted as boolean - whether fourth part logp_global needs to be computed

Definition at line 58 of file neg_binomial_2_log_glm_lpmf.hpp.