Skip to content

EB problem for ABCD: Avoid mixing family types when adding information of train-test into EB#2

Open
enicolaisen wants to merge 1 commit into
MLNL:masterfrom
enicolaisen:master
Open

EB problem for ABCD: Avoid mixing family types when adding information of train-test into EB#2
enicolaisen wants to merge 1 commit into
MLNL:masterfrom
enicolaisen:master

Conversation

@enicolaisen

@enicolaisen enicolaisen commented Jun 1, 2026

Copy link
Copy Markdown

Me and my collaborator Zeying Du faced an issue with the EB matrix for ABCD. We got the following error:

Error using palm_tree>checkblk (line 261)
Not al sub-blocks within an EB are of the same size at level 2.


Error in palm_tree>checkblk (line 239)
            checkblk(B(idx,2:end),B(find(idx,1),1)>=0,recdepth+1);

Error in palm_tree>checkblk (line 239)
            checkblk(B(idx,2:end),B(find(idx,1),1)>=0,recdepth+1);

Error in palm_tree (line 63)
warned = checkblk(Bs,Bs(1)>=0,0);

Error in palm_quickperms (line 125)
    Ptree = palm_tree(v.EB,v.M);

Error in calc_permid (line 98)
        pset = palm_quickperms([], EBi, cfg.stat.nperm+1);

Error in main (line 60)
calc_permid(res, 'perm');

Error in rcca_a1 (line 54)
main(cfg);

We were able to trace back the problem to line 82 in calc_permid.m
There, the EB matrix is edited to indicate which subjects are on train and which on test.
But the way it's done mixes family types.
The 2nd column of the EB matrix encodes families with values of 10 and 20, among others: 10 and 20 are two different family types.
When the information of train and test is added, column 2 is multiplied by a vector (trid+1) which includes values of 1 and 2, so some 10s became 20s.
This mix of family types is why the sizes of the blocks are wrong and hence the error.

The suggested fix ensures that the values added to the EB matrix are at least one order of magnitude bigger than the maximum value in the 2nd column of EB, ensuring that families are not mixed.

Best,
Eli

@kaurao
@zeyingdu-helen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant