This document supplements the article Binomial Models.

Following the article, define link function for generalized linear model based on the logistic function as where is the expected fraction of read count of the alternative allele. Compared to the article, has been replaced by but this has no impact on the main point of this post. Here we consider a single explanatory variable age, so , where is the “intercept” term and mediates the effect of on .

We implement the link function as logistic.upper as follows:

logistic.upper <- function(x, b0, b1) {
    l <- 1 / (1 + exp(-(b0 + x * b1)))
    l[l < 1/2] <- 1/2
    return(l)
}

Fix and, as discussed in the article, set . Let corresponding to a year exponential time constant. Then starts with value at birth and decays to a bit later than a century. plot of chunk read-count-regr