📄 twoway__kdensity_gen.hlp
字号:
{smcl}
{* 10mar2005}{...}
{cmd:help twoway__kdensity_gen}{right:also see: {help undocumented}}
{hline}
{title:Title}
{p 4 30 2}
{hi:twoway__kdensity_gen} {hline 2} twoway kdensity subroutine
{title:Syntax}
{p 8 12 2}
{cmd:twoway__kdensity_gen}
{it:varname}
[{it:weight}]
[{cmd:if} {it:exp}]
[{cmd:in} {it:in_range}]
{cmd:,}{break}
{cmdab:r:ange:(}{it:range}{cmd:)}{break}
[
{cmd:n(}{it:#}{cmd:)}
{cmdab:w:idth:(}{it:#}{cmd:)}
{cmd:area(}{it:#}{cmd:)}
{cmdab:gen:erate:(}{it:yvar} {it:xvar} [, {cmd:replace} ]{cmd:)}
{it:kernel_names}
]
{pstd}
{cmd:fweight}s and {cmd:aweight}s are allowed; see {help weights}.
{title:Description}
{pstd}
{cmd:twoway__kdensity_gen} was written to help in parsing and generating
variables for {cmd:graph twoway kdensity}, see {helpb twoway kdensity}.
{title:Options}
{phang}
{cmd:range(}{it:range}{cmd:)} specifies the range of values for {it:xvar}.
Here {it:range} can be a pair of numbers identifying the minimum and maximum,
or {it:range} can be a variable. If {it:range} is a variable, the range is
determined by the values of {cmd:r(min)} and {cmd:r(max)} after
{pmore}
{cmd}. summarize {it:range} if {it:exp} in {it:in_range}, meanonly{text}
{phang}
{cmd:n(}{it:#}{cmd:)} specifies the number of evaluation points. The default
is {cmd:n(1)}.
{phang}
{cmd:width(}{it:#}{cmd:)} specifies the smoothing parameter. This is the same
{cmd:width()} option as for {cmd:kdensity}, see {helpb kdensity}.
{phang}
{cmd:area(}{it:#}{cmd:)} specifies the area adjustment. The number is multiplied with
the kernel density estimates when {it:yvar} is generated. The default value
is {cmd:area(1)}.
{phang}
{cmd:generate(}{it:yvar} {it:xvar} [{cmd:,} {cmd:replace}]{cmd:)} specifies
the names of the variables to generate. The grid of values is placed in
{it:xvar}, and kernel density estimates are placed in {it:yvar}. The
{cmd:replace} option indicates that these variables may be replaced if they
already exist.
{phang}
{it:kernel_names} are the names for kernel weight functions accepted by
{cmd:kdensity}. Only one kernel may be specified, see {helpb kdensity}.
{title:Saved results}
{pstd}
{cmd:twoway__kdensity_gen} saves in {cmd:r()}:
{pstd}
Scalars:
{cmd:r(n)} number of evaluation points
{cmd:r(min)} minimum of {cmd:range()}
{cmd:r(max)} maximum of {cmd:range()}
{cmd:r(delta)} distance between grid points
{cmd:r(area)} area multiplier
{cmd:r(width)} smoothing parameter
{pstd}
Macros:
{cmd:r(varname)} {it:varname}
{cmd:r(range)} {it:range} from {cmd:range(}{it:range}{cmd:)} option
{cmd:r(kernel)} name of kernel used to compute density estimates
{title:Also see}
{psee}
Online:
{helpb twoway kdensity},
{helpb kdensity}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -