asdocx : Easy, yet extremely flexible program for publication quality tables in Stata Forums asdocx Forum asdocx is returing error after nested regression table

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • Aduba Joseph
    Participant
    Post count: 20

    Hello,
    For the past two days, I have been receiving errors for running my nested regression codes that previously run smoothly. Could you fix the error? I have updated my asdocx again and again but it doesn’t fix anything. See the error below.

    N p rmse
    asdocx_func_nested_reg(): 3301 subscript invalid
    <istmt>: – function returned error

    Dr. Attaullah Shah
    Keymaster
    Post count: 106

    Please post code that can replicate the said error.

    Jaemin Lee
    Participant
    Post count: 17

    I get the same error when using newey:

    sysuse dir
    sysuse tsline1, clear

    tsset lag
    asdocx newey2 ar ma, lag(12) nest reset

    Jaemin Lee
    Participant
    Post count: 17

    I do not get the error if I use regression:
    e.g., asdocx reg ar ma, nest reset

    Dr. Attaullah Shah
    Keymaster
    Post count: 106

    I cannot replicate the mentioned error

    sysuse tsline1, clear
    
    tsset lag
    asdocx newey2 ar ma, lag(12) nest 
    asdocx newey2 ar ma, lag(12) nest 
    
      
                                 Table: Regression results
      0 |1                                        2                     3 
    ----+--------------------------------------------------------------------
      1 |                                       (1)                   (2) 
    ----+--------------------------------------------------------------------
      2 |                                        ar                    ar 
      3 |ma                                   0.014                 0.014 
      4 |                                   (0.418)               (0.418) 
      5 |_cons                             2.127***              2.127*** 
      6 |                                   (0.255)               (0.255) 
      7 |Observations                           200                   200 
    -------------------------------------------------------------------------
    Click to Open File:  C:\temp\Test.docx
    
    Aduba Joseph
    Participant
    Post count: 20

    Hello, I apologize for my late response. I was out of office.
    Here is the code:
    . asdocx xtreg lnCt1 $xvar1 i.Code, save(electricity) dec(4) drop(i.Code) stat(r2_o, p, rmse) fs(8) font(Time
    > s New Roman) nest table_layout(autofit)

    Aduba Joseph
    Participant
    Post count: 20

    More details on the error
    *******************************

    . asdocx xtreg lnCt1 $xvar1 i.Code, save(electricity) dec(4) drop(i.Code) stat(r2_o, p, rmse) ///
    fs(8) font(Times New Roman) nest table_layout(autofit) 
    
    (File C:\Users\aduba\Documents\electricity.docx already exists, option append was assumed)
    
    Random-effects GLS regression                   Number of obs     =        368
    Group variable: Code                            Number of groups  =         23
    
    R-sq:                                           Obs per group:
         within  = 0.0000                                         min =         16
         between = 0.0000                                         avg =       16.0
         overall = 0.5360                                         max =         16
    
                                                    Wald chi2(23)     =     397.45
    corr(u_i, X)   = 0 (assumed)                    Prob > chi2       =     0.0000
    
    ------------------------------------------------------------------------------
           lnCt1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
         lnCECO1 |  -.0874609   .0043871   -19.94   0.000    -.0960594   -.0788624
                 |
            Code |
            100  |  -.1351784   .0242108    -5.58   0.000    -.1826308    -.087726
            110  |  -.1199651   .0240083    -5.00   0.000    -.1670206   -.0729097
            120  |  -.2122487   .0255643    -8.30   0.000    -.2623539   -.1621435
            130  |  -.2599124   .0266488    -9.75   0.000    -.3121432   -.2076817
            140  |  -.0579446    .023423    -2.47   0.013    -.1038528   -.0120364
            150  |  -.1126462   .0239189    -4.71   0.000    -.1595265    -.065766
            160  |   .0349076   .0233078     1.50   0.134    -.0107749    .0805901
            170  |  -.1594233   .0245792    -6.49   0.000    -.2075976    -.111249
            180  |  -.0207647   .0232653    -0.89   0.372    -.0663638    .0248344
            190  |  -.1408127   .0242915    -5.80   0.000    -.1884232   -.0932022
            200  |  -.4476466   .0323168   -13.85   0.000    -.5109864   -.3843068
            210  |   -.039265   .0233253    -1.68   0.092    -.0849817    .0064517
            220  |   .0605097   .0234393     2.58   0.010     .0145695    .1064499
            230  |  -.0422053   .0233382    -1.81   0.071    -.0879473    .0035367
            240  |   -.044981   .0233512    -1.93   0.054    -.0907486    .0007865
            250  |  -.0166696    .023257    -0.72   0.474    -.0622524    .0289133
            270  |  -.1764147   .0248695    -7.09   0.000     -.225158   -.1276713
            280  |   .0215529   .0232671     0.93   0.354    -.0240498    .0671555
            290  |  -.0558859   .0234104    -2.39   0.017    -.1017694   -.0100023
            300  |  -.1518346    .024458    -6.21   0.000    -.1997714   -.1038978
            310  |   .0289156   .0232872     1.24   0.214    -.0167264    .0745577
            320  |  -.2088303   .0254934    -8.19   0.000    -.2587965   -.1588641
                 |
           _cons |   5.769152   .0829038    69.59   0.000     5.606663     5.93164
    -------------+----------------------------------------------------------------
         sigma_u |          0
         sigma_e |  .06573818
             rho |          0   (fraction of variance due to u_i)
    ------------------------------------------------------------------------------
    N  r2_o p rmse
    asdocx_func_nested_reg():  3301  subscript invalid
                     <istmt>:     -  function returned error
    r(3301);
    
    Dr. Attaullah Shah
    Keymaster
    Post count: 106

    Hello Aduba Joesph
    This issue has been fixed, please update asdocx

    asdocx_update
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.