開始使用免費開始

設計矩陣

Doxorubicin 的實驗是 2x2 的因子設計,因此你需要建立一個合併後的變數,才能在群組平均(group-means)參數化中使用。

本練習屬於課程

使用 R 中的 limma 進行差異表達分析

檢視課程

練習說明

已在你的工作環境中載入含有 doxorubicin 資料的 ExpressionSet 物件 eset

  • genotype(WT 與 Top2b null)與 treatment(PBS 與 Dox)這兩個變數合併成單一的因素變數。

  • 使用 model.matrix 建立一個沒有截距的設計矩陣。

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# Create single variable
group <- with(___(eset), paste(___, ___, sep = "."))
group <- factor(group)

# Create design matrix with no intercept
design <- model.matrix(~___ + ___)
colnames(design) <- levels(group)

# Count the number of samples modeled by each coefficient
colSums(design)
編輯並執行程式碼