Research Article

A Doubling Method for the Generalized Lambda Distribution

Algorithm 1

Mathematica source code for computing intermediate correlations for specified 𝐿 -correlations. The example is for distribution 𝑗 = 3 towards distribution π‘˜ = 4 ( πœ‚ 3 4 ) in Figure 4. See also Table 3(b).
Ξ¦ 𝑗 = C D F [ N o r m a l D i s t r i b u t i o n [ 0 , 1 ] , 𝑍 𝑗 ] ;
Ξ¦ π‘˜ = C DF [ NormalDistribution [ 0,1 ] , 𝑍 π‘˜ ] ;
πœ† β„’ = 0 . 2 7 7 9 7 3 3 5 9 8 2 8 3 2 3 2 ;
πœ† β„› = βˆ’ 0 . 0 8 3 2 9 4 7 9 1 4 3 3 1 2 7 6 2 ;
π‘ž β„’ = ( Ξ¦ πœ† β„’ 𝑗 βˆ’ ( 1 βˆ’ Ξ¦ 𝑗 ) πœ† β„’ ) / ( πœ† β„’ Γ— 2 ( 3 / 2 ) βˆ’ πœ† β„’ / √ πœ‹ ) ;
π‘ž β„› = ( Ξ¦ πœ† β„› 𝑗 βˆ’ ( 1 βˆ’ Ξ¦ 𝑗 ) πœ† β„› ) / ( πœ† β„› Γ— 2 ( 3 / 2 ) βˆ’ πœ† β„› / √ πœ‹ ) ;
(* Standardizing constants Ξ› 1 from Eq. ( 2 . 8 ) and πœ‰ from Eq. ( 3 . 1 2 ) *)
𝑋 β„’ = πœ‰ ( π‘ž β„’ βˆ’ Ξ› 1 ) ;
𝑋 β„› = πœ‰ ( π‘ž β„› βˆ’ Ξ› 1 ) ;
(* Intermediate Correlation *)
𝜌 𝑗 π‘˜ = 0.395685;
Needs [ β€œMultivariateStatistics`” ]
𝑓 𝑗 π‘˜ = P DF [ MultinormalDistribution [ { 0,0}, { { 1, 𝜌 𝑗 π‘˜ } , { 𝜌 𝑗 π‘˜ ,1 } } ] , { 𝑍 𝑗 , 𝑍 π‘˜ } ] ;
(* Compute the specified 𝐿 -correlation *)
πœ‚ 𝑗 π‘˜ √ = 2 πœ‹ βˆ— NIntegrate [ Piecewise [ { { 𝑋 β„’ , Ξ¦ 𝑗 ≀ 0 . 5 } , { 𝑋 β„› , Ξ¦ 𝑗 > 0 . 5 } } ] Γ— Ξ¦ π‘˜ Γ— 𝑓 𝑗 π‘˜ ,
{ 𝑍 𝑗 , βˆ’ 10, 10}, { 𝑍 π‘˜ , βˆ’10, 10}, Method β†’ MultiDimensional ]
0.40