MA V wrote:
My data is the following:
obs v1 v2
1 1 20
2 1 34
3 1 34
4 1 34
5 1 32
2 2 23
4 2 32
5 2 23
And I would like to make it look like:
obs v1 v2
1 1 20
2 1 34
3 1 34
4 1 34
5 1 32
1 2 .
2 2 23
3 2 .
4 2 32
5 2 23
How do I add the missing values? Note that I want to have the same number of
observations for each v1.
Can you help me?
--------------------------------------------------------------------------------
In general, if you're new to Stata and what you want isn't obvious from the
menu system for commands, a good place to go is the Help menu, and its Contents
submenu. It breaks things down into categories of activities that you can
progressively go through to get the command that you want, paying attention to
each category's descriptive annotation.
Following this method, you'd go along the path Help | Contents | Data
management | Data reorganization | Expand or fillin data ("add observations --
either with missings or . . .") | Rectangularize dataset | fillin
and then,
-fillin obs v1-
Joseph Coveney
*
* 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/