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 at the end of May, and its replacement, statalist.org 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 <pagano@hsph.harvard.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: problems with posting
Date   Tue, 07 Sep 2010 17:19:19 -0400

Your posts look fine.
m.p.

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

Thanks,

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Vassilopoulos
Achilleas
Sent: 07 September, 2010 23:53
To: statalist@hsphsun2.harvard.edu
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 : avassilopoulos.aua@gmail.com



*
*   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/
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index