sergiocorreia/reghdfe

[BUG] attempt to use standardized variables in a regression, get "r 3498 stdevs are missing"

Closed this issue · 7 comments

  1. Hi Sergio, I'm using the latest version as indicated and my Stata is up to date (SE 16.1 28apr2020)
    OS Windows 10.

I am trying to run of a non-standardized y-variable on 2 standardized x variables, the interaction of the 2 standardized x variables (c.x1#c.x2), and several non-standardized control variables. I expected to see the usual reghdfe regression output (which I get without standardizing the x variables), but instead get this:

     _assert_abort():  3498  stdevs are missing; is N==1?
        assert_msg():     -  function returned error

reghdfe_standardize(): - function returned error
FixedEffects::_partial_out(): - function returned error
FixedEffects::partial_out(): - function returned error
: - function returned error

Can you please shed some light on this case? Thank you.

Can you show me a minimum working example; perhaps something with toy data that I can replicate over here?

Thanks!

Thanks for your prompt reply Sergio! It worked with dummy data and this helped me identify a mistake in my code.
Apologies for the misreported bug; I'm new to Stata (and Github).

Hi sergio
I try to use ivreghdfe.

my code is:
ivreghdfe SD_Invest SD_CF (NCOMBANKER=CRISIS CRCF) lag_Q QCF Firm_size FSCF SD_board_size BSCF board_Indep BICF MBoTenure MBoTenCF,absorb(i.fyear##c.Cash_Flow i.ff_48##c.Cash_Flow) cluster(gvkey) first savefirst savefprefix(s1)

But received the follwing errors:

_assert_abort(): 3498 stdevs are missing; is N==1?
assert_msg(): - function returned error
reghdfe_standardize(): - function returned error
FixedEffects::_partial_out(): - function returned error
FixedEffects::partial_out(): - function returned error
: - function returned error
r(3498);

Could you please teach me how to fix this error?

Hi Aimee, I wouldn't know what's wrong without looking at the data. If you can share an example it would be very useful

Thanks sergio.

This is my data link
https://github.com/Aimeeli847/Aimeeli/blob/master/exercise1.dta

My code is:
ivreghdfe SD_Invest SD_CF lag_Q QCF Firm_size FSCF SD_board_size BSCF board_Indep BICF MBoTenure MBoTenCF (NCOMBCF NCOMBANKER=CRISIS CRCF),absorb(fyear##c.Cash_Flow ff_48##c.Cash_Flow) cluster(gvkey) first savefirst savefprefix(s1)

My aim is to:

  1. use CRISIS CRCF to instrument NCOMBCF NCOMBANKER
  2. include fyear##c.Cash_Flow ff_48##c.Cash_Flow as fixed effects
  3. get a 2 stage 2SLS.

But I received errors like:
_assert_abort(): 3498 stdevs are missing; is N==1?
assert_msg(): - function returned error
reghdfe_standardize(): - function returned error
FixedEffects::_partial_out(): - function returned error
FixedEffects::partial_out(): - function returned error
: - function returned error
r(3498);

could you help me figure out why?

Thanks and regrads.

bztxb commented

I came across this problem when using command 'rifhdreg' in Stata16MP. However, I still cannot find the solution! Hope someone helps!