📄 post.hlp
字号:
{smcl}
{* 09feb2005}{...}
{cmd:help postfile}, {cmd:help post}, {cmd:help postclose}, {cmd:help postutil}
{hline}
{title:Title}
{p2colset 5 21 23 2}{...}
{p2col :{hi:[P] postfile} {hline 2}}Save results in Stata dataset{p_end}
{p2colreset}{...}
{title:Syntax}
{p 8 17 2}{cmd:postfile}{space 2}{it:postname} {it:newvarlist} {cmd:using}
{it:filename} [{cmd:,} {cmdab:e:very:(}{it:#}{cmd:)} {cmd:replace}]
{p 8 17 2}{cmd:post}{space 6}{it:postname} {cmd:(}{it:exp}{cmd:)}
{cmd:(}{it:exp}{cmd:)} {it:...} {cmd:(}{it:exp}{cmd:)}
{cmd:postclose} {it:postname}
{cmd:postutil dir}
{cmd:postutil clear}
{title:Description}
{pstd}
These commands are utilities to assist Stata programmers in performing
Monte Carlo-type experiments.
{pstd}
{cmd:postfile} declares the variable names and the filename of a (new) Stata
dataset where results are to be stored. Storage types may be specified with
{it:newvarlist}; for example,
{pin}
{cmd:. postfile myhandle a b str20 c double(d e f) using myfile}
{pstd}
{cmd:post} adds a new observation to the declared dataset.
{pstd}
{cmd:postclose} declares an end to the posting of observations. After
{cmd:postclose}, the new dataset contains the posted results and may be loaded
using {cmd:use}; see {helpb use}.
{pstd}
{cmd:postutil dir} lists all open postfiles. {cmd:postutil clear} closes
all open postfiles.
{pstd}
All five commands manipulate the new dataset without disturbing the data in
memory.
{title:Options}
{phang}{cmd:every(}{it:#}{cmd:)} specifies results are to be written to disk
every {it:#}th call to {cmd:post}. {cmd:post} temporarily holds results in
memory and periodically opens the dataset being built to append to the stored
results. {cmd:every()} should typically not be specified, as you are unlikely
to choose a value for {it:#} that is as efficient as the number {cmd:post}
chooses on its own, which is a function of the number of results being written
and their storage type.
{phang}{cmd:replace} indicates that the file specified may already exist,
and, if it does, {cmd:postfile} may erase the file and create a new one.
{title:Remarks}
{pstd}
Typical use of the post commands is
{cmd:tempname memhold}
{cmd:tempfile results}
{it:...}
{cmd:postfile `memhold'} {it:...} {cmd:using `results'}
{it:...}
{cmd:while} {it:...} {cmd:{c -(}}
{it:...}
{cmd:post `memhold'} {it:...}
{it:...}
{cmd:{c )-}}
{cmd:postclose `memhold'}
{it:...}
{title:Also see}
{psee}
Manual: {bf:[P] postfile}
{psee}
Online: {helpb bootstrap}, {helpb simulate}
{p_end}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -