Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • Kevin Blaine
    Participant
    Post count: 50

    Hi Dr. Shah — I ran across a Conformability Error when running mrtab with asdocx. Things work great for the following code:

    
    
    asdocx mrtab total_doses_cat, by(studgr)
    
                                      |      Study group       
                                      |    WebTIPS     WebINFO |      Total
    ----------------------------------+------------------------+-----------
    total_dose~t Total Doses Received |         95          85 |        180 
    ----------------------------------+------------------------+-----------
                                Total |         95          85 |        180 
                                Cases |         95          85 |        180 
    
    Valid cases:        180
    Missing cases:      257
    
    

    However, when I add options, I get the error:

    
    
    asdocx mrtab total_doses_cat, by(studgr) poly
    
    
                |      Study group       
                |    WebTIPS     WebINFO |      Total
    ------------+------------------------+-----------
     0                  <istmt>:  3200  conformability error
    r(3200);
    
    
    
    
    Here's some context using set trace on:
    
    [code]
    
      - di as txt %`nwidth's "`:word `j' of`response''" " " _c
      = di as txt %2s "0" " " _c
     0   - mata: mrtab_body[`ThisRow',`ThisCol'] = "`:word`j' of `response''"
      = mata: mrtab_body[2, ] = "0"
                     <istmt>:  3200  conformability error
    
    

    Any ideas?

    Attaullah Shah
    Moderator
    Post count: 76

    Hello Kevin
    The poly option was not previously supported in asdocx. I have added it now. You can update the mrtab package using the following link. Also update asdocx, then try the following example.

     net install asdocx_mrtab, from(http://fintechprofessor.com) replace
    asdocx_update
    
    * Load some example data
    . use http://fmwww.bc.edu/RePEc/bocode/d/drugs.dta
    
    * export the mrtab output with asdocx
    asdocx  mrtab inco1-inco7, include title(Sources of income)  poly by(city) replace
    
                |  City in which the interview was   
     Sources of |             conducted              
         income |      Basel        Bern      Zurich |      Total
    ------------+------------------------------------+-----------
     0       no |        348         288         336 |        972 
     1      yes |        346         284         333 |        963 
    ------------+------------------------------------+-----------
          Total |        694         572         669 |       1935 
          Cases |        348         288         336 |        972 
    
    Valid cases:        972
    Missing cases:        0
    
    Kevin Blaine
    Participant
    Post count: 50

    Thank you, Dr. Shah. I so appreciate it!

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