table1 - not much code

table1 - not much code

by Sarah Goldberg -
Number of replies: 3

Because I'm using table1 for demographics, I feel like I do not have much code for my table. Three questions:

1) Should I include all of my cleaning up code? I did quite a bit to clean it up, but once it was clean I just could do the one table1 command and my table was complete.

2) Do we need to convert to a matrix after creating a table1?

3) Can I change the colors of cells directly on word and change the aesthetic appeal of my table (after I export it to excel and copy to word)?

In reply to Sarah Goldberg

Re: table1 - not much code

by Amanda Irish -
1) Up to you! It's allowed but not required. If you do include, please carefully denote where your table/graph commands start in your do-file. If the cleaning code is long, please also include the line # in a comment at the top where the TA should start grading.

2) No, table1 exports directly to Excel without the need to convert the output to a matrix.

3) Yes, any additional formatting can be done in Word.
In reply to Amanda Irish

Re: table1 - not much code

by Sarah Goldberg -
Thanks, I just have one line of code to display for my table technically so I'm just worried. I'm doing a demographics table, so I just have:

table1_mc, vars(agecat cat\ sex cat\ gender cat\ race cat\ ethnicity cat\ income cat\ education cat) by(hospitalized) format(%2.1f) total(before)

I was wondering if this was ok? I don't work with the matrix function at all.

Also, I was wondering if there was a way to get rid of the p-values?
In reply to Sarah Goldberg

Re: table1 - not much code

by Amanda Irish -
That's fine - no need to use a matrix function for full credit or anything.

I look a look at the help file for table1_mc and there does not appear to be a way to get rid of the p-values. It's fine to do as we were talking about in the other thread and just not include them in your final table in word, but as a best practice recommendation I would include a comment in your do-file about anything the command produces that you end up not including.