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 Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  None Assigned to:  None
Originator Name:  Elmar Plischke Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * 8.3.0
Operating System:  * Microsoft Windows Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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 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 project members can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.12