Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: creating a table of own design

From   Jason Park <>
Subject   st: creating a table of own design
Date   Mon, 9 Dec 2013 13:00:06 +0800

Dear all users,

Not being perfectly familiar with the Stata's programing language, I'm
struggling doing some easy stuff that could easily be done in other
languages. Please forgive me if I'm asking about too basic a thing
that most of you already know.

I got to the point where I can generate some figures that I need in a
do file, and now I want to tabulate them.
Suppose the local variables those figures are saved in are a and b.
My intention is to present a table looking like below (not necessarily
with the broken lines though or the header):
a       1.2345
b       1.1234

So far, I tried to create a matrix containing strings, A and B, and
another matrix with the figures, and join side by side, which didn't
work anyhow.
The faulty code I wrote is:
     mat A = ("a"\"b")
     mat B = (`a'\`b')
     mat C = A,B
     mat list C
It seems that the first line is returning an error. Neither does A =
("a"\"b") work.

Could someone give me some tips? It will be greatly appreciated if
someone suggests a better way of tabulation, but if not, it will also
be equally appreciated if someone helps me get my code to work.

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index