Home Forums ASDOC : Easy Publication Quality Tables in Stata How to report p-values in asdoc nested table

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

    First of all thank you so much for creating this wonderful tool!

    I want to ask if it is possible to report the p values instead of Standard Error in the nested table. I understand that the *** stars are meant to measure the significance level but I wonder if the p value itself can be visualized in the table.

    Thank you so much. I truly appreciate it.

    Attaullah Shah
    Keymaster
    Post count: 69

    I updated asdoc today to add support for reporting p-values in the nested regression tables. You can now use the option rep(p) to report p-values. rep() option can also be used to report either :

    1. t-values using                 rep(t)
    2. standard errors using   rep(se)
    3. p-values with using         rep(p)

    The new version of asdoc can be installed from my site. Copy and paste the following line in Stata and press enter.
    net install asdoc, from(http://fintechprofessor.com) replace

    Please note that the above line has to be copied in full. After installation of the new version, then restart Stata.

    Following is an example of a nested table with p-values

    *Use auto dataset in our example
    sysuse auto, clear
    
    *First regression of the nested table
    asdoc reg price mpg rep78, nest rep(p) replace
    
    *Second regression, this time I am not using the option replace. 
    asdoc reg price mpg rep78 trunk , nest rep(p)
    
    *And one more regression
    asdoc reg price  rep78 trunk , nest rep(p)
    
    * Following is the output table
    

    reporting p-values in nested regression table of asdoc in Stata

    Please do remember to cite asdoc. To cite:
    In-text citation
    Tables were created using asdoc, a Stata program written by Shah (2018).

    Bibliography
    Shah, A. (2018). ASDOC: Stata module to create high-quality tables in MS Word from Stata output. Statistical Software Components S458466, Boston College Department of Economics.

    Connor
    Guest
    Post count: 118

    Professor, the nest function is reporting errors after the update.

    func_nested_reg():  3001  expected 25 arguments but received 29
                     <istmt>:     -  function returned error

    which didn’t occur before using the same code.

    Attaullah Shah
    Keymaster
    Post count: 69

    It seems to me your previous installation still resides somewhere on your system. To completely uninstall all instances of asdoc, please do the following.

    You should first uninstall asdoc completely using the following code, then reinstall asdoc and then restart your Stata.

    net install uninstall_asdoc, from(http://fintechprofessor.com) replace
    
    uninstall_asdoc
    
    *And then install asdoc again
    net install asdoc, from(http://fintechprofessor.com) replace
    Christopher
    Guest
    Post count: 118

    Thank you so much for creating this! I have my table outputting p-values now (thanks!) but I am not longer able to control how many decimals I receive in the output. I want 3 but am only getting 2. I’ve tried using dec(3) and tzok. Is there something about this new version that I should know when trying to specify decimals for my regression output?

    Attaullah Shah
    Keymaster
    Post count: 69

    Christopher
    I just checked it and the dec() option works fine. Perhaps, after updating asdoc, the old macros were still in the memory, please restart Stata and check again. Or perhaps, you may like to reinstall asdoc

    The new version of asdoc can be installed from my site. Copy and paste the following line in Stata and press enter.

    net install asdoc, from(http://fintechprofessor.com) replace 

    Please note that the above line has to be copied in full. After installation of the new version, then restart Stata.

    Please do remember to cite asdoc. To cite:
    In-text citation
    Tables were created using asdoc, a Stata program written by Shah (2018).

    Bibliography
    Shah, A. (2018). ASDOC: Stata module to create high-quality tables in MS Word from Stata output. Statistical Software Components S458466, Boston College Department of Economics.

    Christopher
    Guest
    Post count: 118

    Wonderful! Thank you. I got it to work with OLS. However, when I’m using a logit model, asdoc is pulling in the z-score and not p-values. Am I doing something wrong?

    Katie R.
    Guest
    Post count: 118

    I came to this thread to see if i could add p-values to my nested tables. It wasn’t working, so I uninstalled then reinstalled the program, closed and restarted STATA. Asdoc will not work at all now (oh no!). It tells me “command asdoc not defined by asdoc.do”. Can you assist? Thank you for the program!

    Attaullah Shah
    Keymaster
    Post count: 69

    Sometimes this happens due to incomplete transfer of files from the server. The new version of asdoc can be installed from my site. Copy and paste the following line in Stata and press enter.
    net install asdoc, from(http://fintechprofessor.com) replace

    Please note that the above line has to be copied in full. After installation of the new version, then restart Stata.

    asdocx is now avaialble
    A more powerful and flexible version of asdoc is now available. I call it asdocx. You may like to check the details here

    Please do remember to cite asdoc. To cite:

    In-text citation
    Tables were created using asdoc, a Stata program written by Shah (2018).

    Bibliography
    Shah, A. (2018). ASDOC: Stata module to create high-quality tables in MS Word from Stata output. Statistical Software Components S458466, Boston College Department of Economics.

    Katie R.
    Guest
    Post count: 118

    Thank you! It is now working again. However, rep(p) won’t work. I can get rep(t) and rep(se) to work, but not rep(p). The command will run, but p values display in the table. Any suggestions? Thank you for your time.

    Katie R.
    Guest
    Post count: 118

    As an update to the last post, when I input rep(p), I get the z values in the tables rather than the p values.

    Thanks again.

    Attaullah Shah
    Keymaster
    Post count: 69

    Please post your code to reproduce the error.

    Katie R.
    Guest
    Post count: 118

    asdoc xtreg y x, re robust, nest rep(p) replace

    The numbers in paratheses are z values rather than p values. The p-value should be .068

    Table : Regression results
    (1)
    Example Y
    Example X -248373.700*
    (-1.827)

    _cons -2546170.801
    (-1.496)
    Observations 161
    r2_p .z

    p-values are in parentheses
    *** p<.01, ** p<.05, * p<.1

    Thank you again!

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