bugGNU Octave - Bugs: bug #55860, [octave forge] (statistics)...


bug #55860: [octave forge] (statistics) possible bug in wishrnd.m

Submitted by:  None
Submitted on:  Fri 08 Mar 2019 03:24:00 AM UTC  
Category:  Octave Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  4.4.1
Operating System:  Any

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sun 14 Apr 2019 11:01:04 AM UTC, comment #4:

Closing as fixed

John Donoghue <lostbard>
Project Member
Fri 12 Apr 2019 07:24:38 PM UTC, comment #3:

statictics 1.4.1 has been released with changes in wishrnd

John Donoghue <lostbard>
Project Member
Tue 12 Mar 2019 04:34:06 PM UTC, comment #2:

I edited wishrnd in the repository in response to this bug, please see if that fixes the issue.

Nir Krakauer <nir_krakauer>
Tue 12 Mar 2019 04:13:30 PM UTC, comment #1:

Do you have any examples that illustrate the wrong result ?

John Donoghue <lostbard>
Project Member
Fri 08 Mar 2019 03:24:00 AM UTC, original submission:

For a non-integer df, the current code is:

Z = diag(sqrt(chi2rnd(df - (0:(p-1))))); #fill diagonal
Z(ii > jj) = randn(p*(p-1)/2, 1); #fill lower triangle with normally distributed variates
Z = D * Z;
W(:, :, i) = Z*Z';

However, D is provided by chol(), which by default produces upper triangular matrices. So, the order of multiplications should be:
Z = Z * D;
W(:, :, i) = Z' * Z;

To take into account the changed order, the Z matrix should have its upper triangle filled with normally distributed variates, instead of the lower triangle:
Z(ii < jj) = randn(p*(p-1)/2, 1);



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by nir_krakauer (Posted a comment)
  • -email is unavailable- added by lostbard (Posted a comment)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-04-14 lostbard StatusReady For Test => Fixed
        Open/ClosedOpen => Closed
    2019-04-12 lostbard StatusNone => Ready For Test
    2019-03-08 mtmiller Summarypossible bug in wishrnd.m (statistics package) => [octave forge] (statistics) possible bug in wishrnd.m

    Back to the top

    Powered by Savane 3.4