help mata fexp()
help mata Sexp()
help mata fwei()
help mata Swei()
-------------------------------------------------------------------------------

Title

Simple distribution functions for use with rpnfcn()

Syntax

Command name Argument

&fexp() &theta

&Sexp() &theta

&fwei() &theta

&Swei() &theta

Description

These functions compute densities and survivor function for the Exponential and the Weibull density, respectively. The functions are to be used with rpnfcn(), and use the argument vector theta to evaluate the function on the matrix in the current top element of the stack in rpnfcn(). theta must be a column vector for the Exponential distribution, and a matrix with two columns for the Weibull distribution.

Remarks

The parameterizations used can be described by the following forms of the survivor functions

S_exp (x; theta1) = exp(-x * exp(theta1))

S_wei (x; (theta1, theta2)) = exp(-(x * exp(theta1))^exp(theta2))

where theta1 and theta2 are columns of theta. Note that all parameters are log-transformed from their natural parameterization, so as to ensure that they are unbounded.

Source code

rpndist.mata

Author

Henrik StÝvring, Research Unit of General Practice, University of Southern Denmark. Please email hstovring@health.sdu.dk if you have comments, questions or observe any problems.

Also see

Manual: [M] Mata Reference Manual

Online: help for [M-0] mata, Evaluation of algorithm matrix using RPN, RPN stack manipulation functions, RPN distribution functions, RPN functions for integration