Forum Replies Created

Viewing 15 posts - 46 through 60 (of 76 total)
  • Author
    Posts
  • Attaullah Shah
    Moderator
    Post count: 76

    I quickly checked the help file of mixed and did not find any stored results for the random effects parameters. If this is the case, it is hard to report them using asdocx.

    Attaullah Shah
    Moderator
    Post count: 76

    I have added support for stored estimates now. Instead of using regress, use replay to replay the stored estimates. Please update and try the following example

    asdocx_update
    

    Example of detailed regression

    sysuse auto.dta, clear
    regress price mpg headroom trunk displacement
    estimates save results, replace
    clear
    estimates use results
    asdocx replay, replace save(detailed.html)
    Linear regression
    Variables Coef. Std. Err. t-value p-value [95% Co Interval] Sig
    mpg -124.512 75.153 -1.66 0.102 -274.438 25.414
    headroom -789.532 471.188 -1.68 0.098 -1729.525 150.462 *
    trunk 66.222 106.529 0.62 0.536 -146.298 278.742
    displacement 11.935 4.884 2.44 0.017 2.191 21.678 **
    Constant 7914.615 2701.779 2.93 0.005 2524.713 13304.518 ***
    Mean dependent var SD dependent var .
    R-squared Number of obs 74.000
    F-test Prob > F 0.000
    Akaike crit. (AIC) Bayesian crit. (BIC) 1386.274
    Notes: *** p<.01, ** p<.05, * p<.1

    Example of nested regression

    sysuse auto.dta, clear
    regress price mpg headroom trunk displacement
    estimates save results, replace
    clear
    estimates use results
    asdocx replay, replace save(Nested.html) nest
    Table: Regression results
    (1)
    Variables price
    mpg -124.512
    (75.153)
    headroom -789.532*
    (471.188)
    trunk 66.222
    (106.529)
    displacement 11.935**
    (4.884)
    Intercept 7914.615***
    (2701.779)
    Observations 74
    R2 0.303
    Notes: Standard errors are in parentheses. *** p<.01, ** p<.05, * p<.1
    Attaullah Shah
    Moderator
    Post count: 76

    Hello Johnathan
    I have added the mentioned plots to asdocx. Please update asdocx.

    Attaullah Shah
    Moderator
    Post count: 76

    I have fixed the svy and sem related issue, to update, type

    asdocx_update, beta mlib

    You may also like options tzok and table_layout(auto). The fist one reports equal number of decimal places for all values. The second one yields a tight fit for the table in the given page width.

    asdocx svy jackknife: sem (Resil->values, ) (Resil->vary_solut, ) ///
    (Resil->empeffort, )(Resil->emp_fast,), ///
    method(mlmv) latent (Resil) nocapslatent ///
    replace table_layout(auto) tzok
    
    
    
    Attaullah Shah
    Moderator
    Post count: 76

    Thanks for reporting this. I have added the lowess command to asdocx. The updates are still in beta version, therefore, to update, type

    asdocx_update, beta mlib
    Attaullah Shah
    Moderator
    Post count: 76

    Dear Dr Kumar
    There is a major update to the table1 template. Now it can report any number of categories of the treatment variable. You may find more details on this page https://asdocx.com/documentations/creating-and-working-with-asdocx-template-files/table1-template-for-baseline-characteristics-of-patients-asdocx/#11 (on the given page, move to this section Multiple categories of the treatvar).

    Attaullah Shah
    Moderator
    Post count: 76

    Hello Jessica
    asdocx license is machine-specific. The license works only on a PC/Mac for which the license was generated. The license is based on the information generated by the aslic program. Since, you have shifted to a new PC, you need a new license. As per FAQs, license works fine if you re-install your operating system or move to a new version of Stata. As a goodwill gesture, I shall create a new license for your new PC. Please install aslic and run it.

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

    It will generate few lines on the Stata screen, email those lines to me.

    Attaullah Shah
    Moderator
    Post count: 76

    Suhail Sayed
    The stcrprep is a community contributed package. I checked it and did not find any output after running it. Can you please elaborate what do you expect from including it to asdocx?

    Attaullah Shah
    Moderator
    Post count: 76

    Wa Alaikum Assalam
    Dear Suhail Sayed
    Thanks for your appreciation and kind words. You can change the file name using the save() option. So, you want to save the results in a word file name Summary Statistics, an example would be

    asdocx sum, save(Summary Statistics.docx)

    or in an excel file,

    asdocx sum, save(Summary Statistics.xlsx)

    You can also specify folder, say paper1. (If the folder does not exist, asdocx will create it. Also, if you specify several nested folders, asdocx checks each one of them and create them if they do not exist)

    mkdir paper1
    asdocx sum, save(paper1/summary statistics.docx) replace
    Attaullah Shah
    Moderator
    Post count: 76

    Hello Jose
    asdocx creates a string matrix in Mata. That matrix is available for modification and re-export using the flexmat package, that is part of asdocx. See this example

    Attaullah Shah
    Moderator
    Post count: 76

    This is possible with flexmat. I encourage you to invest an hour or less on flexmat, and shall have the freedom to make sophisticated tables. Here is a starting blog post https://asdocx.com/flexmat-create-flexible-tables-in-stata-mata/. Let me show an example for creating your desired table.

     sysuse auto , clear 
     loc NextRow 2 
     flexmat reset 
     flexmat addrow , data(Variable , Obs , Mean , Std. dev. , Min , Max) row(1)
     
     foreach var in price mpg trunk {
       sum `var' if `var' != 999
       flexmat addrow , data(`r(N)',`r(mean)',`r(sd)', `r(min)',`r(max)' ) row(`NextRow') dec(3) 
       loc ++NextRow 
      } 
     asdocx export
    Table: Results
    Variable Obs Mean Std. dev. Min Max
    price 74 6165.257 2949.496 3291 15906
    mpg 74 21.297 5.786 12 41
    trunk 74 13.757 4.277 5 23
    Notes:
    Attaullah Shah
    Moderator
    Post count: 76

    I forgot to change a macro in the table1 template, this is why dec() and dect() had no effect on the output. I have fixed that. You can update to the beta version and test it. To update, please type:

    asdocx_update, beta mlib

    Here is an example where I would like to report 4 dp for the p-values and 1 dp for the percentages.

    asdocx  tabulate diabetes i.agegrp ,  template(table1) ///
     col dec(1) dect(1) replace 
    Table 1: Demographics
    Variables Not diabetic (n=9850) Diabetic (n = 499) Total (10349) P-value
    Age group 0.0000
    20–29
    2305 (23.4%) 15 (3.0%) 2320 (22.4%)
    30–39
    1600 (16.2%) 21 (4.2%) 1621 (15.7%)
    40–49
    1229 (12.5%) 42 (8.4%) 1271 (12.3%)
    50–59
    1219 (12.4%) 72 (14.4%) 1291 (12.5%)
    60–69
    2622 (26.6%) 238 (47.7%) 2860 (27.6%)
    70+
    875 (8.9%) 111 (22.2%) 986 (9.5%)
    P-values by t-test for continuous variables and Chi2 test for binary/categorical variables.
    Attaullah Shah
    Moderator
    Post count: 76

    On your request, I have now added support for estat teffects sub-command. The full syntax and examples are discussed on this page https://asdocx.com/table-of-direct-indirect-and-total-effects-after-sem-word-excel-latex-stata/
    It is being released in the beta version of asdocx, therfore, first you need to run this code to get the beta version

    asdocx_update, beta mlib
    Attaullah Shah
    Moderator
    Post count: 76

    I have now added xttab to asdocx, here is an example

     * Load example data
     webuse nlswork
     
     xtset idcode year
     
     * use xttab with asdocx
     asdocx xttab race
     
    race Overall Between Overall
    value Freq Percent Freq Percent Percent
    white 20180 70.723 3329 70.664 100
    black 8051 28.215 1325 28.126 100
    other 303 1.062 57 1.21 100
    Total 28534 100 4711 100 100
    Notes:
    Attaullah Shah
    Moderator
    Post count: 76

    In the nested regressions, you can add any statistics that is available in the e() macro. This is documented in the help file of asdocx, type help asdocx and then browse to the section 4.10 , you shall find the relevant details and example. Here is one example. Since the log likelihood is reported in the e(ll) macro, we need to add the option stat(ll).

     webuse rod93 , clear
     generate logexp=ln(exposure)
     asdocx nbreg deaths i.cohort , exposure(exp) nest stat(ll)
    Table: Regression results
    (1)
    deaths
    1b.cohort
    2.cohort -0.268
    (0.724)
    3.cohort -0.457
    (0.724)
    Intercept -2.087***
    (0.512)
    /lnalpha 0.594**
    (0.258)
    Observations 21
    Pseudo R2 0.002
    ll -131.38
    Notes: \iStandard errors are in parentheses. *** p<.01, ** p<.05, * p<.1
Viewing 15 posts - 46 through 60 (of 76 total)