Zachary Rosen
Zachary Rosen

Reputation: 1

Inexplicable Negative Chow Test Result

I've been running some chow tests on some fixed effects regressions. For a lot of them (mostly when I make them poisson regressions, though some regular fixed effects regressions as well) I get negative results, which should be impossible. Does anyone have any advice or thoughts?

I'm using the following code:


% Money, Poisson

fe_green_money_p = fitglme(fixed_effects_green_data, 'Patents \~ MoneyInvested + (1|Organization)','Distribution', 'Poisson', 'DispersionFlag', true)
ssr_fe_green_money_p = sum(residuals(fe_green_money_p).^2);
observations_fe_green_money_p = size(fe_green_money_p.Variables, 1);
% fe_green_money_p.Rsquared
% fe_green_money_p_anova = anova(fe_green_money_p) % This is so I can get the F-stat
% fe_green_money_p_anova.FStat(2) % F-stat
% fe_green_money_p_anova.pValue(2) % P-value of F-stat

fe_nongreen_money_p = fitglme(fixed_effects_nongreen_data, 'Patents \~ MoneyInvested + (1|Organization)','Distribution', 'Poisson', 'DispersionFlag', true)
ssr_fe_nongreen_money_p = sum(residuals(fe_nongreen_money_p).^2);
observations_fe_nongreen_money_p = size(fe_nongreen_money_p.Variables, 1);
% fe_nongreen_money_p.Rsquared
% fe_nongreen_money_p_anova = anova(fe_nongreen_money_1) % This is so I can get the F-stat
% fe_nongreen_money_p_anova.FStat(2)
% fe_nongreen_money_p_anova.pValue(2)

fe_combined_money_p = fitglme(fixed_effects_combined_data, 'Patents \~ MoneyInvested + (1|Organization)','Distribution', 'Poisson', 'DispersionFlag', true);
ssr_fe_combined_money_p = sum(residuals(fe_combined_money_p).^2);

chow_value_fe_money_p = ((ssr_fe_combined_money_p - (ssr_fe_green_money_p +         ssr_fe_nongreen_money_p))/2) / ((ssr_fe_green_money_p +     ssr_fe_nongreen_money_p)/(observations_fe_green_money_p + observations_fe_nongreen_money_p - 4))
chow_value_fe_money_p

1 - fcdf(chow_value_fe_money_p, 2, observations_fe_green_money_p + observations_fe_nongreen_money_p - 4)

fixed_effects_combined_data is just a combination of fixed_effects_green_data and fixed_effects_nongreen_data. Is it just that you can't do a chow test with a poisson distribution? Or am I missing something?

Upvotes: 0

Views: 22

Answers (0)

Related Questions