In that case, the rules for filling in
remain obscure. You must tell us what
they are.
Nick
[email protected]
Terra Curtis
Nick Cox
> If there is a one-to-one match between -product- and -molecule-, then
>
> bysort product (molecule) : replace molecule = molecule[_N]
> if mi(molecule)
>
> may be what you want, as the non-missing strings get sorted
> to the end of each block.
Terra Curtis
> > I have a dataset which looks like:
> >
> > Product company molecule
> > A X x1
> > A Y
> > A Z x1
> > . . .
> > . . .
> > . . .
> >
> > I have several examples of this throughout a large dataset.
> > I want to fill
> > in the missing "x1" under the molecule variable. Is there
> some way to
> > do this using -by product- ?
*
* 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/