You are not logged in. You can browse but not post. Login or Register by clicking 'Login or Register' at the top-right of this page. For more information on Statalist, see the FAQ.
What commands would be needed to create this table
I want to create a mean randomization check table for a RCT. Basically I want to generate a table like the one shown below but, I don't know what commands to run to describe the difference in the mean of my categorical variables.
I can't give you specific commands to help you, I'm afraid. For a table like that I would be more apt to create the table in Excel using putexcel.
I would question the motive of having the difference column with testing at all. Randomization ensures, on the long-run average, that factors known and unknown are balanced. So one expects similar but never exactly equal characteristics between groups, except by chance. One would also expect any test of imbalance to fail, except for a number of false positives at the nominal significance level of the test. In other words, it doesn't serve a useful purpose that can't be served by looking at each group individually.
Well I guess what I really wanted was to generate a table with the means for the categorical variables before treatment, after treatment, and the difference between those means. I try using ttest but I can't seem to generate the table
Regards
--------------------------------------------------
Attaullah Shah, PhD.
Professor of Finance, Institute of Management Sciences Peshawar, Pakistan FinTechProfessor.com https://asdocx.com
Check out my asdoc program, which sends outputs to MS Word.
For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.
ASDOC (I got ASDOCX) is really helpful for table generation. If the OP has Stata 17 the collect, table, etable, and related commands are very powerful for generating tables. There are some tutorials but there is a distinct learning curve. In medical research the CONSORT guidelines explicitly recommend against statistically testing baseline differences between treatment groups in RCTs. If the randomization has been done correctly and if the work in the field is faithful to the protocol, then differences are attributable to chance. And typically there are numerous comparisons in these kinds of tables so the likelihood of finding a "significant" difference on some comparison variable is considerable. Doesn't stop reviewers from requesting those tests. And conventions in other fields might be different.
Comment