Statalist The Stata Listserver

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

Re: st: Data management

From   Kyle Hood <>
Subject   Re: st: Data management
Date   Tue, 24 Oct 2006 19:36:10 -0400 (EDT)


If all the variables that are constant across years, just use the duplicates drop command. If some of the variables are identified by country and year, use the collapse command

collapse (mean) x1 x2 x3 ... , by( countryid )

with a dataset this size, there should be no problems at all.


On Tue, 24 Oct 2006, wrote:


I have a (panel) dataset for around 100 countries for a period of 15 years (on average) and I have the average values of some variables that are same for all the years. I am trying to reduce the data to a single year for each country and the "drop in" command for each country seems to be too repetitive and labor-intensive. Can someone suggest another way in which I can get the data for a single year for every country?

* For searches and help try:

*   For searches and help try:

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