Bookmark and Share

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, is already up and running.

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

st:Creating a variable from overlapping intervals

From   Nanlesta Pilgrim <>
Subject   st:Creating a variable from overlapping intervals
Date   Wed, 29 Dec 2010 23:13:40 -0500

Dear Statalist,

My apologies for this very simple coding question.  While I know what
to do conceptually, I appear to get lost in the coding.
I am trying to determine if the participants in my study have
concurrent sexual relationships.  For each partner of the participant,
I have the number of days(or months or years) ago they first and last
had sex with that partner.  I am attempting to write a code to create
one variable that would use all that information to tell me if the
partnership is concurrent.

Essentially:  If the first sex month (or first sex & last sex) of
partner 2 occurs within the first and last sex months of partner 1,
then newvariable=1

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index