📄 lowess.hlp
字号:
{smcl}
{* 08mar2005}{...}
{cmd:help lowess}{right:dialog: {bf:{dialog lowess}}}
{hline}
{title:Title}
{p2colset 5 19 21 2}{...}
{p2col :{hi:[R] lowess} {hline 2}}Lowess smoothing{p_end}
{p2colreset}{...}
{title:Syntax}
{p 8 16 2}
{cmd:lowess} {it:{help varname:yvar}} {it:{help varname:xvar}} {ifin}
[{cmd:,} {it:options}]
{synoptset 25 tabbed}{...}
{synopthdr}
{synoptline}
{syntab :Main}
{synopt :{opt m:ean}}running-mean smooth; default is running-line
least-squares{p_end}
{synopt :{opt now:eight}}suppress weighted regressions; default is tricube
weighting function{p_end}
{synopt :{opt bw:idth(#)}}use {it:#} for the bandwidth; default is
{cmd:bwidth(0.8)}{p_end}
{synopt :{opt lo:git}}transform dependent variable to logits{p_end}
{synopt :{opt a:djust}}adjust smoothed mean to equal mean of dependent
variable{p_end}
{synopt :{opt nog:raph}}suppress graph{p_end}
{synopt :{opth gen:erate(newvar)}}create {it:newvar} containing smoothed values
of {it:yvar}{p_end}
{syntab :Scatterplot}
INCLUDE help gr_markopt2
{syntab :Smoothed line}
{synopt :{opth lineop:ts(cline_options)}}affect rendition of the smoothed line{p_end}
{syntab :Add plot}
{synopt :{opth "addplot(addplot_option:plot)"}}add other plots to generated graph{p_end}
{syntab :Y-Axis, X-Axis, Title, Caption, Legend, Overall, By}
{synopt :{it:{help twoway_options}}}any of the options documented in
{bind:{bf:[G]} {it:twoway_options}}{p_end}
{synoptline}
{p2colreset}{...}
{p 4 6 2}{it:yvar} and {it:xvar} may contain time-series operators; see
{help tsvarlist}.
{title:Description}
{pstd}
{cmd:lowess} carries out a locally weighted regression of {it:yvar} on
{it:xvar}, displays the graph, and optionally saves the smoothed variable.
{pstd}
Warning: {cmd:lowess} is computationally intensive and may therefore
take a long time to run on a slow computer. Lowess calculations on 1,000
observations, for instance, require performing 1,000 regressions.
{title:Options}
{dlgtab:Main}
{phang}
{opt mean} specifies running-mean smoothing; the default is running-line
least-squares smoothing.
{phang}
{opt noweight} prevents the use of Cleveland's tricube weighting function; the
default is to use the weighting function.
{phang}
{opt bwidth(#)} specifies the bandwidth. Centered subsets of
{opt bwidth()}*N observations are used for calculating smoothed values
for each point in the data except for end points, where smaller, uncentered
subsets are used. The greater the {opt bwidth()}, the greater the smoothing.
The default is 0.8.
{phang}
{cmd:logit} transforms the smoothed {it:yvar} into logits. Predicted values
less than .0001 or greater than .9999 are set to 1/N and 1-1/N, respectively,
before taking logits.
{phang}
{opt adjust} adjusts the mean of the smoothed {it:yvar} to equal the mean of
{it:yvar} by multiplying by an appropriate factor. This is useful when
smoothing binary (0/1) data.
{phang}
{opt nograph} suppresses displaying the graph.
{phang}
{opth generate(newvar)} creates {it:newvar} containing the smoothed values of
{it:yvar}.
{dlgtab:Scatterplot}
INCLUDE help gr_markoptf
{dlgtab:Smoothed line}
{phang}
{opt lineopts(cline_options)} affect the rendition of the lowess-smoothed
line; see {it:{help cline_options}}.
{dlgtab:Add plot}
{phang}
{opt addplot(plot)} provides a way to add other plots to the generated graph.
See {it:{help addplot_option}}.
{dlgtab:Y-Axis, X-Axis, Title, Caption, Legend, Overall, By}
{phang}
{it:twoway_options} are any of the options documented in
{it:{help twoway_options}}. These include options for titling the graph
(see {it:{help title_options}}), options for saving the graph to disk (see
{it:{help saving_option}}), and the {opt by()} option (see
{it:{help by_option}}).
{title:Examples}
{phang}{cmd:. lowess h1 depth}{p_end}
{phang}{cmd:. lowess h1 depth, bwidth(.4)}
{phang}{cmd:. lowess foreign mpg, ylabels(0 "Domestic" 1 "Foreign") jitter(5) adjust}{p_end}
{phang}{cmd:. lowess foreign mpg, logit yline(0)}
{title:Also see}
{psee}
Manual: {bf:[R] lowess}
{psee}
Online: {helpb graph}, {helpb ipolate}, {helpb kdensity}, {helpb smooth}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -