User Tools

Site Tools


glm.removesubject

GLM::RemoveSubject - remove subject(s) from a GLM object

Motivation

While it is best practice to decide which subjects to include into the second level analysis before computing and creating a GLM (which then contains the selected subjects), it sometimes happens that later analyses reveal the possibility that one (or several) of the included subjects are yet outliers.

In such a case it is convenient to (temporarily) remove such subjects from the GLM object and re-compute contrasts and correlations to observe the effect.

Note: this feature is not meant as encouragement to discard of subjects' data lightly! It is meant for cases where one is certain of the outlier status of those subjects, and recomputing a GLM requires a substantial amount of time!

Requirements

A random-effects GLM file and the (list of) subject ID(s) that are to be discarded.

Reference / glm.Help('RemoveSubject')

 GLM::RemoveSubject  - remove subject(s) from GLM

 FORMAT:       [glm = ] glm.RemoveSubject(sid);

 Input fields:

       sid         either single subject (char) or list of subjects (cell)

 Output fields:

       hfile       altered GLM object

Usage examples

Assuming the GLM is loaded in variable glm, the following syntax examples will work (given that the subject IDs specified exist!):

glm_removesubject_example.m
% remove single subject
glm.RemoveSubject('CPU4122');
 
% remove three subjects
remsubs = {'CPU4728', 'CPU5915', 'CPU6634'};
glm.RemoveSubject(remsubs);
 
% save under a different name! (without argument brings up dialog)
glm.SaveAs;
glm.removesubject.txt · Last modified: 2010/06/10 13:00 by jochen