Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ddof in regression, and use-t #285

Open
josef-pkt opened this issue May 27, 2012 · 3 comments
Open

ddof in regression, and use-t #285

josef-pkt opened this issue May 27, 2012 · 3 comments

Comments

@josef-pkt
Copy link
Member

xtgls invest mvalue kstock, corr(ar1) FGLS for timeseries-cross-section

estimates scale = ssr / nobs instead of ssr / (nobs - k_vars)

and reports z-values, i.e. normal distribution based

xtregar with re reports z-values and chi2, with fe it reports t-values and F

In PanelAR1, I have the same params (using the same rho as stata) but bse and cov_params differ because the scale is normalized in a different way.
I'm returning a OLS regression, the same would be with GLS.

In the documentation for another estimator (don't remember which), Stata has a user option to use nobs or (nobs - k_vars) as denominator in the scale calculation, referring to Greene that both cases are used and no clear advantage to either one.

-> need a possibility to change ddof for scale, e.g. ssr / (nobs - k_vars - ddof) with possibility to set ddof = - k_vars
-> need possibility to switch between t and normal distribution (and f and t) use_t as in summary.

(I thought I opened already an issue for ddof with pre-estimation removal of groups means for fixed effects models, but didn't find it.)

@josef-pkt josef-pkt modified the milestones: 0.7, 0.6 Sep 20, 2014
@josef-pkt
Copy link
Member Author

for cluster robust standard errors, I needed to introduce df_resid_inference
In another case in Stata I have seen something like df_resid_var the df that are used in calculating the scale.
R also has in several places (???) different df, e.g. specifically for an F-test.

There are several related issues open. Until now we only have a case specific pattern, except for our old standard definitions.
For example sandwich robust covariances still need streamlining of the different options for df and denominator corrections.

@josef-pkt
Copy link
Member Author

BTW: use_t is now generically implemented.

@josef-pkt josef-pkt modified the milestones: 0.8, 0.7 Feb 6, 2015
@josef-pkt
Copy link
Member Author

Note: this is different from ddof for absorbed variables, e.g. demeaned exog and endog. See #2568 and #2774

The issue here mainly affects the cov_params which is now handled through cov_type arguments. AFAIR, that includes now a generic scaling factor.

@jseabold jseabold removed this from the 0.8 milestone Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants