Announcement

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

  • Table1 command issue

    Hello, when I write this command: table1, by (pes) vars(edad conts \ par_cat cat \ hta cat \ preprev cat \ diabm cat \ diabg cat \ imc conts) \ gadg conts \ edadpar conts ) , STATA responds "varlist required", I don't understand why?. All those variables are already created.

  • #2
    There seems a redundant space after by(), a redundant parentheses after imc conts in your code:
    Code:
    table1, by(pes) vars(edad conts \ par_cat cat \ hta cat \ preprev cat \ diabm cat \ diabg cat \ imc conts \ gadg conts \ edadpar conts)

    Comment


    • #3
      Welcome to Statalist, Pablo! Please see the Statalist FAQ for advice on how best to post questions effectively. See especially section #12, which advises providing a small extract of your data using the dataex command. Also, when citing commands that are not part of official Stata, please say so and let the reader know where the command can be installed from: here, table1 is a community-contributed command available from SSC.

      In the absence of a data extract, it is difficult to diagnose the problem you are facing.

      In particular, the issues mentioned in #2 may not lead the specific error you mention. For instance, consider

      Code:
      . sysuse auto, clear
      (1978 automobile data)
      
      . table1, by (foreign) vars(price conts \ rep78 cat ) \ mpg conts \ weight conts )
      option \ not allowed
      r(198);
      This suggests that
      • the space between by and the brackets is likely not a problem (I have noticed this before; Stata is quite forgiving of spaces between an option and its associated brackets)
      • the extra parentheses in the middle of the variable list is indeed a problem, but generates a different error
      Last edited by Hemanshu Kumar; 22 Jan 2023, 17:59.

      Comment


      • #4
        you might want to download and use Mark Chatfield's update to this which is called -table1_mc-; use search to find and download

        Comment


        • #5
          Hello!

          1) Table 1 command didn't work:

          table1, by (egdiag ) vars(edad conts \imc contn \ par_cat cat \ hta cat \ preprev cat \ diabm cate\ diabg cat \ gadg conts \ edadgpar conts )
          varlist required
          r(100);

          2) Table1_mc on the contrary worked perfect.

          Thank you very much guys !

          Comment

          Working...
          X