楼主: Lee_iris
7199 7

[回归分析求助] 工具变量iv估计不同命令比较:结果汇报、固定效应 、模型、稳健标准误等 [推广有奖]

已卖:1253份资源

教授

47%

还不是VIP/贵宾

-

威望
0
论坛币
1167 个
通用积分
1196.5565
学术水平
36 点
热心指数
43 点
信用等级
35 点
经验
14504 点
帖子
893
精华
0
在线时间
1517 小时
注册时间
2019-3-5
最后登录
2026-1-4

楼主
Lee_iris 在职认证  学生认证  发表于 2022-5-23 16:36:19 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
https://github.com/sergiocorreia/ivreghdfe

不同的iv估计命令有什么区别?
用日度数据的时候,还想控制双向固定效应,但是有时候用ivreghdfe会估计不出来,说观测值不足,可能是自由度不够,然后在回归结果里找不到kp值,换了不同的命令也总是遇到问题,没有顺利得到想要的回归结果和检验值
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:工具变量 固定效应 标准误 GitHub Sergio

沙发
Lee_iris 在职认证  学生认证  发表于 2022-5-23 23:06:49
When the i.i.d. assumption is dropped and ivreg2 is invoked with the robust, bw or cluster options, the Cragg-Donald-based weak instruments test is no longer valid.  ivreg2 instead reports a correspondingly-robust Kleibergen-Paap Wald rk F statistic.  

我好像知道了为什么一直没有找到kp值。因为KP检验的前提是误差不满足独立同方差假定,在设置robust, bw or cluster options的时候才会报告。

还是应该学习学习基本理论。

藤椅
Lee_iris 在职认证  学生认证  发表于 2022-5-23 23:12:55
遇到问题还是应该好好看看报错的原因和命令的help文件

板凳
Lee_iris 在职认证  学生认证  发表于 2022-7-8 22:30:08
1. ivreghdfe简介

ivreghdfeivreg2reghdfe的结合,这两个命令的一些选项在ivreghdfe 里也是可以用的

ivreghdfeis essentially ivreg2 with an additional absorb()option from reghdfe. See the links above for the detailed helpfiles of each program.

以下总结reghdfe的一些可选项(翻译help文件):

1. StandardFEs

选项absorb表示要吸收的固定效应变量(可以是交互项)列表,相当于为每个absvar的每个类别生成一个虚拟变量纳入回归。这是一个必选项。

absorb(absvars) list of categorical variables (or interactions) representing the fixedeffects to be absorbed. This is equivalent to including an indicator/dummyvariable for each category of each absvar. absorb() is required.

固定效应的大小是可以保留下来的,需要在absvar前面加上新变量的名字和等于号,即"newvar="。但是要注意固定效应的估计值一般是不一致且无经济意义的(这里指的是固定效应的系数,也就是一系列虚拟变量的系数,不是模型中解释变量的系数,一般对固定效应进行控制即可,不需要解读其系数)。

Tosave a fixed effect, prefix the absvar with "newvar=". For instance, the option absorb(firm_id worker_id year_coefs=year_id)will include firm, worker, and year fixed effects, but will only save theestimates for the year fixed effects (in the new variable year_coefs).

-However, be aware that estimates for the fixed effects are generallyinconsistent and not econometrically identified.

如果要在以后运行predict,但不特别关心每个固定效果的名称,可以使用savefe子选项。

Ifyou want to run predict afterward but don't particularly care about thenames of each fixed effect, use the savefe suboption.  This will deleteall preexisting variables matching __hdfe*__ and create new ones asrequired.  Example: reghdfe price weight, absorb(turn trunk, savefe).

关于absvar

①可以直接写类别变量名称,也可以在变量前加“i.”,效果一样。“i.”表示针对后面跟着的离散变量生成虚拟变量(查看帮助文件helpfvvarlistunaryoperator to specify indicators)。

varnamecategorical variable to be absorbed

i.varnamecategorical variable to be absorbed (same asabove; the i. prefix is always implicit)

②还可以加交互项,i.var1#i.var2表示两个类别变量的交互;i.var1#c.var2的估计结果表示连续变量(var2)在类别变量var1取不同值时的不同斜率(小心使用,这种模型数值稳定性不好且收敛慢,如果要使用的话,可以增加容忍值,或者使用"state##c.time"尽管交互项多余),比直接生成两者乘积的变量更快更方便;var1##c.var2"i.var1 i.var1#c.var2"效果一样但更快;还可以用var1##c.(var2 var3)或者v1#v2#v3##c.(v4 v5)

i.var1#i.var2absorb the interactions of multiplecategorical variables

i.var1#c.var2absorb heterogeneous slopes, where var2 has adifferent slope estimate depending on var1. Use carefully (see below!)

-Slope-onlyabsvars ("state#c.time") have poor numerical stability and slowconvergence. If you need those, either i) increase tolerance or ii) useslope-and-intercept absvars ("state##c.time"), even if the interceptis redundant. For instance if absvar is "i.zipcode i.state##c.time"then i.state is redundant given i.zipcode, but convergence will still be muchfaster.

var1##c.var2absorb heterogenous intercepts and slopes.Equivalent to "i.var1 i.var1#c.var2", but muchfaster

var1##c.(var2 var3)multiple heterogeneous slopes are allowedtogether. Alternative syntax: var1##(c.var2 c.var3)

v1#v2#v3##c.(v4v5)factor operators can be combined

2. Group FEs

group(groupvar)给各组设定了分类变量。group()不是必选项,但在设定了individual()时需要有group()。如果直接设定了group(),没有写groupvar,程序会给每个观测值一个设一个分类变量。

group(groupvar) categoricalvariable representing each group (eg: patent_id). group() is not required,unless you specify individual(). If only group() is specified, theprogram will run with one observation per group. Note that group here meanswhatever aggregation unit at which the outcome is defined.

individual(indvar)表示每个个体的分类变量。这个变量不会自动加入absorb(absvars),需要手动添加。

individual(indvar) categoricalvariable representing each individual (eg: inventor_id). This variable is notautomatically added to absorb(), so you must include it in the absvar list.This is because the order in which you include it affects the speed of thecommand, and reghdfe is not smart enough to know the optimal ordering. Ifindividual() is specified you must also call group().

aggregation(str)设定从个体成分到分组固定效应的加总方式,默认是取均值,另一个有效的选项是加总。平均和加总都是有效的方法,但具体选择需要结合经济学含义。

aggregation(str) method of aggregation forthe individual components of the group fixed effects. Valid options are mean(default), and sum. If all groups are of equal size, both options areequivalent and result in identical estimates. Note that both options areeconometrically valid, and aggregation() should be determined based onthe economics behind each specification. For instance, adding more authors to apaper or more inventors to an invention might not increase its qualityproportionally (i.e. its citations), so using "mean" might be thesensible choice. In contrast, other production functions might scale linearlyin which case "sum" might be the correct choice.

在设定不同的分组固定效应时,对应的是不同的模型估计。如果没有设定,reghdfe用带常数项的OLS计算;如果只有absorb(),则按标准固定效应回归;如果设定了group(),相当于每个组只有一个观测值;如果全部设定了,相当于分组和个体固定效应的固定效应回归。

Combiningoptions: depending on which of absorb(), group(), and individual() you specify,you will trigger different use cases of reghdfe:

1. If none is specified, reghdfe willrun OLS with a constant.

2. If only absorb() is present, reghdfewill run a standard fixed-effects regression.

3. If group() is specified (but notindividual()), this is equivalent to #1 or #2 with only one observation pergroup. That is, running "bysort group: keep if _n == 1" andthen "reghdfe ...".

3. If all are specified, this is equivalent toa fixed-effects regression at the group level and individual FEs.



报纸
Lee_iris 在职认证  学生认证  发表于 2022-7-8 22:30:33
3. Model
① vce(vcetype, subopt) 设定了标准误的类型。unadjusted|ols估计常规标准误,该设定的估计值在满足同方差和观测值间不相关的假设时有效。robust估计异方差一致标准误,但仍假定观测值间独立。面板固定效应回归中,如果对于每个固定效应,另一个维度是固定的,那么用robust可能导致不一致的标准误。
vce(vcetype, subopt) specifies the type of standard error reported.
-unadjusted|ols estimates conventional standard errors, valid under the assumptions of homoscedasticity and no correlation between observations even in small samples.
-robust estimates heteroscedasticity-consistent standard errors (Huber/White/sandwich estimators), which still assume independence between observations.
-Warning: in a FE panel regression, using robust will lead to inconsistent standard errors if, for every fixed effect, the other dimension is fixed. For instance, in a standard panel with individual and time fixed effects, we require both the number of individuals and periods to grow asymptotically.  If that is not the case, an alternative may be to use clustered errors, which as discussed below will still have their own asymptotic requirements. For a discussion, see Stock and Watson, "Heteroskedasticity-robust standard errors for fixed-effects panel-data regression," Econometrica 76 (2008): 155-174.

②即使观测值存在组内相关,cluster clustervars也能得到一致标准误的估计。可以设定多重维度的聚类。要注意vce(cluster firm#year) (one-way clustering) 和 vce(cluster firm year) (two-way clustering)不一样。

cluster clustervars estimates consistent standard errors even when the observations are correlated within groups. Multi-way-clustering is allowed. Thus, you can indicate as many clustervars as desired (e.g. allowing for intragroup correlation across individuals, time, country, etc). For instance, vce(cluster firm year) will estimate SEs with firm and year clustering (two-way clustering). Each clustervar permits interactions of the type var1#var2. This is equivalent to using egen group(var1 var2) to create a new variable, but more convenient and faster. For instance, vce(cluster firm#year) will estimate SEs with one-way clustering i.e. where all observations of a given firm and year are clustered together. Note: do not confuse vce(cluster firm#year) (one-way clustering) with vce(cluster firm year) (two-way clustering).

聚类变量的类别如果过少,不建议采用聚类标准误。通常建议聚类变量至少有50个不同的类别。
-Warning: it is not recommended to run clustered SEs if any of the clustering variables have too few different levels. A frequent rule of thumb is that each cluster variable must have at least 50 different categories (the number of categories for each clustervar appears at the top of the regression table).

注意:更高级的标准误,包括自相关一致性(AC)、异质和自相关一致性(HAC)、Driscoll-Kraay、Kiefer等,可在ivreghdfe包中使用(使用ivreg2作为其后端)。
-Note: More advanced SEs, including autocorrelation-consistent (AC), heteroskedastic and autocorrelation-consistent (HAC), Driscoll-Kraay, Kiefer, etc. are available in the ivreghdfe package (which uses ivreg2 as its back-end).

③residuals(newvar)将残差保留在一个新变量中。
residuals(newvar) saves the regression residuals in a new variable. residuals (without parenthesis) saves the residuals in the variable _reghdfe_resid (overwriting it if it already exists). This option does not require additional computations and is required for subsequent calls to predict, d.

④summarize(stats) this option is now part of sumhdfe.

4. Degrees-of-Freedom Adjustments
①dofadjustments(doflist)设定吸收固定效应后的自由度以及e(df_a)调整。
dofadjustments(doflist) selects how the degrees-of-freedom, as well as e(df_a), are adjusted due to the absorbed fixed effects.

在没有任何调整的情况下,由于固定效应而损失的自由度(DoF)等于所有固定效应的计数。例如,与吸收(firm_id worker_id)的回归,1000家公司,1000名工人,将因FE而下降2000 DoF。这可能过于激进,因为许多这些固定效应可能彼此完全共线,并且丢失的DoF的真实数量可能较低,由此导致标准误过大。

The problem: without any adjustment, the degrees-of-freedom (DoF) lost due to the fixed effects is equal to the count of all the fixed effects. For instance, a regression with absorb(firm_id worker_id), and 1000 firms, 1000 workers, would drop 2000 DoF due to the FEs. This is potentially too aggressive, as many of these fixed effects might be perfectly collinear with each other, and the true number of DoF lost might be lower. As a consequence, your standard errors might be erroneously too large.

解决方案:为了解决这个问题,reghdfe使用几种方法来计算FE共线性的可能实例。在大多数情况下,它将计算所有实例(例如,单向和双向固定效应),但在其他情况下,它只会提供保守的估计。这样做相对较慢,因此通过更改这些选项可能会加快reghdfe的速度。

The solution: To address this, reghdfe uses several methods to count instances as possible of collinearities of FEs. In most cases, it will count all instances (e.g. one- and two-way fixed effects), but in others it will only provide a conservative estimate. Doing this is relatively slow, so reghdfe might be sped up by changing these options.

dofadjustments(doflist) 的选项包括all、none、firstpair、pairwise和continuous:
all是默认选项,通常也是最佳的选择,等价于dof(pairwise clusters continuous)。然而,模型中有很多固定效应时,还可以运行dof(firstpair clusters continuous),运算将更快并且可能几乎一样好。

all is the default and usually the best alternative. It is equivalent to dof(pairwise clusters continuous).However, an alternative when using many FEs is to run dof(firstpair clusters continuous), which is faster and might be almost as good.

none 假定固定效应之间没有共线性(即没有冗余的固定效应)。这个选项没有对自由度做处理因此计算很快,但过于保守。

none assumes no collinearity across the fixed effects (i.e. no redundant fixed effects). This is overtly conservative, although it is the faster method by virtueof not doing anything.

firstpair精确识别前两组固定效应(即第一组absvar和第二组absvar)中存在共线的固定效应数量。

firstpair will exactly identify the number of collinear fixed effects across the first two sets of fixed effects (i.e. the first absvar and the second absvar). The algorithm used for this is described in Abowd et al (1999), and relies on results from graph theory (finding the number of connected sub-graphs in a bipartite graph). It will not do anything for the third and subsequent sets of fixed effects. For more than two sets of fixed effects, there are no known results that provide exact degrees-of-freedom as in the case above. One solution is to ignore subsequent fixed effects (and thus overestimate e(df_a) and underestimate the degrees-of-freedom). Another solution, described below, applies the algorithm between pairs of fixed effects to obtain a better (but not exact) estimate:

固定效应的维度大于2时还可以用pairwise。

pairwise applies the aforementioned connected-subgraphs algorithm between pairs of fixed effects. For instance, if there are four sets of FEs, the first dimension will usually have no redundant coefficients (i.e. e(M1)==1), since we are running the model without a constant. For the second FE, the number of connected subgraphs with respect to the first FE will provide an exact estimate of the degrees-of-freedom lost, e(M2). For the third FE, we do not know exactly. However, we can compute the number of connected subgraphs between the first and third G(1,3), and second and third G(2,3)fixed effects, and choose the higher of those as the closest estimate for e(M3).For the fourth FE, we compute G(1,4), G(2,4), and G(3,4) and again choose the highest for e(M4). Finally, we compute e(df_a) = e(K1) - e(M1) + e(K2) - e(M2) + e(K3) - e(M3) + e(K4)- e(M4); where e(K#) is the number of levels or dimensions for the #-th fixed effect(e.g. number of individuals or years).Note that e(M3) and e(M4) are only conservative estimates and thus we will usually be overestimating the standard errors. However, given the sizes of the datasets typically used with reghdfe, the difference should be small. Since the gain from pairwise is usually minuscule for large datasets, and the computation is expensive, it may be a good practice to exclude this option for speedups.

continuous考虑斜率与截距共线的情况。

continuous Fixed effects with continuous interactions (i.e. individual slopes, instead of individual intercepts) are dealt with differently. In ani.categorical#c.continuous interaction, we will do one check: we count the number of categories where c.continuous is always zero. In an i.categorical##c.continuousinteraction, we count the number of categories where c.continuos is always the same constant. If that is the case, then the slope is collinear with the intercept.

Additional methods, such as bootstrap are also possible but not yet implemented. Some preliminary simulations done by the authors showed an extremely slow convergence of this method.

②groupvar(newvar)可选项包括pairwise, firstpair或者all(默认).
groupvar(newvar) name of the new variable that will contain the first mobility group. Requires pairwise, firstpair, or the default all.

地板
Lee_iris 在职认证  学生认证  发表于 2022-7-8 22:30:51
5. Optimization
①technique(str):其中str的可选项包括map、lsmr、lsqr和gt,其中map是默认选项。

technique(map)通过MAP方法将变量的影响分离出来,但目前不适用于个人和群体固定效果。是快速稳定的选项。
technique(map) (default)will partial out variables using the "method of alternating projections" (MAP) in any of its variants. MAP currently does not work with individual & group fixed effects. Fast and stable option

technique(lsmr) 使用 Fong 和 Saunders LSMR 算法,适用于个体固定效应。更多信息参考文章P:\TEX\SISC\33-5\79687\79687.dvi (stanford.edu)

technique(lsmr) use the Fong and Saunders LSMR algorithm. Recommended (default) technique when working with individual fixed effects. LSMR is an iterative method for solving sparse least-squares problems; analytically equivalent to the MINRES method on the normal equations. For more information on the algorithm, please reference the paper P:\TEX\SISC\33-5\79687\79687.dvi (stanford.edu)

technique(lsqr) 使用 Paige 和 Saunders LSQR 算法。处理个体固定效应的另一种技术。更多信息参考https://web.stanford.edu/group/SOL/software/lsqr/lsqr-toms82a.pdf

technique(lsqr) use Paige and Saunders LSQR algorithm. Alternative technique when working with individual fixed effects. LSQR is an iterative method for solving sparse least-squares problems; analytically equivalent to conjugate gradient method on the normal equations. Fast, but less precise than LSMR at default tolerance (1e-8).For more information on the algorithm, please reference the paper https://web.stanford.edu/group/SOL/software/lsqr/lsqr-toms82a.pdf

technique(gt)目前已禁用。

technique(gt) variation of Spielman et al's graph-theoretical (GT) approach (using a spectral sparsification of graphs); currently disabled

②acceleration(str):与tech(map)相关。允许不同的加速技术,选项包括none,steep_descent,aitken和conjugate_gradient。

acceleration(str) Relevant for tech(map). Allows for different acceleration techniques, from the simplest case of no acceleration (none), to steep descent (steep_descent or sd), Aitken (aitken), and finally Conjugate Gradient (conjugate_gradient or cg).

Note: Each acceleration is just a plug-in Mata function, so a larger number of acceleration techniques are available, albeit undocumented (and slower).

③transform(str)支持不同的可选项替换,传统方式是kaczmarz,更稳定的选项是cimmino和symmetric_kaczmarz。

transform(str) allows for different "alternating projection" transforms. The classical transform is Kaczmarz (kaczmarz), and more stable alternatives are Cimmino (cimmino) and Symmetric Kaczmarz (symmetric_kaczmarz)

要注意,不同的加速方式通常更适合某些变换。例如,不要将共轭梯度与普通的 Kaczmarz 一起使用,否则不能收敛。

Note: The default acceleration is Conjugate Gradient and the default transform is Symmetric Kaczmarz. Be wary that different accelerations often work better with certain transforms. For instance, do not use conjugate gradient with plain Kaczmarz, as it will not converge (this is because CG requires a symmetric operator in order to converge, and plain Kaczmarz is not symmetric).

④preconditioner(str),选择预调节器,以更好地收敛。选项:none、diagonal和block_diagonal (默认)。

preconditioner(str) LSMR/LSQR require a good preconditioner in order to converge efficiently and in few iterations. reghfe currently supports right-preconditioners of the following types: none, diagonal, and block_diagonal (default).

⑤prune(str)目前已禁用。

prune vertices of degree-1; acts as a preconditioner that is useful if the underlying network is very sparse; currently disabled

⑥tolerance(#)指定收敛的容忍度标准,默认值为1e-8。通常,高容忍度(1e-8 至 1e-14)可以得到更准确的结果,但速度较慢,高于1e-14的容忍度可能不会收敛。同样,低容忍度(1e-7、1e-6 等)得到结果的速度更快,但可能不准确。低于1e-6的容忍度同样不建议,因为迭代可能停止得太快,导致回报的结果不准确,但对于非常大的数据集,在初步计算时使用低容忍度有时很有用。

tolerance(#) specifies the tolerance criterion for convergence; default is tolerance(1e-8).In general, high tolerances (1e-8 to 1e-14) return more accurate results, but more slowly. Similarly, low tolerances (1e-7, 1e-6, ...) return faster but potentially inaccurate results.

Note that tolerances higher than 1e-14 might be problematic, not just due to speed, but because they approach the limit of the computer precision (1e-16). Thus, using e.g. tol(1e15) might not converge, or take an inordinate amount of time to do so.

At the other end, low tolerances (below 1e-6) are not generally recommended, as the iteration might have been stopped too soon, and thus the reported estimates might be incorrect. However, with very large datasets, it is sometimes useful to use low tolerances when running preliminary estimates.

注意:使用迭代方法(即reghdfe使用的那些)比使用直接方法(即回归使用的方法)检测完全共线的因变量更困难。想要找到未被识别的完全共线因变量,需要寻找极高的标准误差。在这种情况下,考虑使用更高的容忍度。

Note: detecting perfectly collinear regressors is more difficult with iterative methods (i.e. those used by reghdfe) than with direct methods (i.e. those used by regress). To spot perfectly collinear regressors that were not dropped, look for extremely high standard errors. In this case, consider using higher tolerances.

提醒:当模型中异质性的斜率没有和异质性的截距项搭配使用时,收敛性会相当差,强烈建议使用更高的容忍度(即高于默认值)。换句话说,var1##c.var2比var1#c.var2更容易收敛,后者可能需要更高的容忍度。

Warning: when absorbing heterogeneous slopes without the accompanying heterogeneous intercepts, convergence is quite poor and a higher tolerance is strongly suggested (i.e. higher than the default). In other words, an absvar of var1##c.var2 converges easily, but an absvar of var1#c.var2 will converge slowly and may require a higher tolerance.

⑦iterations(#)指定最大迭代次数,默认值为迭代16000次,即iterations(16000)。设置iterations(.)表示程序一直运行到收敛为止。

iterations(#) specifies the maximum number of iterations; the default is iterations(16000); set it to missing (.) to run forever until convergence.

⑧nosample不会创建e(样本),从而节省一些空间和速度。
nosample will not create e(sample), saving some space and speed.

6. Parallel execution
parallel(#1, cores(#2) options)参阅网站https://github.com/gvegayon/parallel。parallel()只会在某些情况下加快执行速度。首先,数据集需要足够大,并且/或者部分输出过程需要足够大。其次,如果计算机只有一个或几个内核,或者内存有限,则可能无法实现显著加速。

parallel(#1, cores(#2) options) runs the partialling-out step in #1 separate Stata processeses, each using #2 cores. This option requires the parallel package (see website). There are several additional suboptions, discussed here.

Note that parallel() will only speed up execution in certain cases. First, the dataset needs to be large enough, and/or the partialling-out process needs to be slow enough, that the overhead of opening separate Stata instances will be worth it. Second, if the computer has only one or a few cores, or limited memory, it might not be able to achieve significant speedups.

7. Memory Usage
①poolize(#)默认设置是poolize(10)。数值越大,速度越快,但可能会导致内存不足导致报错。在这种情况下,设置poolize(1)。
poolsize(#) Number of variables that are pooled together into a matrix that will then be transformed. The default is to pool variables in groups of 10. Larger groups are faster with more than one processor, but may cause out-of-memory errors. In that case, set poolsize to 1.

②compact 在每一步中保留数据集并尽可能多地删除变量。
compact preserve the dataset and drop variables as much as possible on every step

8. Reporting
①level(#) 设置置信区间,默认为level(95)。
level(#) sets confidence level; default is level(95); see [R] Estimation options

②display_options: noci, nopvalues, noomitted, vsquish, noemptycells, baselevels, allbaselevels, nofvlabel, fvwrap(#), fvwrapon(style), cformat(%fmt), pformat(%fmt), sformat(%fmt), and nolstretch; see [R] Estimation options.

③noheader 在输出内容的顶部不显示汇总统计表,仅显示系数表。
noheader suppresses the display of the table of summary statistics at the top of the output; only the coefficient table is displayed.This option is often used in programs and ado-files.

④notable 不显示系数表。
notable suppresses display of the coefficient table.

⑤nofootnote 不显示固定效应的脚注表。
nofootnote suppresses display of the footnote table that lists the absorbed fixed effects, including the number of categories/levels of each fixed effect, redundant categories (collinear or otherwise not counted when computing degrees-of-freedom), and the difference between both.

⑥noconstant 不显示常数项。不影响估计结果。
noconstant suppresses display of the _cons row in the main table. No results or computations change, this is merely a cosmetic option

9. Diagnostic
①verbose(#) 输出调试信息。可能值为0、1、2、3和4。对调试最有用的是3,最简单的报告是1。
verbose(#) orders the command to print debugging information. Possible values are 0 (none), 1 (some information), 2 (even more), 3 (adds dots for each iteration, and reports parsing details), 4 (adds details for every iteration step). For debugging, the most useful value is 3. For simple status reports, set verbose to 1.

②timeit显示不同估计步骤的时间。大多数时间通常花在三个步骤上:map_precompute(),map_solve()和回归步骤。
timeit shows the elapsed time at different steps of the estimation. Most time is usually spent on three steps: map_precompute(), map_solve() and the regression step.

③version(#) 汇报所安装的reghdfe版本。

version(#) reghdfe has had so far two large rewrites, from version 3 to 4, and version 5 to version 6.Because the rewrites might have removed certain features (e.g. IV/2SLS was available in version 3 but moved to ivreghdfe on version 4), this option allows you to run the previous versions without having to install them (they are already included in reghdfe installation).

To use them, just add the options version(3) or version(5). You can check their respective help files here: reghdfe3, reghdfe5. This option is also useful when replicating older papers, or to verify the correctness of estimates under the latest version. Tip:To avoid the warning text in red, you can add the undocumented nowarn option.

7
经管の家Λ76YK57ηY8u 学生认证  发表于 2024-10-14 09:31:11
Lee_iris 发表于 2022-7-8 22:30
5. Optimization
①technique(str):其中str的可选项包括map、lsmr、lsqr和gt,其中map是默认选项。
感谢大佬!

8
Lee_iris 在职认证  学生认证  发表于 2024-10-14 13:30:19
经管の家Λ76YK57ηY8u 发表于 2024-10-14 09:31
感谢大佬!
没有,就检索机翻了一下

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-2-1 04:23