I can't make suggestions on this information, unless
it is to
. fillin pid wave
. sort pid wave
Nick
[email protected]
[email protected]
> Dear Nick, sorry but I'm reading the second email now, but
> also I make
> the change not function however.:(
Quoting Nick Cox <[email protected]>:
> > Sorry for a typo. Otherwise the solution to this different
> > problem is tacit in my reply.
> >
> > by pid : gen work7 = emplo == 7 & work[8] != 1
[email protected]
> >
> >> > The length of study is 8 years. If the
> >> > period of work was 7 years without a
> >> > break, then there are only two possibilities:
> >> > the person did not work in the first year
> >> > or the person did not work in the last year.
> >>
> >> YES I WANT ONLY 1 POSSIBILITY NOT WORK LAST YEAR
> >>
> >> > by pid : egen emplo = count(work == 1)
> >> > by pid : gen work7 = count == 7 & (work[1] != 1 | work[8] != 1)
> >>
> >> I PUT EMPLO TO PLACE COUNT==7 (I don't have results if I
> put count==7)
> >>
> >> but don't work. Because when I tab work7 I have obs in the wave 8
> >> (work7==1), and is not correct in the wave 8 I want only work7==0.
> >> my squence is 11111110
> >>
> >> thank you very much
> >>
> >> > Nick
> >> > [email protected]
> >> >
> >> > [email protected]
> >> >
> >> >> I have a question about how calculate the number of years
> >> >> work continuously.
> >> >> I have a panel of 8 year and I want calculated the person how
> >> >> has work
> >> >> for 7 years no stop. (1111110)
> >> >> I used this procedure:
> >> >> by pid : egen emplo=count(work==1)
> >> >> here work is=1 if work. after I did the tab emplo and I have
> >> >> the table
> >> >> for 8 years.
> >> >> but there aredifferente sequence how 0111111, or
> 1011111 ecc and I
> >> >> want only 1111110.
> >> >>
> >> >> for ex: 1011111 but is incorrect
> >> >> pid emplo wave work
> >> >> 1 7 1 1
> >> >> 1 7 3 1
> >> >> 1 7 4 1
*
* 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/