Home Forums ASDOC : Easy Publication Quality Tables in Stata additional regression statistics error

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • Jur
    Guest
    Post count: 118

    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

    Attaullah Shah
    Keymaster
    Post count: 69

    Thanks for reporting this. Turns out that the R2 statistic is causing this problem. R2 is the default statistic and if another R2 is entered, it causes the error. For time being, you can drop R2. I shall update asdoc to handle this error.

    sysuse auto, clear
    asdoc reg price mpg rep78 headroom i.foreign , robust replace nest ///
        drop(i.foreign ) cnames(Pooled OLS) save(Regressions1) /// 
        add(Time Dummy, YES) font(Times New Roman) fs(10) dec(4) ///
        stat(N, df_m, df_r, F) 
    
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.