bigfp function

Compute the numerical integration by the trapezoidal rule.

Compute the numerical integration by the trapezoidal rule.

See page 220 of Vinod (2008) ``Hands-on Intermediate Econometrics Using R,'' for the trapezoidal integration formula needed for stochastic dominance. The book explains pre-multiplication by two large sparse matrices denoted by IF,IfI_F, I_f. Here we accomplish the same computation without actually creating the large sparse matrices. For example, the IfI_f is replaced by cumsum in this code (unlike the R code in my textbook).

bigfp(d, p)

Arguments

  • d: A vector of consecutive interval lengths, upon combining both data vectors
  • p: Vector of probabilities of the type 1/2T, 2/2T, 3/2T, etc. to 1.

Returns

Returns a result after pre-multiplication by IF,IfI_F, I_f

matrices, without actually creating the large sparse matrices. This is an internal function.

Note

This is an internal function, called by the function stochdom2, for comparison of two portfolios in terms of stochastic dominance (SD) of orders 1 to 4. Typical usage is: sd1b=bigfp(d=dj, p=rhs) sd2b=bigfp(d=dj, p=sd1b) sd3b=bigfp(d=dj,p=sd2b) sd4b=bigfp(d=dj, p=sd3b). This produces numerical evaluation vectors for the four orders, SD1 to SD4.

References

Vinod, H. D.', 'Hands-On Intermediate Econometrics Using R' (2008) World Scientific Publishers: Hackensack, NJ. https://www.worldscientific.com/worldscibooks/10.1142/12831

Author(s)

Prof. H. D. Vinod, Economics Dept., Fordham University, NY

  • Maintainer: H. D. Vinod
  • License: GPL (>= 2)
  • Last published: 2023-10-09

Useful links