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 .
Best,
Johan Hellstr=F6m
>-----Original Message-----
>From: [email protected]
>[mailto:[email protected]]On Behalf Of Javier
>Bacarreza
>Sent: Tuesday, 27 March 2007 1:58 PM
>To: Stata List
>Subject: st: Filling data
>
>
>Hello,
>
>I'm working with some data and Im having problems filling some missing dat=
a
>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
>variable.
>
>I would really appreciate if you could give me a hint.
>
>All the best!
>
>J
>
>
>countryyeargini1gini2
>Argentina196143.443.4
>Argentina196243.4
>Argentina196343.4
>Argentina196443.4
>Argentina196543.4
>Argentina196643.4
>Argentina196743.4
>Argentina196843.4
>Argentina196938.138.1
>Argentina197038.1
>Argentina197138.1
>Argentina197238.1
>Argentina197338.1
>Argentina197436.736.7
>Argentina197536.7
>Argentina197636.7
>Argentina197736.7
>Argentina197836.7
>Argentina197941.341.3
>Argentina198041.3
>Argentina198141.3
>Argentina198241.3
>Argentina198341.3
>Argentina198441.3
*
* 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/