-
-
Notifications
You must be signed in to change notification settings - Fork 220
Feature request: vectorized phi() #3383
Copy link
Copy link
Open
Labels
distributionsIssues that deal with distribution functions: pdf, pmf, cdfIssues that deal with distribution functions: pdf, pmf, cdffeaturegood first issue
Description
Activity
Metadata
Metadata
Assignees
Labels
distributionsIssues that deal with distribution functions: pdf, pmf, cdfIssues that deal with distribution functions: pdf, pmf, cdffeaturegood first issue
Stan has a vectorized$\Phi(x)$ (standard cumulative distribution function) but lacks a corresponding vectorized $\varphi(x)$ (standard normal density). You can't get this using
std_normal_lpdf(), as it sums the log density values; I'm asking for something that returns a vectorized result.One use case for a vectorized$\Phi(x)$ is in computing a quasi-hinge function based on $\Phi(x)$ :
This function has range$(0,\infty)$ with $h(x) \to 0$ as $x\to -\infty$ , $h(x)/x \to 1$ as $x\to \infty$ , and $h'(x) = \Phi(x)$ .