tests/testthat/_snaps/distributions_cholesky.md

Cholesky factor of Wishart should be a lower triangular matrix

Code
  calculate(chol_x, nsim = 1, seed = 2024 - 7 - 30 - 1431)
Output
  $chol_x
  , , 1

          [,1] [,2] [,3]
  [1,] 1.76182    0    0

  , , 2

               [,1]     [,2] [,3]
  [1,] -0.005111915 1.734849    0

  , , 3

             [,1]       [,2]      [,3]
  [1,] -0.9636536 -0.8675692 0.7560725
Code
  (calc_chol <- calculate(x, chol_x, nsim = 1, seed = 2024 - 7 - 30 - 1431))
Output
  $x
  , , 1

           [,1]         [,2]      [,3]
  [1,] 3.104011 -0.009006277 -1.697785

  , , 2

               [,1]     [,2]      [,3]
  [1,] -0.009006277 3.009727 -1.500175

  , , 3

            [,1]      [,2]    [,3]
  [1,] -1.697785 -1.500175 2.25295


  $chol_x
  , , 1

          [,1] [,2] [,3]
  [1,] 1.76182    0    0

  , , 2

               [,1]     [,2] [,3]
  [1,] -0.005111915 1.734849    0

  , , 3

             [,1]       [,2]      [,3]
  [1,] -0.9636536 -0.8675692 0.7560725

Cholesky factor of LJK_correlation should be a lower triangular matrix

Code
  calculate(chol_x, nsim = 1, seed = 2024 - 7 - 30 - 1431)
Output
  $chol_x
  , , 1

       [,1] [,2] [,3]
  [1,]    1    0    0

  , , 2

             [,1]      [,2] [,3]
  [1,] -0.1775724 0.9841077    0

  , , 3

            [,1]      [,2]      [,3]
  [1,] 0.2806787 0.7509681 0.5977177
Code
  (calc_chol <- calculate(x, chol_x, nsim = 1, seed = 2024 - 7 - 30 - 1431))
Output
  $x
  , , 1

       [,1]       [,2]      [,3]
  [1,]    1 -0.1775724 0.2806787

  , , 2

             [,1] [,2]      [,3]
  [1,] -0.1775724    1 0.6891927

  , , 3

            [,1]      [,2] [,3]
  [1,] 0.2806787 0.6891927    1


  $chol_x
  , , 1

       [,1] [,2] [,3]
  [1,]    1    0    0

  , , 2

             [,1]      [,2] [,3]
  [1,] -0.1775724 0.9841077    0

  , , 3

            [,1]      [,2]      [,3]
  [1,] 0.2806787 0.7509681 0.5977177

Post-MCMC, Wishart distribution stays symmetric, chol remains lower tri

Code
  calcs
Output
  $x
  , , 1

           [,1]         [,2]      [,3]
  [1,] 3.104011 -0.009006277 -1.697785

  , , 2

               [,1]     [,2]      [,3]
  [1,] -0.009006277 3.009727 -1.500175

  , , 3

            [,1]      [,2]    [,3]
  [1,] -1.697785 -1.500175 2.25295


  $`chol(x)`
  , , 1

          [,1] [,2] [,3]
  [1,] 1.76182    0    0

  , , 2

               [,1]     [,2] [,3]
  [1,] -0.005111915 1.734849    0

  , , 3

             [,1]       [,2]      [,3]
  [1,] -0.9636536 -0.8675692 0.7560725

Post-MCMC, LKJ distribution stays symmetric, chol remains lower tri

Code
  calcs
Output
  $x
  , , 1

       [,1]       [,2]      [,3]
  [1,]    1 -0.1775724 0.2806787

  , , 2

             [,1] [,2]      [,3]
  [1,] -0.1775724    1 0.6891927

  , , 3

            [,1]      [,2] [,3]
  [1,] 0.2806787 0.6891927    1


  $`chol(x)`
  , , 1

       [,1] [,2] [,3]
  [1,]    1    0    0

  , , 2

             [,1]      [,2] [,3]
  [1,] -0.1775724 0.9841077    0

  , , 3

            [,1]      [,2]      [,3]
  [1,] 0.2806787 0.7509681 0.5977177


goldingn/greta documentation built on June 12, 2025, 9:48 p.m.