You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that when using accel(sd), changing the absorbed effects can affect the reproducibility of results even when setting a seed. Consider the following...
set seed 648290
sysuse auto, clear
gen rnd1 = runiform()
reghdfe price rnd1 mpg i.rep78, absorb(foreign)
gen rnd2 = runiform()
reghdfe price rnd2 mpg i.rep78, absorb(foreign)
set seed 648290 // start a second run of the codeloc acc "sd"gen rnd3 = runiform()
reghdfe price rnd3 mpg, absorb(foreign rep78) accel(`acc')
gen rnd4 = runiform()
reghdfe price rnd4 mpg, absorb(foreign rep78) accel(`acc')
assert rnd1 == rnd3
assert rnd2 == rnd4 // fails when accel == sd
Perhaps this is picky, but it would be nice if I could adjust the way the model is estimated (e.g. changing absorb and accel) and still get essentially the same results on subsequent runs.
I believe the problem is line 155 from reghdfe_accelerations.mata. The implication of this line, which is actually marked BUGBUG (so maybe it's not needed?) is that changing the absorb option when using accel(sd) changes the number of times uniform gets called, which changes the fourth call to runiform above, which changes the results. That's why the first runs match, but the second one does not.
The text was updated successfully, but these errors were encountered:
I've noticed that when using
accel(sd)
, changing the absorbed effects can affect the reproducibility of results even when setting a seed. Consider the following...Perhaps this is picky, but it would be nice if I could adjust the way the model is estimated (e.g. changing
absorb
andaccel
) and still get essentially the same results on subsequent runs.I believe the problem is line 155 from
reghdfe_accelerations.mata
. The implication of this line, which is actually markedBUGBUG
(so maybe it's not needed?) is that changing theabsorb
option when usingaccel(sd)
changes the number of timesuniform
gets called, which changes the fourth call toruniform
above, which changes the results. That's why the first runs match, but the second one does not.The text was updated successfully, but these errors were encountered: