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: R: stata question


From   "Carlo Lazzaro" <carlo.lazzaro@tiscalinet.it>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: R: stata question
Date   Thu, 10 Oct 2013 10:31:13 +0200

Rehamrizk may want to consider the following trivial example as a partial
answer to her/his thread:

...................code
begins................................................
set obs 6
g industry="agriculture" in 1/2
replace industry="automotive" in 3/4
replace industry="banking" in 5/6
g wage=1000*runiform()
encode industry, gen(industry_2)
by industry_2, sort: sum wage
...................code ends................................................

Kind regards,
Carlo


-----Messaggio originale-----
Da: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Per conto di rehamrizk
Inviato: giovedì 10 ottobre 2013 09:52
A: statalist@hsphsun2.harvard.edu
Oggetto: st: stata question

I am using stata 12
I am asking about merging two variables:The first is string and represent
economic activity of the main job (agriculture/industrial/service sectors )
and the second is the earnings of the waged employee and it is numeric...
the issue about earning variable has two variables , the net value of the
basic wage (money value) and frequency of basic wage
(day/week/month/3months/year). should I ado any conversion first ?
it ends up I want to know the wages of different sectors for example
:agriculture earns how much, industrial earns how much .....etc.



--
View this message in context:
http://statalist.1588530.n2.nabble.com/stata-question-tp7580437.html
Sent from the Statalist mailing list archive at Nabble.com.
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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