Skip to content

Commit

Permalink
[REPRO] Add group vector to MultipleRegressDesign
Browse files Browse the repository at this point in the history
  • Loading branch information
elodiegermani1 committed Dec 14, 2023
1 parent ed97097 commit acb2cbd
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions narps_open/pipelines/team_43FJ_debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -822,8 +822,10 @@ def get_regressors(
# with a list of the size of the number of participants
if method == 'equalRange':
regressors = dict(group_mean = [1 for i in range(len(equal_range_id))])
group = [1 for i in equal_range_id]
elif method == 'equalIndifference':
regressors = dict(group_mean = [1 for i in range(len(equal_indifference_id))])
group = [1 for i in equal_indifference_id]

# For two sample t-test, creates 2 lists:
# - one for equal range group,
Expand All @@ -848,7 +850,9 @@ def get_regressors(
equalIndifference = equalIndifference_reg
)

return regressors
group = [1 if i == 1 else 2 for i in equalRange_reg]

return regressors, group

def get_group_level_analysis(self):
"""
Expand Down Expand Up @@ -941,7 +945,10 @@ def get_group_level_analysis_sub_workflow(self, method):
'method',
'subject_list',
],
output_names = ['regressors'],
output_names = [
'regressors',
'group'
],
function = self.get_regressors,
),
name = 'regs',
Expand Down

0 comments on commit acb2cbd

Please sign in to comment.