Dear Rita,
for a design matrix X, with iid error, the degrees of freedom will be
N-rank(X).
For other situations, a description of the computation of effective
degrees of freedom is given in:
http://www.fil.ion.ucl.ac.uk/spm/doc/papers/kjw_revisited_again.pdf
http://www.fil.ion.ucl.ac.uk/spm/doc/papers/sjk_heuristic.pdf
Best regards,
Guillaume.
On 21/05/15 15:20, MCLAREN, Donald wrote:
> Rita,
>
> I'm not familiar with NHST.
>
> There isn't a simple calculation of the dof that can be applied to all
> models as not all models have independent columns. For many models, the
> DOF is the number of observations (volumes) - #regressors.
>
> For a one-sample t-test, the DF is number of subjects-1.
> For a two-sample t-test, the DF is the number of subjects-2. There are
> two ways to model two groups, both have the same number of DF.
> (1) 2 columns with 1 column for each group;
> (2) 3 columns with 1 column for each group and a third column for the
> mean of all subjects.
>
> As you can see the rule of n-#ofregressors works sometimes, but not
> other times. The reason for this that the rule does not work when the
> columns are dependent on the other columns in the matrix. Thus, SPM has
> its own computation to deal with dependency amongst the columns. If all
> columns are independent and do not influence the other columns, then
> n-#regressors should work assuming you are not doing repeated measures.
>
> The way SPM computes the DF is as follows (from spm_spm.m):
>
> [trRV, trRVRV] = spm_SpUtil('trRV',xX.xKXs,xX.V)
> DF=trRV^2/trRVRV
>
> Hope this helps.
>
>
> Best Regards, Donald McLaren
> =================
> D.G. McLaren, Ph.D.
> Research Fellow, Department of Neurology, Massachusetts General Hospital and
> Harvard Medical School
> Postdoctoral Research Fellow, GRECC, Bedford VA
> Website: http://www.martinos.org/~mclaren
> Office: (773) 406-2464
> =====================
> This e-mail contains CONFIDENTIAL INFORMATION which may contain PROTECTED
> HEALTHCARE INFORMATION and may also be LEGALLY PRIVILEGED and which is
> intended only for the use of the individual or entity named above. If the
> reader of the e-mail is not the intended recipient or the employee or agent
> responsible for delivering it to the intended recipient, you are hereby
> notified that you are in possession of confidential and privileged
> information. Any unauthorized use, disclosure, copying or the taking of any
> action in reliance on the contents of this information is strictly
> prohibited and may be unlawful. If you have received this e-mail
> unintentionally, please immediately notify the sender via telephone at (773)
> 406-2464 or email.
>
> On Wed, May 20, 2015 at 4:18 PM, Rita Elena Loiotile
> <[log in to unmask] <mailto:[log in to unmask]>> wrote:
>
> Hi,
>
> Just curious for my own edification. How exactly are the dof's for,
> say, a t-test determined? It seems like # dof's= #volumes -
> #regressors -n, but I can't figure out what's comprising n.
>
> Thanks!
> Rita
>
>
--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG
|