📄 tsfill.hlp
字号:
{smcl}
{* 07mar2005}{...}
{cmd:help tsfill}{right:dialog: {bf:{dialog tsfill}}}
{hline}
{title:Title}
{p2colset 5 20 22 2}{...}
{p2col :{hi:[TS] tsfill} {hline 2}}Fill in missing times with missing
observations in time-series data{p_end}
{p2colreset}{...}
{title:Syntax}
{p 8 16 2}
{cmd:tsfill} [{cmd:,} {opt f:ull}]
{phang}
You must {helpb tsset} your data before using {cmd:tsfill}.
{title:Description}
{pstd}
{cmd:tsfill} is used after {cmd:tsset} to fill in gaps in time-series data and
gaps in panel data with new observations, which contain missing values. For
instance, perhaps observations for
{bind:{it:timevar} = 1, 3, 5, 6, ..., 22} exist. {cmd:tsfill} would
create observations for {it:timevar} = 2 and {it:timevar} = 4 containing all
missing values. There is seldom reason to do this because Stata's time-series
operators consider {it:timevar} not the observation number. Referring to
{cmd:L.gnp} to obtain lagged {cmd:gnp} values would correctly produce a
missing value for {it:timevar} = 3, even if the data were not filled in.
Referring to {cmd:L2.gnp} would correctly return the value of {cmd:gnp} in the
first observation for {it:timevar} = 3, even if the data were not filled in.
{title:Option}
{phang}
{cmd:full} is for use with panel data only. With panel data, {cmd:tsfill} by
default fills in observations for each panel according to the minimum and
maximum values of {it:timevar} for the panel. Thus if the first panel
spanned the times 5-20 and the second panel the times 1-15, after {cmd:tsfill}
they would still span the same time periods; observations would be created to
fill in any missing times from 5-20 in the first panel and from 1-15 in the
second.
{pmore}
If {cmd:full} is specified, observations are created so that both panels span
the time 1-20, the overall minimum and maximum of {it:timevar} across panels.
{title:Examples}
{psee}{cmd:. tsfill}{p_end}
{psee}{cmd:. tsfill, full}{p_end}
{title:Also see}
{psee}
Manual: {bf:[TS] tsfill}
{psee}
Online: {helpb tsappend}, {helpb tsset}{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -