octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #55860] possible bug in wishrnd.m (statistics


From: anonymous
Subject: [Octave-bug-tracker] [bug #55860] possible bug in wishrnd.m (statistics package)
Date: Thu, 7 Mar 2019 22:24:02 -0500 (EST)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:62.0) Gecko/20100101 Firefox/62.0

URL:
  <https://savannah.gnu.org/bugs/?55860>

                 Summary: possible bug in wishrnd.m (statistics package)
                 Project: GNU Octave
            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: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.4.1
        Operating System: Any

    _______________________________________________________

Details:

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);






    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?55860>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]