Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: grouping by time window


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: grouping by time window
Date   Mon, 13 Jun 2005 14:35:13 +0100

I am not sure this is determinate on the 
criteria given. In particular, if you 
start a first window at the first 
observation and then use the rule that 
no window can be more than a year long, 
then the windows so produced do not 
necessarily coincide with the set 
of disjoint windows that maximise the 
number of products within each, if 
indeed there is a unique set so 
defined. 

A quite different comment -- and here 
you may well have a rationale not presented -- 
is that seems a rather arbitrary way 
to reduce these data. 

Nick 
n.j.cox@durham.ac.uk 

Andre pierre
 
> I would like to create groups of observations with at least 2 
> products 
> invented within 365 days (not a civil year), by firm and 
> industry code.
> 
> obs; Firm; ic; date
> 1; 1; A; 31 dec 02
> 2; 1; A; 2 Apr 03
> 3; 1; A; 12 dec 03
> 4; 1; A; 5 jan 04
> 5; 1; A; 4 may 04
> 6; 1; B; 4 may 04
> 7; 2; A; 1 jan 01
> .
> .
> .
> 
> 
> In this example, observations 1 to 3 and 4 to 5 would correspond to a 
> "group", as the products are invented by the same firm, in 
> the same industry 
> code within 365 days. The groups have to be "successive", and not 
> "overlapping".

*
*   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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index