This file is part of IDEAS, which uses RePEc data


[ Papers | Articles | Software | Books | Chapters | Authors | Institutions | JEL Classification | NEP reports | Search | New papers by email | Author registration | Rankings | Volunteers | FAQ | Blog | Help! ]

Three-Valued Logic Operations in Stata

Author info | Abstract | Publisher info | Download info | Related research | Statistics
Author Info
David Kantor () (Institute for Policy Studies, Johns Hopkins University)

Additional information is available for the following registered author(s):

Abstract

Stata uses numeric quantities as logical values, and provides logical operators (&, |, ~) to build expressions from basic entities. These operators can be regarded as faulty when missing values are present in the operands. In this context, missing is equivalent to true, which is often not the desired result. Instead, one may want to obtain the maximal set of nonmissing results for all combinations of operand values, while preserving the behavior of the operators on two-valued operands -- in other words, one should adopt three-valued logic. I have developed a set of egen functions that provide this capability. As such, they can only do one type of operation at a time, so that complex expressions would need to be built in stages. But they can be a great help when you wish to generate indicator variables and want the maximal set of nonmissing results.

Download Info
To download:

If you experience problems downloading a file, check if you have the proper application to view it first. Information about this may be contained in the File-Format links below. In case of further problems read the IDEAS help file. Note that these files are not on the IDEAS site. Please be patient as the files may be large.

File URL: http://fmwww.bc.edu/RePEc/nasug2001/tvl05.txt
File Format: text/plain
File Function:
Download Restriction: no

Publisher Info
Paper provided by Stata Users Group in its series North American Stata Users' Group Meetings 2001 with number 5.2.

Download reference. The following formats are available: HTML, plain text, BibTeX, RIS (EndNote), ReDIF
Length:
Date of creation: 15 Jan 2001
Date of revision:
Handle: RePEc:boc:asug01:5.2

Contact details of provider:
Postal: Administration Building, 140 Commonwealth Avenue, Chestnut Hill MA 02467
Phone: 617-552-3670
Fax: 617-552-2308
Email:
Web page: http://www.stata.com/meeting/1nasug
More information through EDIRC

For technical questions regarding this item, or to correct its listing, contact: (Christopher F Baum).

Related research
Keywords:

Statistics
Access and download statistics

Did you know? IDEAS was launched in September 1997.

This page was last updated on 2009-1-4.


This information is provided to you by IDEAS at the Department of Economics, College of Liberal Arts and Sciences, University of Connecticut using RePEc data on a server sponsored by the Society for Economic Dynamics.