📄 stfill.hlp
字号:
{smcl}
{* 14mar2005}{...}
{cmd:help stfill} {right:dialog: {bf:{dialog stfill}}}
{hline}
{title:Title}
{p2colset 5 20 22 2}{...}
{p2col :{hi:[ST] stfill} {hline 2}}Fill in by carrying forward values of covariates{p_end}
{title:Syntax}
{p 8 15 2}{cmd:stfill} {varlist} {ifin} {cmd:,}
{c -(}{opt b:aseline|f:orward}{c )-} [{cmd:,} {it:options}]
{synoptset 13 tabbed}{...}
{synopthdr}
{synoptline}
{syntab:Main}
{p2coldent :* {opt b:aseline}}replace with values at baseline{p_end}
{p2coldent :* {opt f:orward}}carry forward values{p_end}
{synopt :{opt nosh:ow}}do not show st setting information{p_end}
{synoptline}
{p2colreset}{...}
{p 4 6 2} * Either {opt baseline} or {opt forward} is required.{p_end}
{p 4 6 2} You must {cmd:stset} your data before using {cmd:stfill}; see {helpb stset}.{p_end}
{p 4 6 2} Note that {opt fweight}s, {opt iweight}s, and {opt pweights} may be specified using {cmd:stset}; see {helpb stset}.{p_end}
{title:Description}
{pstd}
{cmd:stfill} is intended for use with multiple-record st data for which
{opt id()} has been {cmd:stset}. {cmd:stfill} may be used with single-record
data, but it literally does nothing. That is, {cmd:stfill} can be used with
multiple-record or single- or multiple-failure st data.
{pstd}
{cmd:stfill, baseline} changes variables to contain the value at the
earliest time each subject was observed, making the variable constant over
time. {cmd:stfill, baseline} changes all subsequent values of the specified
variables to equal the first value, whether they originally contained missing
or not.
{pstd}
{cmd:stfill, forward} fills in missing values of each variable with that of
the most recent time at which the variable was last observed.
{cmd:stfill, forward} changes only missing values.
{pstd}
You must specify either the {opt baseline} or the {opt forward} option.
{pstd}
{opt if} {it:exp} and {opt in} {it:range} operate slightly differently from
their usual definitions to work as you would expect. {opt if} and {opt in}
restrict where changes can be made to the data, but no matter what, all
{cmd:stset} observations are used to provide the values to be carried forward.
{title:Options}
{dlgtab:Main}
{phang}
{opt baseline} specifies that values be replaced with the values at baseline,
the earliest time at which the subject was observed. All values of the
specified variables are replaced, missing and nonmissing.
{phang}
{opt forward} specifies that values be carried forward and that previously
observed, nonmissing values be used to fill in later values that are missing
in the specified variables.
{phang}
{opt noshow} prevents {cmd:stfill} from showing the key st variables. This
option is seldom used since most people type {cmd:stset, show} or
{cmd:stset, noshow} to set whether they want to see these variables mentioned
at the top of the output of every st command; see {helpb stset}.
{title:Examples}
{phang}{cmd:. stfill sex, baseline}
{phang}{cmd:. stfill bp, forward}
{phang}{cmd:. gen bp0 = bp}{p_end}
{phang}{cmd:. stfill bp0, baseline}
{title:Also see}
{psee}
Manual: {bf:[ST] stfill}
{psee}
Online: {help st}, {helpb stbase}, {helpb stgen}, {helpb stset},
{helpb stvary}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -