Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Austin Nichols <austinnichols@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: quick question |

Date |
Tue, 16 Feb 2010 18:03:44 -0500 |

Tony <Peter.Lachenbruch@oregonstate.edu> : There are many ways to go, and the optimal choice no doubt depends on what you might want to do with the data later, but try e.g. clear input str15 other "55.1" "0" "54.3" "0" "0" "55.2" "0" "0" "17.3;49.3" end g o=other if other!="0" replace o=subinstr(o,";"," ",.) g n=wordcount(o) l, noo On Tue, Feb 16, 2010 at 4:38 PM, Lachenbruch, Peter <Peter.Lachenbruch@oregonstate.edu> wrote: > I have a list of multiple diagnoses (rashes) and the typical one is quite rare. I decided to simply count the number of such diagnoses. The data look like (in the first 50 observations) > > +--------------------+ > | other_rash | > |--------------------| > 10. | 55.1 | > 11. | 0 | > 12. | 54.3 | > 13. | 0 | > 14. | 0 | > |--------------------| > 15. | 55.2 | > 16. | 0 | > 17. | 0 | > 18. | 17.3;49.3 | > 19. | 55.2 | > |--------------------| > 20. | 11.3;18.3 | > 21. | 0 | > 22. | 0 | > 23. | 0 | > 24. | 9.2;11.3;17.3 | > I would like to be able to count the number of other_rashes - I tried to find a string function that would do this count, I was unsuccessful. Am I missing something? It's not crucial as I've already done this manually, but I have several other variables to handle. * * 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/

**Follow-Ups**:**RE: st: quick question***From:*"Lachenbruch, Peter" <Peter.Lachenbruch@oregonstate.edu>

**References**:**st: quick question***From:*"Lachenbruch, Peter" <Peter.Lachenbruch@oregonstate.edu>

- Prev by Date:
**st: RE: quick question** - Next by Date:
**Re: st: quick question** - Previous by thread:
**st: RE: quick question** - Next by thread:
**RE: st: quick question** - Index(es):