Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: On command "table": how to avoid blank cells after summation


From   Jeph Herrin <junk@spandrel.net>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: On command "table": how to avoid blank cells after summation
Date   Sun, 27 Aug 2006 11:28:18 -0400

Try the option -missing-

. table AREA YEAR, c(sum var1) by(CAT) format(%8.0f) missing

hth,
Jeph

FUKUGAWA, N. wrote:
Dear all,
I compute summation of one variable as follows.

. table AREA YEAR, c(sum var1) by(CAT) format(%8.0f)

          | 1983  1984  1985  1986  1987  1988  1989  1990  1991
        1 |    4    32     7     6    17    44    46    34     5
        2 |                     10           8     2

        3 |               14     4                       7


By default, cell is left blank if no observation is found (for
instance, YEAR==1983 and AREA==2).
I would like to avoid blank cells in the table and have a table
as follows.

          | 1983  1984  1985  1986  1987  1988  1989  1990  1991
        1 |    4    32     7     6    17    44    46    34     5
        2 |    .     .     .    10     .     8     2     .     .
        3 |    .     .    14     4     .     .     .     7
               .

Thank you in advance.
---
FUKUGAWA Nobuya, Ph.D.
nfukugawa@gmail.com

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index