Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: problems with posting


From   "Vassilopoulos Achilleas" <[email protected]>
To   <[email protected]>
Subject   st: problems with posting
Date   Wed, 8 Sep 2010 00:05:43 +0300

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...

Thanks,

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Vassilopoulos
Achilleas
Sent: 07 September, 2010 23:53
To: [email protected]
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 :

cd "YOUR_DIRECTORY"

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 : [email protected] 



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index