I've been using combat to harmonize multisite MRI data and it has been very helpful so far! However, I recently ran into a bit of trouble after limiting my cohort for further analyses. I kept getting an error that points me to line 80 in the combat.m function:
delta_hat = [];
for i=1:n_batch
indices = batches{i};
delta_hat = [delta_hat; var(s_data(:,indices)')];
end
After some digging, I realize that for single column entries in a batch, var() would calculate the column variance as opposed to row variance which I assume would happen if there were more column entries in the batch. Would you be able to quickly amend this part to include situations illustrated above?
Thanks so much for the great work! Hope to hear back from you soon!!
Hi Jfortin1,
I've been using combat to harmonize multisite MRI data and it has been very helpful so far! However, I recently ran into a bit of trouble after limiting my cohort for further analyses. I kept getting an error that points me to line 80 in the combat.m function:
After some digging, I realize that for single column entries in a batch, var() would calculate the column variance as opposed to row variance which I assume would happen if there were more column entries in the batch. Would you be able to quickly amend this part to include situations illustrated above?
Thanks so much for the great work! Hope to hear back from you soon!!
Sincerely, Judy