|
Post by mbilow on Oct 29, 2015 18:05:04 GMT
Two points of clarification on section 1 of gcta.freeforums.net/thread/211/estimating-fixed-effects-gcta-greml1. Categorical covariate (e.g. sex and cohort): --covar option If the covariate is a categorical covariate, there will be t - 1 variables (where t is the number of categories, e.g. t = 2 for sex) because otherwise the XTV -1X will not be invertible (X is design matrix for the fixed effects and V is the covariance-covariance matrix). Therefore, the model is y = mu + x c(2)*b c(2) + xc(2)*bc(2) + ... + x c(t)*b c(t) + g + e 1. The underlined portion above should in fact be x c(3)*b c(3), correct? Category 1 is left out from this analysis, because it would make the X TV -1X matrix not invertible. 2. The mu above is in fact the mean of just the individuals for whom x c(1) = 1, correct? Perhaps mu c(1) would be better notation. From this, does V p (as reported by GCTA) equal the variance of (y - [mu + x c(2)*b c(2) + x c(3)*b c(3) + ... + x c(t)*b c(t)])? If so, how many degrees of freedom are used in computing the variance (assuming there are N individuals)?
|
|
|
Post by Jian Yang on Oct 30, 2015 0:45:33 GMT
Re 1) Yes, you are correct. I've fixed that. Thank you!
Re 2) No, it's similar as the intercept term in regression analysis. The x-variable for mu is 1 for all the individuals.
Re 3) Yes, Vp should be very close to the empirical variance of (y - [mu + xc(2)*bc(2) + xc(3)*bc(3) + ... + xc(t)*bc(t)]). In REML, variance components are not estimated based on the degrees of freedom as used in ANOVA. Please see page 779 of Lynch and Walsh (1996) for an interesting discussion. However, REML does take into account the fixed effects when calculating likelihood.
|
|
|
Post by mbilow on Nov 2, 2015 20:13:29 GMT
Thanks--so to clarify a little more:
With a single binary covariate (e.g. sex), if we code xc(1) = 1 if the individual is male and 0 otherwise and xc(2) = 1 if the individual is female,
we'd have:
For males: y = mu + 0*bc(2) + g + e and for females: y = mu + 1*bc(2) + g + e
where mu is the average value of all the individuals, and bc(2) = (average value of only the females - average value of only the males).
Is that correct?
Thanks very much!
|
|
|
Post by Jian Yang on Nov 2, 2015 22:56:20 GMT
Yes, that's right.
|
|
|
Post by asling on Jul 22, 2017 13:37:56 GMT
Hi,
In gcta.freeforums.net/thread/211/estimating-fixed-effects-gcta-greml, there is a description:
'Note that the order of the categories are determined by their order of appearance in the data.'
Can I ask if'appearance in the data' means appearance in the file provided to --covar or the appearance in the matrix id file(and if so how about a multi-components model)?
Thanks!
|
|
|
Post by Jian Yang on Jul 25, 2017 5:41:55 GMT
appearance in the file provided to --covar
|
|