Limma Design Matrix Missing Columns
1
0
Entering edit mode
He Huang • 0
@he-huang-24231
Last seen 3.6 years ago
USA/Grand Forks, ND/University of North…

My metadata file had two variables, Sex (Male, Female), Age (3 M, 12 M, 24 M). When I set up my design matrix as below: ...

My design matrix

design <- model.matrix(~0 + metadata$Age*metadata$Sex) colnames(design) ncol(design)

...

I only got 6 columns in the results: 'metadata$Age12 M' 'metadata$Age24 M' 'metadata$Age3 M' 'metadata$SexMale' 'metadata𝐴𝑔𝑒24𝑀:π‘šπ‘’π‘‘π‘Žπ‘‘π‘Žπ‘‘π‘ŽSexMale' 'metadata𝐴𝑔𝑒3𝑀:π‘šπ‘’π‘‘π‘Žπ‘‘π‘Žπ‘‘π‘ŽSexMale' 6

Some of them I expected were missing. For example, where were 'metadata$SexFemale', and 'metadata𝐴𝑔𝑒12𝑀:π‘šπ‘’π‘‘π‘Žπ‘‘π‘Žπ‘‘π‘ŽSexFemale' etc. gone?

limma • 597 views
ADD COMMENT
0
Entering edit mode
ATpoint ★ 4.0k
@atpoint-13662
Last seen 22 minutes ago
Germany

You are only modelling the interaction. If you want the individual groups to be modelled you could write as:

design <- model.matrix(~0 + Age + Sex + Age*Sex) colnames(design) ncol(design)
ADD COMMENT

Login before adding your answer.

Traffic: 845 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