Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Gabriel Nicolás Michelena <hmg@mrecic.gov.ar> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: repeating first x values |
Date | Mon, 12 Sep 2011 14:55:21 -0300 (ART) |
thanks a lot! ----- Mensaje original ----- De: "Nick Cox" <njcoxstata@gmail.com> Para: statalist@hsphsun2.harvard.edu Enviados: Lunes, 12 de Septiembre 2011 13:04:19 Asunto: Re: st: repeating first x values bysort id (alpha) : replace alpha = alpha[1] will work with your example. See also FAQ . . . . . . . . . . . . . . . . . . . . . . . Replacing missing values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . N. J. Cox 2/03 How can I replace missing values with previous or following nonmissing values? http://www.stata.com/support/faqs/data/missing.html 2011/9/12 Gabriel Nicolás Michelena <hmg@mrecic.gov.ar>: > I will be specifc. I have this dataset > > alpha id id2 > .00474 1 1 > .00062 2 1 > .035085 3 1 > .035085 4 1 > .035665 5 1 > . 1 2 > . 2 2 > . 3 2 > . 4 2 > . 5 2 > > > and i want to replace the missing values in alpha (in id2=2) repeating > the values of variable alpha in id=1 > > some clue how can i do it? > * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/ -- Lic. Gabriel Michelena Centro de Economía Internacional Ministerio de Relaciones Exteriores, Comercio Internacional y Culto Esmeralda 1212 - 2° Piso - Oficina 201 Ciudad Autónoma de Buenos Aires. ( C100 7ABR ) Argentina Tel: (+5411) 4819-7000. Interno 7485 Fax: (+5411) 4819-7484 URL: http://www.cei.gob.ar/ E-mail: hmg@mrecic.gov.ar * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/