Statalist


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

st: how to insert rows in tables


From   "FUKUGAWA, N." <[email protected]>
To   [email protected]
Subject   st: how to insert rows in tables
Date   Sun, 20 Jan 2008 12:51:31 +0900

Dear all,
I have a dataset that has several blank cells represented as
period (.) and generated tables as follows.

year	cat	var1
1950	1	.
1950	1	.
1950	2	3
1960	1	7
1960	2	1
1960	2	5

bys year: table cat , c(mean var1)

Stata returns;

year = 1950
cat	
2	3

year = 1960
cat	
1	7	
2	3

The results of cat==1 if year==1950 is unreported since
observations are blank.
Here, I would like all the tables to retain the same number of rows.
Namely,

year = 1950
cat	var1
1	.
2	3

year = 1960
cat	var1
1	7	
2	3

How can I do this using Stata 9?
Thank you in advance.
---
FUKUGAWA Nobuya, Ph.D.
[email protected]
See my works at www.ssrn.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/



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