User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

glm.removesubject [2010/06/10 15:00] (current)
jochen created
Line 1: Line 1:
 +====== 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'​) =====
 +<​file>​ 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</​file>​
 +===== Usage examples =====
 +Assuming the GLM is loaded in variable ''​glm'',​ the following syntax examples will work (given that the subject IDs specified exist!):
 +<code matlab glm_removesubject_example.m>​% remove single subject
 +% remove three subjects
 +remsubs = {'​CPU4728',​ '​CPU5915',​ '​CPU6634'​};​
 +% save under a different name! (without argument brings up dialog)
glm.removesubject.txt ยท Last modified: 2010/06/10 15:00 by jochen