📄 prefix.hlp
字号:
{smcl}
{* 19feb2005}{...}
{cmd:help prefix}
{hline}
{title:Title}
{p 4 13 2}{hi:[U] 11.1.10 Prefix commands}
{title:Syntax}
{it:prefix ...}{cmd::} {it:command} {it:...}
{p2colset 5 18 20 2}{...}
{p2col:{it:prefix}}description{p_end}
{p2line}
{p2col:{helpb by}}run command on subsets of data{p_end}
{p2col:{helpb statsby}}same as {cmd:by}, but collect statistics from each
run{p_end}
{p2col:{helpb rolling}}run command on moving subsets, and collect
statistics{p_end}
{p2col:{helpb bootstrap}}run command on bootstrap samples{p_end}
{p2col:{helpb jackknife}}run command on jackknife subsets of data{p_end}
{p2col:{helpb permute}}run command on random permutations{p_end}
{p2col:{helpb simulate}}run command on manufactured data{p_end}
{p2col:{helpb svy}}run command and adjust results for survey sampling{p_end}
{p2col:{helpb stepwise}}run command with stepwise variable
inclusion/exclusion{p_end}
{p2col:{helpb xi}}run command after expanding factor variables &
interactions{p_end}
{p2col:{helpb capture}}run command and capture its return code{p_end}
{p2col:{helpb noisily}}run command and show the output{p_end}
{p2col:{helpb quietly}}run command and suppress the output{p_end}
{p2col:{helpb version}}run command under specified version{p_end}
{p2line}
{p2colreset}{...}
{pstd}
The last group{hline 2}{cmd:capture}, {cmd:noisily}, {cmd:quietly}, and
{cmd:version}{hline 2}have to do with programming Stata and, for historical
reasons, {cmd:capture}, {cmd:noisily}, and {cmd:quietly} allow you to omit
the colon.
{title:Description}
{pstd}
Prefix commands operate on other Stata commands. They modify the input,
modify the output, or repeat execution of the {it:command}. For example,
{helpb xi} modifies the {varlist} of {it:command}. {helpb svy} modifies the
results of {it:command} to account for complex survey data. {helpb by}
executes {it:command} on subgroups of the data.
{pstd}
See {help language} for an overview of the Stata language.
{title:Remarks}
{pstd}
Prefix commands are not allowed in all contexts. For instance, {helpb svy} and
{helpb stepwise} may only be used on supported estimation commands. {helpb bootstrap},
{helpb jackknife}, ... make no sense when combined with a command like
{helpb generate}.
{pstd}
Many of the prefix commands can be combined. For instance,
{phang2}
{cmd:xi: svy: logit diabetes female i.agegroup}
{pstd}
However, some combinations of prefix commands are not allowed. For example,
{phang2}
{cmd:bootstrap: statsby: logit diabetes female age}
{pstd}
is not allowed because statsby saves results to a dataset and not in {cmd:r()}
or {cmd:e()}.
{title:Examples}
{phang}{cmd:. xi: regress y i.agegrp*wght}
{phang}{cmd:. bs, reps(1000): logit diabetes female age}
{phang}{cmd:. by group: assert _N > 5}
{phang}{cmd:. statsby r(min) r(max), by(group) clear: summarize income}
{title:Also see}
{psee}
Manual: {bf:[U] 11.1.10 Prefix commands}
{psee}
Online: {help language};
{help estcom};
{helpb bootstrap},
{helpb by},
{helpb capture},
{helpb jackknife},
{helpb permute},
{helpb quietly},
{helpb rolling},
{helpb simulate},
{helpb statsby},
{helpb svy},
{helpb stepwise},
{helpb version},
{helpb xi}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -