The scenario is like this. A study population given "vitamin D supp" (yes/no variable) and followed up to measure outcome "skin cancer" (again yes/no). The design matrix (1) I used is
design<-model.matrix(~0+vitd, data)
colnames(design)
[1] "vitd" "vitdn" "vitdy"
The patients were also measured for exposure to sunlight "sun" (yes/no variable) To measure the influence of "sun" in design matrix (1), I used another matrix
design<-model.matrix(~vitd+sun, data)
colnames(design)
[1] "(Intercept)" "vitdy" "sunsunn" "sunsuny"
My questions
- Are the design matrix correct to measure role of "vitamin D supp" ALONE and WITH "sunlight" separately.
- Definitely the DE RNA with be different while using two designs. So, how to know which rna are due to vitamin D alone
- How to know which RNA are due to "sun" alone
Thanks
Thanks for the comment. For effect of vitD with sunlight..is it
vitD_y_Sun_y - vitD_n_Sun_yorvitD_y_Sun_y - vitD_n_Sun_nOne more question. I created heatmap using heatmap.2 for both contrasts which gives the same heatmap. Why is it ? I created
toptagsfor both contrasts separately which gives different lists of miRNAs but the heatmap remains the same. Is there anything wrong. ThanksIf you want to have the effect of vit D in patients that all received sunlight
vitD_y_Sun_y - vitD_n_Sun_ywould be the right contrast. Please start a new question if you don't get the heatmap right, and show your code in that new question (not enough info now).