滚动窗口回归(stata)

上传人:小** 文档编号:62920411 上传时间:2018-12-23 格式:PDF 页数:8 大小:160.85KB
返回 下载 相关 举报
滚动窗口回归(stata)_第1页
第1页 / 共8页
滚动窗口回归(stata)_第2页
第2页 / 共8页
滚动窗口回归(stata)_第3页
第3页 / 共8页
滚动窗口回归(stata)_第4页
第4页 / 共8页
滚动窗口回归(stata)_第5页
第5页 / 共8页
点击查看更多>>
资源描述

《滚动窗口回归(stata)》由会员分享,可在线阅读,更多相关《滚动窗口回归(stata)(8页珍藏版)》请在金锄头文库上搜索。

1、T rolling Rolling-window and recursive estimation SyntaxMenuDescriptionOptions Remarks and examplesStored resultsAcknowledgmentReferences Also see Syntax rolling ? exp list ? ? if ? ? in ? ? , options ? : command optionsDescription Main window(#) number of consecutive data points in each sample recu

2、rsiveuse recursive samples rrecursiveuse reverse recursive samples Options clearreplace data in memory with results saving(fi lename,.) save results to fi lename; save statistics in double precision; save results to fi lename every # replications stepsize(#)number of periods to advance window start(

3、time constant)period at which rolling is to start end(time constant)period at which rolling is to end keep(varname?, start ?) save varname along with results; optionally, use value at left edge of window Reporting nodotssuppress replication dots noisilydisplay any output from command tracetrace comm

4、ands execution Advanced reject(exp)identify invalid results window(#) is required. You must tsset your data before using rolling; see TStsset. aweights are allowed in command if command accepts aweights; seeU 11.1.6 weight. exp list contains(name: elist) elist eexp elist containsnewvar = (exp) (exp)

5、 eexp isspecname eqnospecname specname isb 1 2rolling Rolling-window and recursive estimation b se se eqno is# name exp is a standard Stata expression; seeU 13 Functions and expressions. Distinguish between , which are to be typed, and ?, which indicate optional arguments. Menu StatisticsTime series

6、Rolling-window and recursive estimation Description rolling is a moving sampler that collects statistics from command after executing command on subsets of the data in memory. Typing . rolling exp list, window(50) clear: command executes command on sample windows of span 50. That is, rolling will fi

7、 rst execute command by using periods 150 of the dataset, and then using periods 251, 352, and so on. rolling can also perform recursive and reverse recursive analyses, in which the starting or ending period is held fi xed and the window size grows. command defi nes the statistical command to be exe

8、cuted. Most Stata commands and user-written programs can be used with rolling, as long as they follow standard Stata syntax and allow the if qualifi er; seeU 11 Language syntax . The by prefi x cannot be part of command. exp list specifi es the statistics to be collected from the execution of comman

9、d. If no expressions are given, exp list assumes a default ofb if command stores results in e() and of all the scalars if command stores results in r() and not in e(). Otherwise, not specifying an expression in exp list is an error. Options ? ? Main? window(#) defi nes the window size used each time

10、 command is executed. The window size refers to calendar periods, not the number of observations. If there are missing data (for example, because of weekends), the actual number of observations used by command may be less than window(#). window(#) is required. recursive specifi es that a recursive a

11、nalysis be done. The starting period is held fi xed, the ending period advances, and the window size grows. rrecursive specifi es that a reverse recursive analysis be done. Here the ending period is held fi xed, the starting period advances, and the window size shrinks. rolling Rolling-window and re

12、cursive estimation3 ? ? Options? clear specifi es that Stata replace the data in memory with the collected statistics even though the current data in memory have not been saved to disk. saving(fi lename?, suboptions ? ) creates a Stata data fi le (.dta fi le) consisting of (for each statistic in exp

13、 list) a variable containing the window replicates. double specifi es that the results for each replication be saved as doubles, meaning 8-byte reals. By default, they are saved as floats, meaning 4-byte reals. every(#) specifi es that results be written to disk every #th replication. every() should

14、 be specifi ed in conjunction only with saving() when command takes a long time for each replication. This will allow recovery of partial results should your computer crash. See P postfi le. stepsize(#) specifi es the number of periods the window is to be advanced each time command is executed. star

15、t(time constant) specifi es the date on which rolling is to start. start() may be specifi ed as an integer or as a date literal. end(time constant) specifi es the date on which rolling is to end. end() may be specifi ed as an integer or as a date literal. keep(varname?, start ? ) specifi es a variab

16、le to be posted along with the results. The value posted is the value that corresponds to the right edge of the window. Specifying the start() option requests that the value corresponding to the left edge of the window be posted instead. This option is often used to record calendar dates. ? ? Reporting? nodots suppresses display of the replication dot for each window on which command is executed. By default, one dot character is printed for each w

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 商业/管理/HR > 管理学资料

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号