Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • log fold change from glm/poisson

    Hi,

    I'm wondering how to derive the log fold change from the output of R's glm using poisson family (for RNA-seq data). From R's lm function for linear models (for log2 microarray data) the log fold looks like it is the coefficient (beta), but it looks like the glm output needs some transformation to obtain log fold change. Anyone can walk me through the commands to do this?

    Thanks!

  • #2
    Originally posted by fpbarthel View Post
    Hi,

    I'm wondering how to derive the log fold change from the output of R's glm using poisson family (for RNA-seq data).
    Hi- The coefficients from glm with Poisson family distribution by R default are presented as natural log since the link function is log. so you have to anti-log the coefficient by exponentiation to get fold change. E.g.:

    y<- rep(c(10, 40), each= 5)
    x<- rep(c('A', 'B'), each= 5)
    (fit<- glm(y ~ x, family= poisson()))

    Call: glm(formula = y ~ x, family = poisson())

    Coefficients:
    (Intercept) xB
    2.303 1.386

    Degrees of Freedom: 9 Total (i.e. Null); 8 Residual
    Null Deviance: 96.37
    Residual Deviance: -3.997e-14 AIC: 52.44


    fc<- exp(fit$coefficients[2]) ## Antilog coef #2
    log2(fc) ## Convert to more familiar log2 fold change:
    2

    Comment

    Latest Articles

    Collapse

    • seqadmin
      Advanced Methods for the Detection of Infectious Disease
      by seqadmin




      The recent pandemic caused worldwide health, economic, and social disruptions with its reverberations still felt today. A key takeaway from this event is the need for accurate and accessible tools for detecting and tracking infectious diseases. Timely identification is essential for early intervention, managing outbreaks, and preventing their spread. This article reviews several valuable tools employed in the detection and surveillance of infectious diseases.
      ...
      11-27-2023, 01:15 PM
    • seqadmin
      Strategies for Investigating the Microbiome
      by seqadmin




      Microbiome research has led to the discovery of important connections to human and environmental health. Sequencing has become a core investigational tool in microbiome research, a subject that we covered during a recent webinar. Our expert speakers shared a number of advancements including improved experimental workflows, research involving transmission dynamics, and invaluable analysis resources. This article recaps their informative presentations, offering insights...
      11-09-2023, 07:02 AM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by seqadmin, Yesterday, 08:26 AM
    0 responses
    11 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, Yesterday, 08:12 AM
    0 responses
    12 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 11-27-2023, 08:12 AM
    0 responses
    19 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 11-22-2023, 09:29 AM
    1 response
    60 views
    0 likes
    Last Post VilliamPast  
    Working...
    X