Announcement

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

  • Ruth-Alma Turkson-Ocran
    replied
    Thank you. For number 2, I just did the following:

    table1_mc if immig_status==1, by (sex) vars(age contn \ marital_stat cat \ race cat \ education cat \ income cat \) onecol
    table1_mc if immig_status==0, by (sex) vars(age contn \ marital_stat cat \ race cat \ education cat \ income cat \) onecol

    These gave me two different tables which were exported into excel and I then manually filled the table above by copying and pasting side by side into one excel sheet to look like the sample table above.

    Leave a comment:


  • Mark Chatfield
    replied
    Hi Ruth
    1. table1_mc is an extension and improvement on table1. For more, type . viewsource table1_mc.ado
    2. You would need to use either command twice.

    Leave a comment:


  • Ruth-Alma Turkson-Ocran
    replied
    Thanks Mark, I have a couple more follow up questions:

    1. What are the differences/advantages of using the table1_mc command/option over the older table1 command? and

    2. Is there a way using either command to stratify by more than one variable e.g. when using: by(varname) and not by(var1 var2). For example, I used the following code to stratify by immigrant status:

    table1, by (immig_status) vars(age contn \ sex bin \ marital_stat cat \ race cat \ education cat \ income cat \) onecol

    However, I would like to stratify by both immigrant status and sex. (see table below) What would be the best way to go about this? Any suggestions for/modifications to the above code to be able to do this?


    Click image for larger version

Name:	Screen Shot 2018-03-29 at 1.16.53 AM.png
Views:	1
Size:	38.5 KB
ID:	1436624

    Leave a comment:


  • Rich Goldstein
    replied
    of the various use-written commands in this area, I believe that only -meantab- accepts pweights; whether it also does everything else you want, I'm not sure; use -search- to find and download

    Leave a comment:


  • Mark Chatfield
    replied
    Hi Ruth, fweights are allowed ... which would only help with the simplest survey data. That's all I'm afraid.

    Leave a comment:


  • Ruth-Alma Turkson-Ocran
    replied
    Is there a way to use this command or the older Table1 command on survey data (e.g. with the svy command) We desperately need that

    Leave a comment:


  • Rasool Baloch
    replied
    Hi Mark,

    I have looked the code and tried to add option table(before|after) is not working. I think this option is not implemented. In addition it should be helpful if the each factors N (denominator) will be added in the same table after each variable instead of a separate table.

    Leave a comment:


  • Andrew Lover
    replied
    Hi Mark- looks great! Any plans for adding support for the -svy- prefix, as it's a lapse for all the options?

    Leave a comment:


  • Mark Chatfield
    replied
    Of course, the output does in reality look much nicer than that in my first post...
    Click image for larger version

Name:	output for Statalist.png
Views:	1
Size:	26.9 KB
ID:	1399400

    Leave a comment:

Working...
X