willwerscheid / flashier

A faster and angrier package for EBMF.
https://willwerscheid.github.io/flashier/
Other
10 stars 12 forks source link

flash_fit_get_est_tau() vs flash_fit_get_tau() #103

Open jean997 opened 1 year ago

jean997 commented 1 year ago

I see in the documentation that flash_fit_get_est_tau() is supposed to return just the estimated precision component and flash_fit_get_tau() is supposed to return the total precision. However, I am finding that the two functions give me the same result even though flash_fit_get_fixed_tau() is not 0. This is from a fit run with

flash_init(data = Y, S = a, var_type = 2)

where a is a scalar. I find that flash_fit_get_fixed_tau() returns 1/a^2 as expected.

Is this an issue with one of the get functions, the documentation, or my understanding? Thanks! Jean

willwerscheid commented 6 months ago

thank you, this should be fixed. the issue is that when S is not a matrix then variance estimation is straightforward - S just puts a minimum threshold on the estimated variance so the total variance is stored as est.tau in the flash fit object. This part will not be changed but we should change flash_fit_get_est_tau() so that the fixed portion of variance is subtracted from the total if is.tau.simple(fit) is true.