Site icon Stata.Professor : Your Partner in Research

additional regression statistics error

Dear Dr. Shah, First of all, thank you for writing the fantastic asdoc program! I have a question regarding the option of adding additional statistics to the output file. Unfortunately, Stata returns an error after I specified the stat() that I want to apply. I confirmed via 'ereturn list' that the scalars I want to add are stored. After I tried several combinations of scalars with mixed success but it is not yet clear what goes wrong. After certain scalars as 'N' or 'df_m', Stata returns the r(3301) error code. My code was:
asdoc reg $ylist $xlist i.YrQ2, robust replace nest drop(i.YrQ2) ///
cnames(Pooled OLS) save(Regressions1) add(Time Dummy, YES) font(Times New Roman) fs(10) ///
dec(4) stat(N, df_m, df_r, F, r2)`
       func_nested_reg():  3301  subscript invalid
                 <istmt>:     -  function returned error
r(3301); 
Is there a solution to the issue? Or are certain scalars not permitted in the program? Sincerely, Jur
Exit mobile version