This function estimates the dispersion parameter \(\phi\) of a Beta distribution for each isoform (row) in a matrix of PI (Percent Inclusion) values. The parameter \(\phi\) reflects the intercellular variability of isoform usage across cells.
Value
A named numeric vector of \(\phi\) values, one per isoform (row of
pi_mat). Rows with insufficient data or invalid parameters return
NA.
Details
For each isoform, \(\phi\) is estimated from the sample mean (\(m\)) and variance (\(v\)) of PI values across cells, using the method of moments: $$\phi = 1 / (\alpha + \beta + 1)$$ where \(\alpha = m((1 - m)/v - 1)\) and \(\beta = (1 - m)((1 - m)/v - 1)\).
Isoforms with fewer than three valid observations or with degenerate mean or
variance values return NA.