I have a very simple statistical model y = a * b.
I know all the variables (a, b, and y) and I do not want to add any optimized coefficients (the intercept should be 0 and the coefficients on a and b are effectively 1).
What I need is the explained variance (R2), but I cannot figure out a simple way to tease it out without calculating all the formulas from scratch. Is there anything similar to statsmodel OLS rsquared but for a model with fixed coefficients?
I mainly use python but happy to use R if it is easier.