bugGNU Octave - Bugs: bug #64753, (statistics) anovan fails for...

 
 

bug #64753: (statistics) anovan fails for 'interactions'

Submitter:  None
Submitted:  Fri 06 Oct 2023 11:06:27 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Elmar Plischke Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 8.3.0
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 23 Mar 2024 10:14:40 PM UTC, comment #1: 

Thank you for pointing out this bug. I have just pushed your suggested changes into statistics here https://github.com/gnu-octave/statistics/commit/a24d24eee7b8b2ebffbf1d45d1afb44fc8ce982b

I apologize for not responding in a timely manner to your bug report, but since statistics has moved to GitHub, the suitable place for bug reports regarding statistics is to open an issue at  https://github.com/gnu-octave/statistics/issues
I do occasionally check savannah but not that often and sometimes I can miss some bug reports (your report is an example).
This can be closed as fixed now.

Andreas Bertsatos <pr0m1th3as>
Fri 06 Oct 2023 11:06:27 AM UTC, original submission:  

Dear all,

typing

fitlm(rand(100,12),rand(100,1),'interactions')

yields an error message

error: anovan: the model terms matrix must list main effects above/before
 interactions
error: called from
    anovan at line 547 column 7
    fitlm at line 272 column 23


It seems that the index calculation for filling the TERM matrix is broken in this case. Here's a crude fix.

anovan.m+501:

        case 2
          ## Create term definitions for a model with two factor interactions
          if (N > 1)
            Nx = nchoosek (N, 2);
          else
            Nx = 0;
          endif
          TERMS = zeros (N + Nx, N);
          TERMS(1:N,:) = eye (N);
          cnt = N+1;
          for j = 1:N
            for i = j:N-1
              TERMS(cnt,j) = 1;
              TERMS(cnt,i+1) = 1;
              cnt = cnt+1;
            endfor
          endfor


Anonymous

 

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

Attach Files:
   
   
Comment:
   

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 nrjank (Updated the item)
  • -email is unavailable- added by pr0m1th3as (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-03-24 nrjank StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-c8cf.
    Corresponding source code