Displaying 1 result from an estimated 1 matches for "sexlin".
Did you mean:
senlin
2012 May 14
1
Extract Variance Components
...]]))
(rg.lmer[[1]])/
and want the variance components from each model (one per gene) put in to a
data frame, this works for one gene:
/## SUCCESS! for one gene...
alpha<-as.matrix(lme4::VarCorr(rg.lmer[[1]]))
beta<-data.frame(c(alpha,attr(alpha,"sc")^2))
colnames(beta)<-c("sexline","line","residual")
beta$varcomp<-beta$residual/sum(beta$sexline,beta$line,beta$residual)
rownames(beta)<-gene.list[[1]] #gene.list is just a list of all my focal
genes/
Produces this:
row.names # sexline #line
#residual...