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]

Re: st: problems with posting

From   Marcello Pagano <>
Subject   Re: st: problems with posting
Date   Tue, 07 Sep 2010 17:19:19 -0400

Your posts look fine.

On 9/7/2010 5:05 PM, Vassilopoulos Achilleas wrote:
And this can keep going on forever... any ideas why my posts seem not to
like ENTER????
I just saw that also my "corrected" post appeared the same way...


-----Original Message-----
[] On Behalf Of Vassilopoulos
Sent: 07 September, 2010 23:53
Subject: st: RE: problem with commands

Sorry, I've just found out that some lines in my previous post did not
appeared separated so I thought I should repost.

I think this is what you're looking for :


gen firstsic_sub=int(sic_sub/100)
gen firstsic_moth=int(sic_mother/100)
gen twosic_sub=int(sic_sub/10)
gen twosic_moth=int(sic_mother/10)

capture erase new.dta
tempname new
postfile `new' str10 id_mother year double diver using new

levelsof year_inc_sub, local(levels)
foreach y of local levels {

count if (year_inc_sub<=`y')&  (firstsic_moth!=firstsic_sub)
scalar digit=r(N)
count if year_inc_sub<=`y'
scalar total=r(N)
scalar a=scalar(digit)*3/scalar(total)
count if (year_inc_sub<=`y')&  (firstsic_moth==firstsic_sub)
scalar digit2=r(N)
scalar b=scalar(digit2)*2/scalar(total)
count if (year_inc_sub<=`y')&  (twosic_moth==twosic_sub)
scalar digit3=r(N)
scalar c=scalar(digit3)*1/scalar(total)
scalar all=scalar(a)+scalar(b)+scalar(c)

post `new' ("X") (`y') (scalar(all))
scalar drop all digit total

postclose `new'
use new, clear
sort year

Hope this helps,
_____________ - _______________

Achilleas Vassilopoulos

Agricultural University of Athens,
Dept. of Agricultural Economics and Rural Development, Lab. of Political
Economy and European Integration.
Iera Odos 75, 11855, Athens, Greece

Tel: (+30) 210-5294726
Fax: (+30) 2105294786
Email :

*   For searches and help try:
*   For searches and help try:

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