Limma beta coefficient confidence intervals
1
0
Entering edit mode
fluentin44 • 0
@45f45212
Last seen 3 days ago
United Kingdom

Hi,

Has anyone any experince of extracting the beta coefficients form a limma object (i.e. fit_2) and calculating the 5% and 95% confidence intervals for the coefficients? Any help would be hugely appreciated.

fit <- lmFit(methylation_matrix, mod, method = "ls") # Use this line for full run, hash out for testing
fit_2 <- eBayes(fit)
table <- limma::topTable(fit_2, coef = 2, number = Inf)


Thanks,

Matt

limma limmaGUI beta • 194 views
1
Entering edit mode
@james-w-macdonald-5106
Last seen 1 day ago
United States

see ?topTable.

You can simply add confint = TRUE

0
Entering edit mode

Unfortunately that returns the confidence intervals for logFC, not the B statistic.

0
Entering edit mode

You said beta in your original post, which is the logFC. You want the CI for the log odds?

0
Entering edit mode

Apologies, ive been a plank and obviously not read closely enough - in the toptable output logFC is essentially the effect size / B statistic for each individual regression per gene / CpG and B the log-odds?

1
Entering edit mode

It's not the effect size, which is a different thing. But it is the beta for the model you fit, estimating the difference between groups. The B statistic in that table is the log odds of being differentially expressed.

0
Entering edit mode

Ok much appreciated, thanks!