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

Title

Simple distribution functions for use with rpnfcn()

Syntax

Command nameArgument

&fexp()&theta

&Sexp()&theta

&fwei()&theta

&Swei()&theta

DescriptionThese 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 vectorthetato evaluate the function on the matrix in the current top element of the stack inrpnfcn().thetamust be a column vector for the Exponential distribution, and a matrix with two columns for the Weibull distribution.

RemarksThe 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 coderpndist.mata

AuthorHenrik 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 seeManual:

[M] Mata Reference ManualOnline: help for

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