Hi Alison,
It might help to go through a simple example of the GLM maths. For the
case of a single group, X=ones(N,1), X'*X=N, inv(X'*X)=1/N, and so:
beta = inv(X'*X)*X'*y = (1/N)*sum(y) = usual sample mean
df = N - rank(X) = N-1
SSE = sum((y-beta).^2)
ResMS = SSE/df = sum((y-beta).^2)/(N-1) = usual (unbiased) sample variance
Now, the actual variance (a scalar covariance matrix) of beta (i.e.
BCov*ResMS) is:
inv(X'*X)*ResMS = sample_variance / N
which gives the standard deviation of beta as sqrt(sample_variance/N),
as you had below.
> StandardDeviation_of_BetaA = sqrt(Pooled_Variance/N_groupA)
But, the important thing to note is that beta is the sample mean. The
standard deviation of the mean *is* the standard error --- it's just
terminology that people say "standard error" for the standard
deviation *of a parameter* --- no further division by sqrt(N) is
required. That is, the GLM maths is giving you the parameter estimates
beta, and the standard deviations of these estimates, which you could
call standard errors.
The division by sqrt(N) is not what makes a standard deviation into a
standard error; it's just that for the special case of a single group
mean, the standard deviation/error *of the sample mean* is related to
the sample standard deviation *of the data* by this factor. In other
cases, the GLM betas might be more complicated parameters, and the
covariance matrix of the betas might not contain obvious sqrt(N)
terms, but the square roots of the values on the diagonal of the
covariance matrix are the standard deviations/errors for those betas,
appropriate for use in t-contrasts [Aside: the t-contrast mechanism in
SPM actually finds the standard deviation/error of c'*beta, so the
concept of picking the relevant beta_se off the diagonal doesn't
actually come into it, but it's equivalent]
> Sorry Ged - you are going way above the call of duty in answering these
> questions!!
Glad to be of help! But I'm going on holiday for a week, starting this
evening, so if you have any further questions, I won't be able to
answer them for a while.
Best,
Ged.
|