Statalist The Stata Listserver

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

st: RE: Filling data

From   =3D?iso-8859-1?Q?Johan_Hellstr=3DF6m?=3D <>
To   <>
Subject   st: RE: Filling data
Date   Tue, 27 Mar 2007 10:57:33 +0200

I am not sure what you want to do? Do you have observations with some gaps
as in Gini2 and want to fill in the missing values as in Gini1? If this is
the case, you can start with creating a time variable that covers all the
years you are interested in, called for example 'year', thereafter type:

fillin country year
sort country year
gen gini1=3Dgini2
by country(year), sort: replace gini1=3D gini1[_n-1] if gini1>=3D .

Johan Hellstr=F6m

>-----Original Message-----
>[]On Behalf Of Javier
>Sent: Tuesday, 27 March 2007 1:58 PM
>To: Stata List
>Subject: st: Filling data
>I'm working with some data and Im having problems filling some missing dat=
>have data as follows, and want to fill the missing data as I did in the
>example below (gini2). Given that the time period between available
>observations is not regular its quite complicated to create the gini2
>I would really appreciate if you could give me a hint.
>All the best!

*   For searches and help try:

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