primarycensored
Loading...
Searching...
No Matches
Analytical Solutions for Primary Event Distributions Functions

Core functions for computing analytical solutions. More...

Collaboration diagram for Analytical Solutions for Primary Event Distributions Functions:

Subgroups

 Helpers for Analytical Solutions
 Helper functions for analytical solutions.
 

Functions

real primarycensored_gamma_uniform_lcdf (data real d, real q, array[] real params, data real pwindow)
 
real primarycensored_lognormal_uniform_lcdf (data real d, real q, array[] real params, data real pwindow)
 
real primarycensored_weibull_uniform_lcdf (data real d, real q, array[] real params, data real pwindow)
 
real primarycensored_gengamma_uniform_lcdf (data real d, real q, array[] real params, data real pwindow)
 
real primarycensored_analytical_lcdf_raw (data real d, int dist_id, array[] real params, data real pwindow, int primary_id, array[] real primary_params)
 
real primarycensored_analytical_lcdf (data real d, int dist_id, array[] real params, data real pwindow, data real L, data real D, int primary_id, array[] real primary_params)
 
real primarycensored_analytical_cdf (data real d, int dist_id, array[] real params, data real pwindow, data real L, data real D, int primary_id, array[] real primary_params)
 
vector primarycensored_analytical_lcdf_vectorized (data int start, data int n, data int dist_id, array[] real params, data real pwindow)
 

Description

Core functions for computing analytical solutions.

Function Documentation

◆ primarycensored_analytical_cdf()

real primarycensored_analytical_cdf ( data real d,
int dist_id,
array[]real params,
data real pwindow,
data real L,
data real D,
int primary_id,
array[]real primary_params )

Compute the primary event censored CDF analytically for a single delay

Parameters
dDelay
dist_idDistribution identifier
paramsArray of distribution parameters
pwindowPrimary event window
LMinimum delay (lower truncation point)
DMaximum delay (upper truncation point)
primary_idPrimary distribution identifier
primary_paramsPrimary distribution parameters
Returns
Primary event censored CDF, normalized over [L, D] if truncation is applied

Definition at line 429 of file primarycensored_analytical_cdf.stan.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ primarycensored_analytical_lcdf()

real primarycensored_analytical_lcdf ( data real d,
int dist_id,
array[]real params,
data real pwindow,
data real L,
data real D,
int primary_id,
array[]real primary_params )

Compute the primary event censored log CDF analytically for a single delay

Parameters
dDelay
dist_idDistribution identifier
paramsArray of distribution parameters
pwindowPrimary event window
LMinimum delay (lower truncation point)
DMaximum delay (upper truncation point)
primary_idPrimary distribution identifier
primary_paramsPrimary distribution parameters
Returns
Primary event censored log CDF, normalized over [L, D] if truncation is applied

Definition at line 386 of file primarycensored_analytical_cdf.stan.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ primarycensored_analytical_lcdf_raw()

real primarycensored_analytical_lcdf_raw ( data real d,
int dist_id,
array[]real params,
data real pwindow,
int primary_id,
array[]real primary_params )

Compute the primary event censored log CDF analytically for a single delay (internal version without truncation)

Definition at line 333 of file primarycensored_analytical_cdf.stan.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ primarycensored_analytical_lcdf_vectorized()

vector primarycensored_analytical_lcdf_vectorized ( data int start,
data int n,
data int dist_id,
array[]real params,
data real pwindow )

Compute the primary event censored log CDF analytically at integer delays

The log CDF at d combines the terms at d and at q = max(d - pwindow, 0) (see primarycensored_uniform_lcdf_from_terms()). Both are integer delays, so the terms are computed once per delay and used for both, halving the CDF evaluations. The values are the same as from primarycensored_analytical_lcdf() at each delay without truncation. Only for cases where check_for_analytical_vectorized() is 1.

Parameters
startFirst delay to compute
nLast delay to compute, and the length of the result
dist_idDistribution identifier
paramsArray of distribution parameters
pwindowPrimary event window, a positive integer
Returns
Vector whose element d is the log CDF at d, for d in start:n. Elements before start are not computed.

Definition at line 481 of file primarycensored_analytical_cdf.stan.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ primarycensored_gamma_uniform_lcdf()

real primarycensored_gamma_uniform_lcdf ( data real d,
real q,
array[]real params,
data real pwindow )

Compute the primary event censored log CDF analytically for Gamma delay with Uniform primary

Parameters
dDelay time
qLower bound of integration (max(d - pwindow, 0))
paramsArray of Gamma distribution parameters [shape, rate]
pwindowPrimary event window
Returns
Log of the primary event censored CDF for Gamma delay with Uniform primary

Definition at line 255 of file primarycensored_analytical_cdf.stan.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ primarycensored_gengamma_uniform_lcdf()

real primarycensored_gengamma_uniform_lcdf ( data real d,
real q,
array[]real params,
data real pwindow )

Compute the primary event censored log CDF analytically for generalised gamma delay with Uniform primary

Parameters
dDelay time
qLower bound of integration (max(d - pwindow, 0))
paramsArray of generalised gamma distribution parameters [shape, scale, k]
pwindowPrimary event window
Returns
Log of the primary event censored CDF for generalised gamma delay with Uniform primary

Definition at line 319 of file primarycensored_analytical_cdf.stan.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ primarycensored_lognormal_uniform_lcdf()

real primarycensored_lognormal_uniform_lcdf ( data real d,
real q,
array[]real params,
data real pwindow )

Compute the primary event censored log CDF analytically for Lognormal delay with Uniform primary

Parameters
dDelay time
qLower bound of integration (max(d - pwindow, 0))
paramsArray of Lognormal distribution parameters [mu, sigma]
pwindowPrimary event window
Returns
Log of the primary event censored CDF for Lognormal delay with Uniform primary

Definition at line 276 of file primarycensored_analytical_cdf.stan.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ primarycensored_weibull_uniform_lcdf()

real primarycensored_weibull_uniform_lcdf ( data real d,
real q,
array[]real params,
data real pwindow )

Compute the primary event censored log CDF analytically for Weibull delay with Uniform primary

Parameters
dDelay time
qLower bound of integration (max(d - pwindow, 0))
paramsArray of Weibull distribution parameters [shape, scale]
pwindowPrimary event window
Returns
Log of the primary event censored CDF for Weibull delay with Uniform primary

Definition at line 297 of file primarycensored_analytical_cdf.stan.

Here is the call graph for this function:
Here is the caller graph for this function: