Using age as interger in model.matrix gives me an error
1
0
Entering edit mode
3.2 years ago

I am trying to do RNA-seq, the thing is that when I include the age variable in the design.matrix(), I get less row dimensions than the columns of the count matrix. This throws an error on running voom().

This problem does not appear if the age variable is not used (i.e all the model variables are factors)

Any ideas?

limma edgeR RNA-Seq R • 522 views
ADD COMMENT
2
Entering edit mode
3.2 years ago
Gordon Smyth ★ 7.0k

Age as an integer should cause no problems. If your experiimental data is correctly specified, then the design matrix will always have the correct number of rows regardless of whether an age covariate is included or not.

You refer to a function design.matrix(), but there is no function by that name in limma or edgeR. The limma and edgeR workflows use model.matrix().

ADD COMMENT

Login before adding your answer.

Traffic: 2028 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6