Suppose I have a continuous covariate like age, and I want to use it for RNA-Seq quantification, but in the categorical binary form, and I want to find the optimal threshold. I understand that this optimality can be defined depending on the presence of the grouping outcome variable.
If I have an outcome binary variable - i.e. cases and controls, If it were a single variable, I would look for the point on ROC. Since I would get one optimal age threshold per gene, I need some way to unify all those value obtained on the gene level. Is there a method or package that is commonly used for this case?
If I don't have two groups, but basically the continuous covariate is the outcome, I suppose that I could use some sort of clustering metric like the Fisher's linear discriminant that quantifies the distance between observations in an unsupervised manner. Again, is there a commonly used joint metric for all the genes, seeing that the distances in genes would have different scales?
I have some ideas how to code these things, but I am wondering if there are already validated functionalities of common tools, packages etc.
Thanks in advance!