POLMETH Archives

Political Methodology Society

POLMETH@LISTSERV.WUSTL.EDU

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Barry C. Burden" <[log in to unmask]>
Reply To:
Political Methodology Society <[log in to unmask]>
Date:
Mon, 30 Oct 2006 15:59:19 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (34 lines)
I am trying to write some if/then statements in Stata that depend on the
value of a string variable.  The trouble is that variable contains names
that are not always spelled the same way or written out fully.  For
example, in one observation the name is written as "Hoover, Herbert" but
in another observation it has been shortened to "Hoover, Herb."  To
capture both of these possibilities I would like to tell Stata to recode
if y=="Hoov*" or some such thing.  Unfortunately, the user guide isn't
clear about the use of wildcards with string variables and my own
experiments have failed.  Perhaps this is a better question for the
Stata users list, but I thought another political scientist who has
worked with strings might be able to come through with a solution.

Barry



----------------------------------------
Barry C. Burden
University of Wisconsin
Department of Political Science
http://mywebspace.wisc.edu/bcburden/web/

**********************************************************
             Political Methodology E-Mail List
        Editor: Karen Long Jusko <[log in to unmask]>
**********************************************************
        Send messages to [log in to unmask]
  To join the list, cancel your subscription, or modify
           your subscription settings visit:

          http://polmeth.wustl.edu/polmeth.php

********************************************************** 

ATOM RSS1 RSS2