Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: kernel density


From   "Karfakis, Panagiotis (ESAF)" <Panagiotis.Karfakis@fao.org>
To   statalist@hsphsun2.harvard.edu
Subject   RE: st: kernel density
Date   Thu, 18 Sep 2008 09:19:03 +0200

oops, I come 2nd...didnt notice that Svend'd mail answered the question
sorry!

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Karfakis,
Panagiotis (ESAF)
Sent: 18 September 2008 09:08
To: statalist@hsphsun2.harvard.edu
Subject: RE: st: kernel density


kdensity lnexp if region==1, addplot(kdensity lnexp if region==2)

best
takis



-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Svend Juul
Sent: 18 September 2008 09:03
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: kernel density



Nigussie wrote:

I am PhD student and request your assistance on this issues.  Suppose I have
two columns variable "lnexp" and "region" where lnexp is log of expenditure
(continuous) and region is a categorivsl variable; 1=Eastern region,
2=Southern region and 3= Northern region. If I want to draw kernel graphs of
"lnexp" for these regions on one chart,  what should I do on Stata 10? I need
a command. 
 
===============================================================

You can use the addplot() option, like this:

   sysuse auto.dta , clear
   kdensity weight if foreign==1 , addplot(kdensity weight if
foreign==0)

Hope this helps
Svend
__________________________________________

Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology) Vennelyst Boulevard
6 DK-8000  Aarhus C, Denmark
Phone:  +45 8942 6090
Home:   +45 8693 7796
Email:  sj@soci.au.dk __________________________________________ 

*
*   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/
*
*   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   |   What's new   |   Site index