To generate the diagrams, we have to use:
- The observed LRR
- The predicted LRR
- The effect sizes of each pTF and mTF.
We already have the observed LRR, but we need to generate the predicted LRR and effect sizes with the pipeline output:
- First of all, the response (in the model, the observed LRR) has to be normalized but not scaled. I think currently, we are using scaled by default. So scaling = False
- The predicted LRR is pTF-predicted LRR + mTF-predicted LRR.
- Right now, we are using the residuals from the pTF-univariate-models as a default. Because of that, we need to get the predicted LRR from those models first.
- Then, for the surviving mTF (after stage 3), we fit another linear model on the residuals using the surviving mTFs (that way the coefficients are not shrunk). Then, we get the predicted LRR from that model.
- Then, the final predicted LRR is the sum of Step 3 and Step 4.
- The effect sizes are coefficient * LRB for each of the models. So the pTF effect size is the coefficient of the pTF-univariate model (from step 3) * LRB for each of the genes. Same for the mTFs, but this time it would be the model from step 4.
Assigning Chase for review
To generate the diagrams, we have to use:
We already have the observed LRR, but we need to generate the predicted LRR and effect sizes with the pipeline output:
Assigning Chase for review