Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Originally posted by Wei Chen Einstein View Post
    Hi,
    I tried the table1_mc command as suggested after installing the program, but received the error Invalid 'Chen". 'Chen' is my last name. I cannot figure out what the problem is. Help, please! Thanks!

    Wei

    . sysuse auto, clear
    (1978 Automobile Data)

    . generate much_headroom = (headroom>3)

    . table1_mc, by(foreign) vars(price conts \ price contln %5.0f %4.2f \ weight contn %5.0f \ rep78 cate \ much_headroom bine)
    invalid 'Chen'
    r(198);

    If Ruth-Alma's suggestion doesn't fix it, you probably have to run the command with

    Code:
    set trace on
    to trace where the error occurs. See a similar thread for potentially how to diagnose and fix the issue.

    https://www.statalist.org/forums/for...rror-diagnosis

    Comment


    • #32
      Wei
      I'm sorry, I have no idea why you are getting that error message. No one has ever told me of such a message before. Possibly this may be helpful to diagnose:
      . set more on
      then re-run your commands
      Email me the output if you like.
      BW,
      Mark

      Comment


      • #33
        Originally posted by Wei Chen Einstein View Post
        Hi,
        I tried the table1_mc command as suggested after installing the program, but received the error Invalid 'Chen". 'Chen' is my last name. I cannot figure out what the problem is. Help, please! Thanks!

        Wei

        . sysuse auto, clear
        (1978 Automobile Data)

        . generate much_headroom = (headroom>3)

        . table1_mc, by(foreign) vars(price conts \ price contln %5.0f %4.2f \ weight contn %5.0f \ rep78 cate \ much_headroom bine)
        invalid 'Chen'
        r(198);
        Hi Wei,

        Did you resolve this? Using table1_mc for the first time and I am having a similar problem. I believe it is due to a space in my directory path (\Fiona IMPROVE\Bisphos\Bladder), and getting 'invalid 'IMPROVE' as my error (the first string after a space in a folder name). Other than changing my folder names to have no spaces, is there another solution? I am using Stata 16.0.

        Fiona

        Comment


        • #34
          Originally posted by Fiona Caristo View Post

          Hi Wei,

          Did you resolve this? Using table1_mc for the first time and I am having a similar problem. I believe it is due to a space in my directory path (\Fiona IMPROVE\Bisphos\Bladder), and getting 'invalid 'IMPROVE' as my error (the first string after a space in a folder name). Other than changing my folder names to have no spaces, is there another solution? I am using Stata 16.0.

          Fiona
          Resolved following contact with Mark Chatfield. Solution is to change to a directory without spaces in any folder names.
          Fiona

          Comment


          • #35
            Thank you! Better than table1! Hope table1_mc could show statistics like chi-square value, t value.

            Comment


            • #36
              Thanks, Mark. table1_mc is a great update to table1. Could you please add a function that could allow us to add the statistics, such as t value, chisq value. Thank you!

              Comment


              • #37
                Originally posted by Ruth-Alma Turkson-Ocran View Post
                On another note, I am using tabxml in Stata 14.2 and trying to do another Table 1 by sex. When using variations of this code:

                Code:
                 tabxml, ivc(age_p) ivd(sex_r married racreci3 edu_cat poor2 emp_stat notcov usupl) order(age_p sex_r racreci3 married edu_cat poor2 emp_stat notcov usupl) save("/location_filename_$datentime") split(sex_r) options(n per) display bold justify(c) pval sp
                I keep getting errors such as: "invalid subpop() option" when I try using the subcond option. I also get this error:

                Code:
                Table contains a zero in the marginals.
                Statistics cannot be computed.
                conformability error
                r(503);
                when I use this code:

                Code:
                 tabxml, ivc(age_p) ivd(sex_r married racreci3 edu_cat poor2 emp_stat notcov usupl) order(age_p sex_r racreci3 married edu_cat poor2 emp_stat notcov usupl) save("/location_filename_$datentime") split(sex_r) options(n per) display bold justify(c) pval sp
                What am I doing wrong?
                Hi, it seems tabxml can not output p value for continuous variables? Right?

                Comment


                • #38
                  Hi Ruth & Mark,

                  I am using "tabsml" in Stata 18.0. While using the following code,

                  Code:
                  tabxml, dv(new_depression) ivd(female marital2 age_cat new_ethnicity education smoke ever_alc income_c pa obesity) percent(row) save(table1) tf(2) chi2 display bold justify(r) pval sp
                  I have estimated n for each category of the independent categorical variables at the population level. However, I'm interested in knowing the number of observations for those categories at the sample level. Am I missing something here?

                  Comment


                  • #39
                    Hi Bhaskar,

                    I haven't been successful in getting the observations for each category. Even using the labrown or labcoln options you see in the help documentation for tabxml. (If anyone has figured that out please let me know how it works)

                    What I usually do, and I don't believe fully answers your question is to find the column weighted or unweighted Ns using syntax like this:

                    Code:
                    svy, subpop(if dropped_depression==0): tab new_depression, obs format(%12.0g) //unweighted number and proportion  
                    svy, subpop(if dropped_depression==0): tab new_depression, count format(%12.0g) //weighted number and proportion
                    note dropped_depression is a variable that includes those who are either generally included or excluded from your analysis

                    Comment

                    Working...
                    X