corrgram.hlp
来自「是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到」· HLP 代码 · 共 260 行
HLP
260 行
{smcl}
{* 09mar2005}{...}
{cmd:help corrgram}, {cmd:help ac}, {cmd:help pac}{...}
{right:dialogs: {bf:{dialog corrgram}} {bf:{dialog ac}} {bf:{dialog pac}}}
{hline}
{title:Title}
{p2colset 5 22 24 2}{...}
{p2col:{hi:[TS] corrgram} {hline 2}}Tabulate and graph autocorrelations{p_end}
{p2colreset}{...}
{title:Syntax}
{phang}Autocorrelations, partial autocorrelations, and Portmanteau (Q) statistics
{p 8 25 2}
{cmd:corrgram}
{varname}
{ifin}
[{cmd:,} {it:{help corrgram##corrgram_options:corrgram_options}}]
{phang}Graph of autocorrelations
{p 8 25 2}
{cmd:ac}{space 6}
{varname}
{ifin}
[{cmd:,} {it:{help corrgram##ac_options:ac_options}}]
{phang}Graph of partial autocorrelations
{p 8 25 2}
{cmd:pac}{space 5}
{varname}
{ifin}
[{cmd:,} {it:{help corrgram##pac_options:pac_options}}]
{marker corrgram_options}{...}
{synoptset 25 tabbed}{...}
{synopthdr:corrgram_options}
{synoptline}
{syntab:Main}
{synopt:{opt l:ags(#)}}calculate {it:#} autocorrelations{p_end}
{synopt:{opt nopl:ot}}suppress character-based plots{p_end}
{synopt:{opt yw}}calculate partial autocorrelations using Yule-Walker equations{p_end}
{synoptline}
{marker ac_options}{...}
{synopthdr:ac_options}
{synoptline}
{syntab:Main}
{synopt:{opt lag:s(#)}}calculate {it:#} autocorrelations{p_end}
{synopt:{opth gen:erate(newvar)}}generate a variable to hold the
autocorrelations; implies {opt nograph}{p_end}
{synopt:{opt l:evel(#)}}set confidence level; default is {cmd:level(95)}{p_end}
{synopt:{opt fft}}calculate autocorrelation using Fourier transforms{p_end}
{syntab:Plot}
INCLUDE help gr_markopt
{p2col:{it:{help line_options}}}change look of dropped lines{p_end}
{syntab:CI plot}
{synopt:{opth ciop:ts(area_options)}}affect rendition of the
confidence bands{p_end}
{syntab:Add plot}
{synopt:{opth "addplot(addplot_option:plot)"}}add other plots to the generated
graph{p_end}
{syntab:Y-Axis, X-Axis, Title, Caption, Legend, Overall}
{synopt:{it:{help twoway_options}}}any options other than {opt by()} documented in
{bind:{bf:[G] {it:twoway_options}}}
{p_end}
{synoptline}
{marker pac_options}{...}
{synopthdr:pac_options}
{synoptline}
{syntab:Main}
{synopt:{opt lag:s(#)}}calculate {it:#} partial autocorrelations{p_end}
{synopt:{opth gen:erate(newvar)}}generate a variable to hold the
partial autocorrelations; implies {opt nograph}{p_end}
{synopt:{opt srv}}include standardized residual variances in graph{p_end}
{synopt:{opt yw}}calculate partial autocorrelations using Yule-Walker equations{p_end}
{synopt:{opt l:evel(#)}}set confidence level; default is {cmd:level(95)}{p_end}
{syntab:Plot}
INCLUDE help gr_markopt
{p2col:{it:{help line_options}}}change look of dropped lines{p_end}
{syntab:CI plot}
{synopt:{opth ciop:ts(area_options)}}affect rendition of the
confidence bands{p_end}
{syntab:SRV plot}
{synopt:{opth srvop:ts(marker_options)}}affect rendition of
the plotted standardized residual variances (SRVs){p_end}
{syntab:Add plot}
{synopt:{opth "addplot(addplot_option:plot)"}}add other plots to the generated
graph{p_end}
{syntab:Y-Axis, X-Axis, Title, Caption, Legend, Overall}
{synopt:{it:{help twoway_options}}}any options other than {opt by()} documented in
{bind:{bf:[G] {it:twoway_options}}}{p_end}
{synoptline}
{p 4 6 2}
You must {opt tsset} your data before using {opt corrgram}, {opt ac}, or
{opt pac}; see {helpb tsset}. In addition, the time series must be dense
(nonmissing and no gaps in the time variable) in the sample if you specify the
{opt fft} option.
{p_end}
{p 4 6 2}
{it:varname} may contain time-series operators; see {help tsvarlist}.
{title:Description}
{pstd}
{opt corrgram} produces a table of the autocorrelations, partial
autocorrelations, and Portmanteau (Q) statistics. It also displays a
character-based plot of the autocorrelations and partial autocorrelations and
partial autocorrelations. See {helpb wntestq} for more information on the Q
statistic.
{pstd}
{opt ac} produces a correlogram (a graph of autocorrelations) with pointwise
confidence intervals based on Bartlett's formula for MA(q) processes.
{pstd}
{opt pac} produces a partial correlogram (a graph of partial autocorrelations)
with confidence intervals calculated using a standard error of 1/sqrt(n). The
residual variances for each lag may optionally be included on the graph.
{title:Options}
{dlgtab:Main}
{phang}
{opt lags(#)} specifies the number of autocorrelations to calculate. The
default is to use min([n/2]-2,40) where [n/2] is the greatest integer less
than or equal to n/2.
{phang}
{opt noplot} prevents the character-based plots from being in the listed table
of autocorrelations and partial autocorrelations.
{phang}
{opth generate(newvar)} specifies a new variable to contain the
autocorrelation ({opt ac} command) or partial autocorrelation ({opt pac}
command) values. This option is required if the {opt nograph} option is
used.
{pmore}
{opt nograph} (implied when using {opt generate()} in the dialog box)
prevents {opt ac} and {opt pac} from constructing a graph. This option
requires the {opt generate()} option.
{phang}
{opt srv} ({opt pac} only) specifies that the standardized residual variances
be plotted with the partial autocorrelations. {opt srv} cannot be used if
{opt yw} is used.
{phang}
{opt yw} specifies that the partial autocorrelations be calculated using the
Yule-Walker equations instead of using the default regression-based
technique. {opt yw} cannot be used if {opt srv} is used.
{phang}
{opt level(#)} specifies the confidence level, as a percentage, for the
confidence bands in the {opt ac} or {opt pac} graph. The default is
{cmd:level(95)} or as set by {opt set level}; see {help level}.
{phang}
{opt fft} ({opt ac} only) specifies that the autocorrelations be calculated
using two Fourier transforms. This technique can be faster than simply
iterating over the requested number of lags.
{dlgtab:Plot}
{phang}
{it:marker_options}, {it:marker_label_options}, and {it:line_options} affect
the rendition of the plotted autocorrelations (with {cmd:ac}) or partial
autocorrelations (with {cmd:pac}).
{phang2}
{it:marker_options}
specify the look of markers plotted at the data correlation points. This
look includes the marker symbol, the marker size, its color and outline;
see {it:{help marker_options}}.
{phang2}
{it:marker_label_options}
specify if and how the markers are to be labeled;
see {it:{help marker_label_options}}.
{phang2}
{it:line_options}
specify the look of the dropped lines, including pattern, width, and
color; see {it:{help line_options}}.
{dlgtab:CI plot}
{phang}
{opth ciopts(area_options)} affect the rendition of the confidence
bands; see {it:{help area_options}}.
{dlgtab:SRV plot}
{phang}
{opth srvopts(marker_options)} affect the rendition of the plotted
standardized residual variances; see {it:{help marker_options}}. This
option implies the {opt srv} option.
{pmore}
SRVs are available only with {cmd:pac}.
{dlgtab:Add plot}
{phang}
{opth "addplot(addplot_option:plot)"} adds specified plots to the generated
graph; see {it:{help addplot_option}}.
{dlgtab:Y-Axis, X-Axis, Title, Caption, Legend, Overall}
{phang}
{it:twoway_options} are any of the options documented in
{it:{help twoway_options}}, excluding {opt by()}. These include options
for titling the graph (see {it:{help title_options}}) and saving the graph
to disk (see {it:{help saving_option}}).
{title:Examples}
{cmd:. gen x = invnorm(uniform())}
{cmd:. gen t = _n}
{cmd:. tsset t}
{cmd:. corrgram x, lags(20)}
{cmd:. ac x, lags(10)}
{cmd:. pac x}
{cmd:. corrgram air, lags(20)}
{cmd:. ac air, lags(20)}
{cmd:. pac DS12.air, lags(20)}
{cmd:. pac DS12.air, lags(20) srv}
{title:Also see}
{psee}
Manual: {bf:[TS] corrgram}
{psee}
Online: {helpb tsset}, {helpb pergram}, {helpb wntestq}
{p_end}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?