{smcl} {* 10sep2008}{...} {hi:help denscomp} {hline} {title:Title} {hi:denscomp {hline 2} Comparing density estimates in one graph} {title:Syntax} {p 8 18 2}{cmd:denscomp} [{varlist}] {ifin}{cmd:,} {opth by(varname1)} {opth at(varname2)} [{it:{help twoway_options}}] {title:Description} {p 4 4 2} {cmd:denscomp} uses {helpb kdensity} to estimite densities of {it:varname} for categories of {cmd:by()}. {title:Options} {p 4 8 2}{opt by(varname1)} is required and is used to separate density estimation for each category of {it:varname1}. {p 4 8 2}{opt at(varname2)} is required and specifies a variable that contains the values at which the density should be estimated. This option allows you to more easily obtain density estimates for different variables or different subsamples of a variable and then overlay the estimated densities for comparison. {cmd:at()} is the same for {cmd:denscomp} as it is for {cmd:kdensity}; see {manhelp kdensity R}. {title:Example} {phang} {cmd:. denscomp linc, by(edu) at(xhelp)} {title:Also see} {psee} Manual: {hi:[R] kdensity} {psee} Online: {manhelp kdensity R} {p_end}