I noticed that the output of a certain regression sometimes reported all standard errors as missing, and other times only reported one particular regressor's standard errors as missing. Although the original regression contained many regressors (a triple interaction between categorical factor variables) and hundreds of observations, I was able to reproduce the phenomenon with the following reduced example. (I also replaced the dependent variable, y, with uniformly random noise between 0 and 1.)
Changing the order of the regressors from "a b c" to "c b a" (along with various other modifications one can think up, like adding 1 to "y") causes the output to become deterministic again.
Yes, the fixed effect is nearly collinear with the cluster variable. This is not the case with the full dataset, only with the reduced testcase.
I am unsure whether the expected output has all-missing standard errors or some finite standard errors, and would appreciate feedback on that point. FWIW, -areg- (part of the time), -reg-, and -xtreg, dfadj- all report identical standard errors for regressors "a" and "b", and report the standard errors of regressor "c" as missing, or zero, or near-zero.
I reported another case of nondeterministic outputs under different conditions here. It turned out to be due to an internal unstable sort used by -xtreg-. However, to my surprise, StataCorp decided that the nondeterministic output is a feature, not a bug. It is possible that they will have the same reaction to this phenomenon.
Code:
version 14.1 clear input a b c fe cl y 0 0 0 1 1 0.00780267 1 1 1 1 1 0.14052081 0 0 0 2 2 0.51635212 1 1 1 2 2 0.86433381 0 0 0 3 3 0.65547532 0 0 1 3 3 0.30712718 0 0 0 4 3 0.98459065 0 1 0 4 3 0.55534583 0 0 0 5 4 0.44104260 0 1 0 5 4 0.85928327 0 0 0 6 5 0.74272376 0 0 0 7 6 0.67516220 0 0 0 8 7 0.71862328 end forvalues i = 1/10 { cap areg y a b c, a(fe) vce(cl cl) di "b[a] = "_b[a] ", se[a] = " _se[a] } forvalues i = 1/10 { cap areg y c b a, a(fe) vce(cl cl) di "b[a] = "_b[a] ", se[a] = " _se[a] }
Yes, the fixed effect is nearly collinear with the cluster variable. This is not the case with the full dataset, only with the reduced testcase.
I am unsure whether the expected output has all-missing standard errors or some finite standard errors, and would appreciate feedback on that point. FWIW, -areg- (part of the time), -reg-, and -xtreg, dfadj- all report identical standard errors for regressors "a" and "b", and report the standard errors of regressor "c" as missing, or zero, or near-zero.
I reported another case of nondeterministic outputs under different conditions here. It turned out to be due to an internal unstable sort used by -xtreg-. However, to my surprise, StataCorp decided that the nondeterministic output is a feature, not a bug. It is possible that they will have the same reaction to this phenomenon.
Comment