help mata MCatnode()help mata MCatwt()help mata tlMCatnode()help mata tlMCatwt()help mata intres()-------------------------------------------------------------------------------

Title

Functions for Monte Carlo integration with stratified antithetic samplingwith rpnfcn()

Syntax

Command nameArgument

&MCatnode()&ab

&MCatwt()&ab

&tlMCatnode()&a

&tlMCatwt()NULL

&intres()NULL

DescriptionThese functions are to be used with

rpnfcn(). The functions&MCatnode(),&MCatwt(),&tlMCatnode(), and&tlMCatwt()compute nodes and weights for numerical integration based on Monte Carlo with stratified antithetic sampling. The function&intres()computes the result by summing the evaluated nodes multiplied with the weights.

Remarks

&MCatnode()and&tlMCatnode()use the argument vectorabanda, respectively, to set up the nodes based on the matrix of uniformly distributed random variables presumed to be in the current top element of the stack inrpnfcn(). The number of columns of the matrix of uniformly distributed random variables equals the number of strata used in the integration, thus precision is improved when the number of columns is increased.abmust be a matrix with two columns specifying the lower and upper boundary of the integration interval, respectively, whileamust be a column vector specifying the lower boundary for the indefinite integral.

Source coderpnint.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 binary operators,RPNdistribution functions,