Pub Date : 2023-03-01DOI: 10.1177/1536867X231162034
Jiâqi Xiao, Yiannis Karavias, Artūras Juodis, Vasilis Sarafidis, J. Ditzen
In this article, we introduce the xtgrangert command, which implements the panel Granger noncausality testing approach developed by Juodis, Karavias, and Sarafidis (2021, Empirical Economics 60: 93–112). This test offers superior size and power performance to existing tests, which stem from the use of a pooled estimator that has a faster N T convergence rate. The test has several other useful properties: it can be used in multivariate systems; it has power against both homogeneous and heterogeneous alternatives; and it allows for cross-section dependence and cross-section heteroskedasticity.
{"title":"Improved tests for Granger noncausality in panel data","authors":"Jiâqi Xiao, Yiannis Karavias, Artūras Juodis, Vasilis Sarafidis, J. Ditzen","doi":"10.1177/1536867X231162034","DOIUrl":"https://doi.org/10.1177/1536867X231162034","url":null,"abstract":"In this article, we introduce the xtgrangert command, which implements the panel Granger noncausality testing approach developed by Juodis, Karavias, and Sarafidis (2021, Empirical Economics 60: 93–112). This test offers superior size and power performance to existing tests, which stem from the use of a pooled estimator that has a faster N T convergence rate. The test has several other useful properties: it can be used in multivariate systems; it has power against both homogeneous and heterogeneous alternatives; and it allows for cross-section dependence and cross-section heteroskedasticity.","PeriodicalId":51171,"journal":{"name":"Stata Journal","volume":"23 1","pages":"230 - 242"},"PeriodicalIF":4.8,"publicationDate":"2023-03-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"47434154","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2023-03-01DOI: 10.1177/1536867X231162021
J. Gardner
This tip clarifies estimation of weighted panel-data models in Stata in two ways. First, it extends the well-known deviation-from-means interpretation of fixed-effects models and the equivalence between fixed-effects and first-differences models with two time periods to the case of weighted estimation. Second, it highlights several ways to fit weighted fixed-effects (WFE) models in Stata. Of course, the tip also applies to models that are weighted for reasons other than heteroskedasticity arising from group averaging.
{"title":"Stata tip 149: Weighted estimation of fixed-effects and first-differences models","authors":"J. Gardner","doi":"10.1177/1536867X231162021","DOIUrl":"https://doi.org/10.1177/1536867X231162021","url":null,"abstract":"This tip clarifies estimation of weighted panel-data models in Stata in two ways. First, it extends the well-known deviation-from-means interpretation of fixed-effects models and the equivalence between fixed-effects and first-differences models with two time periods to the case of weighted estimation. Second, it highlights several ways to fit weighted fixed-effects (WFE) models in Stata. Of course, the tip also applies to models that are weighted for reasons other than heteroskedasticity arising from group averaging.","PeriodicalId":51171,"journal":{"name":"Stata Journal","volume":"23 1","pages":"276 - 280"},"PeriodicalIF":4.8,"publicationDate":"2023-03-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"43116852","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2023-03-01DOI: 10.1177/1536867X231162022
Matthew Tibbles, E. Melse
Inset plots can be used to “zoom in” on densely populated areas of a graph or to add extra relevant data in the form of, for example, distribution plots. However, the standard Stata command for combining plots, graph combine, does not permit this type of seamless integration. Each plot within a graph combine object is allocated a grid cell that cannot be placed within another grid cell— at least not without certain (invariably unwanted) graphical complications. We present a fairly simple work-around to this issue using reproducible examples. The main idea is to plot insets along a second axis and then artificially modify the range of this axis to constrain the inset plot within a specified area of the main graph. Additional tips are included for producing more intricate, multilayered inset graphs.
{"title":"A note on creating inset plots using graph twoway","authors":"Matthew Tibbles, E. Melse","doi":"10.1177/1536867X231162022","DOIUrl":"https://doi.org/10.1177/1536867X231162022","url":null,"abstract":"Inset plots can be used to “zoom in” on densely populated areas of a graph or to add extra relevant data in the form of, for example, distribution plots. However, the standard Stata command for combining plots, graph combine, does not permit this type of seamless integration. Each plot within a graph combine object is allocated a grid cell that cannot be placed within another grid cell— at least not without certain (invariably unwanted) graphical complications. We present a fairly simple work-around to this issue using reproducible examples. The main idea is to plot insets along a second axis and then artificially modify the range of this axis to constrain the inset plot within a specified area of the main graph. Additional tips are included for producing more intricate, multilayered inset graphs.","PeriodicalId":51171,"journal":{"name":"Stata Journal","volume":"23 1","pages":"265 - 275"},"PeriodicalIF":4.8,"publicationDate":"2023-03-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"42973379","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2023-03-01DOI: 10.1177/1536867X231162032
Raymond Guiteras, Ahnjeong Kim, B. Quistorff, Clayson Shumway
In this article, we present statacons, an SCons-based build tool for Stata. Because of the integration of Stata and Python in recent versions of Stata, we are able to adapt SCons for Stata workflows without the use of an external shell or extensive configuration. We discuss the usefulness of build tools generally, provide examples of the use of statacons in Stata workflows, present key elements of the syntax of statacons, and discuss extensions, alternatives, and limitations. We provide recommendations for collaborative workflows and, at the end of the article, installation instructions.
{"title":"statacons: An SCons-based build tool for Stata","authors":"Raymond Guiteras, Ahnjeong Kim, B. Quistorff, Clayson Shumway","doi":"10.1177/1536867X231162032","DOIUrl":"https://doi.org/10.1177/1536867X231162032","url":null,"abstract":"In this article, we present statacons, an SCons-based build tool for Stata. Because of the integration of Stata and Python in recent versions of Stata, we are able to adapt SCons for Stata workflows without the use of an external shell or extensive configuration. We discuss the usefulness of build tools generally, provide examples of the use of statacons in Stata workflows, present key elements of the syntax of statacons, and discuss extensions, alternatives, and limitations. We provide recommendations for collaborative workflows and, at the end of the article, installation instructions.","PeriodicalId":51171,"journal":{"name":"Stata Journal","volume":"23 1","pages":"148 - 196"},"PeriodicalIF":4.8,"publicationDate":"2023-03-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"42459484","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2023-03-01DOI: 10.1177/1536867X231161976
S. Jenkins, F. Ríos‐Avila
Researchers use finite mixture models to analyze linked survey and administrative data on labor earnings, while also accounting for various types of measurement error in each data source. Different combinations of error-ridden and error-free observations characterize latent classes. Latent class probabilities depend on the probabilities of the different types of error. We introduce a suite of commands to fit finite mixture models to linked survey-administrative data: there is a general model and seven simpler variants. We also provide postestimation commands for assessment of reliability, marginal effects, data simulation, and prediction of hybrid variables that combine information from both data sources about the outcome of interest. Our commands can also be used to study measurement errors in other variables besides labor earnings.
{"title":"Finite mixture models for linked survey and administrative data: Estimation and postestimation","authors":"S. Jenkins, F. Ríos‐Avila","doi":"10.1177/1536867X231161976","DOIUrl":"https://doi.org/10.1177/1536867X231161976","url":null,"abstract":"Researchers use finite mixture models to analyze linked survey and administrative data on labor earnings, while also accounting for various types of measurement error in each data source. Different combinations of error-ridden and error-free observations characterize latent classes. Latent class probabilities depend on the probabilities of the different types of error. We introduce a suite of commands to fit finite mixture models to linked survey-administrative data: there is a general model and seven simpler variants. We also provide postestimation commands for assessment of reliability, marginal effects, data simulation, and prediction of hybrid variables that combine information from both data sources about the outcome of interest. Our commands can also be used to study measurement errors in other variables besides labor earnings.","PeriodicalId":51171,"journal":{"name":"Stata Journal","volume":"23 1","pages":"53 - 85"},"PeriodicalIF":4.8,"publicationDate":"2023-03-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"47650628","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2023-03-01Epub Date: 2023-04-05DOI: 10.1177/1536867X231161934
Ian R White, Ella Marley-Zagar, Tim P Morris, Mahesh K B Parmar, Patrick Royston, Abdel G Babiker
We describe a new command, artcat, that calculates sample size or power for a randomized controlled trial or similar experiment with an ordered categorical outcome, where analysis is by the proportional-odds model. artcat implements the method of Whitehead (1993, Statistics in Medicine 12: 2257-2271). We also propose and implement a new method that 1) allows the user to specify a treatment effect that does not obey the proportional-odds assumption, 2) offers greater accuracy for large treatment effects, and 3) allows for noninferiority trials. We illustrate the command and explore the value of an ordered categorical outcome over a binary outcome in various settings. We show by simulation that the methods perform well and that the new method is more accurate than Whitehead's method.
我们介绍了一个新命令 artcat,它可以计算随机对照试验或类似试验的样本量或功率,试验结果为有序分类结果,分析采用比例-胜数模型。 artcat 实现了怀特海(Whitehead,1993,Statistics in Medicine 12: 2257-2271)的方法。我们还提出并实施了一种新方法:1)允许用户指定不服从比例-胜数假设的治疗效果;2)为大治疗效果提供更高的准确性;3)允许进行非劣效试验。我们对命令进行了说明,并探讨了有序分类结果相对于二元结果在不同情况下的价值。我们通过模拟显示,这些方法表现良好,而且新方法比怀特海方法更准确。
{"title":"artcat: Sample-size calculation for an ordered categorical outcome.","authors":"Ian R White, Ella Marley-Zagar, Tim P Morris, Mahesh K B Parmar, Patrick Royston, Abdel G Babiker","doi":"10.1177/1536867X231161934","DOIUrl":"10.1177/1536867X231161934","url":null,"abstract":"<p><p>We describe a new command, artcat, that calculates sample size or power for a randomized controlled trial or similar experiment with an ordered categorical outcome, where analysis is by the proportional-odds model. artcat implements the method of Whitehead (1993, <i>Statistics in Medicine</i> 12: 2257-2271). We also propose and implement a new method that 1) allows the user to specify a treatment effect that does not obey the proportional-odds assumption, 2) offers greater accuracy for large treatment effects, and 3) allows for noninferiority trials. We illustrate the command and explore the value of an ordered categorical outcome over a binary outcome in various settings. We show by simulation that the methods perform well and that the new method is more accurate than Whitehead's method.</p>","PeriodicalId":51171,"journal":{"name":"Stata Journal","volume":"23 1","pages":"3-23"},"PeriodicalIF":3.2,"publicationDate":"2023-03-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7614472/pdf/EMS174193.pdf","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"9493501","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"OA","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2023-03-01Epub Date: 2023-04-05DOI: 10.1177/1536867X231161971
Ella Marley-Zagar, Ian R White, Patrick Royston, Friederike M-S Barthel, Mahesh K B Parmar, Abdel G Babiker
We describe the command artbin, which offers various new facilities for the calculation of sample size for binary outcome variables that are not otherwise available in Stata. While artbin has been available since 2004, it has not been previously described in the Stata Journal. artbin has been recently updated to include new options for different statistical tests, methods and study designs, improved syntax, and better handling of noninferiority trials. In this article, we describe the updated version of artbin and detail the various formulas used within artbin in different settings.
我们介绍了 artbin 命令,它为计算二元结果变量的样本量提供了各种新的工具,而这些工具在 Stata 中是无法使用的。artbin最近进行了更新,增加了用于不同统计检验、方法和研究设计的新选项,改进了语法,并更好地处理了非劣效性试验。在本文中,我们将介绍更新版的 artbin,并详细介绍 artbin 在不同环境下使用的各种公式。
{"title":"artbin: Extended sample size for randomized trials with binary outcomes.","authors":"Ella Marley-Zagar, Ian R White, Patrick Royston, Friederike M-S Barthel, Mahesh K B Parmar, Abdel G Babiker","doi":"10.1177/1536867X231161971","DOIUrl":"10.1177/1536867X231161971","url":null,"abstract":"<p><p>We describe the command artbin, which offers various new facilities for the calculation of sample size for binary outcome variables that are not otherwise available in Stata. While artbin has been available since 2004, it has not been previously described in the <i>Stata Journal</i>. artbin has been recently updated to include new options for different statistical tests, methods and study designs, improved syntax, and better handling of noninferiority trials. In this article, we describe the updated version of artbin and detail the various formulas used within artbin in different settings.</p>","PeriodicalId":51171,"journal":{"name":"Stata Journal","volume":"23 1","pages":"24-52"},"PeriodicalIF":4.8,"publicationDate":"2023-03-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7614770/pdf/","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"9831673","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"OA","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2023-03-01DOI: 10.1177/1536867X231161978
P. Taffé, Mingkai Peng, Vicki Stagg, T. Williamson
Recently, a new statistical methodology to assess the bias and precision of a new measurement method, which circumvents the deficiencies of the Bland and Altman (1986, Lancet 327: 307–310) limits of agreement method, was developed by Taffé (2018, Statistical Methods in Medical Research 27: 1650–1660). Later, the methodology was extended to assess the agreement. In addition, to allow for inferences, simultaneous confidence bands around the bias, precision, and agreement lines were developed (Taffé, 2020, Statistical Methods in Medical Research 29: 778–796). The goal of this article is to introduce the extended biasplot command, which implements these latest developments, and to illustrate its use by applying it to simulated data included with the command. Note that the Taffé method assumes that there are several measurements by one of the two measurement methods and possibly as few as one measurement by the other for each individual. The repeated measurements need not come from the reference standard but from any of the two measurement methods. This is a great advantage because it may sometimes be more feasible to gather repeated measurements either with the reference standard or the new measurement method.
最近,taff (2018, statistical Methods in Medical Research 27: 1650-1660)开发了一种新的统计方法来评估一种新测量方法的偏倚和精度,该方法绕过了Bland和Altman (1986, Lancet 327: 307-310)一致性方法限制的缺陷。后来,该方法被扩展到评估协定。此外,为了进行推断,还制定了偏差、精度和一致性线周围的同时置信区间(taff, 2020年,医学研究中的统计方法29:778-796)。本文的目的是介绍扩展的biasplot命令,它实现了这些最新的发展,并通过将其应用于命令中包含的模拟数据来说明它的用法。注意,taff方法假设两种测量方法中的一种有几种测量,而另一种可能只有一种测量。重复测量不需要来自参考标准,而需要来自两种测量方法中的任何一种。这是一个很大的优点,因为有时用参考标准或新的测量方法收集重复测量结果可能更可行。
{"title":"Extended biasplot command to assess bias, precision, and agreement in method comparison studies","authors":"P. Taffé, Mingkai Peng, Vicki Stagg, T. Williamson","doi":"10.1177/1536867X231161978","DOIUrl":"https://doi.org/10.1177/1536867X231161978","url":null,"abstract":"Recently, a new statistical methodology to assess the bias and precision of a new measurement method, which circumvents the deficiencies of the Bland and Altman (1986, Lancet 327: 307–310) limits of agreement method, was developed by Taffé (2018, Statistical Methods in Medical Research 27: 1650–1660). Later, the methodology was extended to assess the agreement. In addition, to allow for inferences, simultaneous confidence bands around the bias, precision, and agreement lines were developed (Taffé, 2020, Statistical Methods in Medical Research 29: 778–796). The goal of this article is to introduce the extended biasplot command, which implements these latest developments, and to illustrate its use by applying it to simulated data included with the command. Note that the Taffé method assumes that there are several measurements by one of the two measurement methods and possibly as few as one measurement by the other for each individual. The repeated measurements need not come from the reference standard but from any of the two measurement methods. This is a great advantage because it may sometimes be more feasible to gather repeated measurements either with the reference standard or the new measurement method.","PeriodicalId":51171,"journal":{"name":"Stata Journal","volume":"23 1","pages":"97 - 118"},"PeriodicalIF":4.8,"publicationDate":"2023-03-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"42479947","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Pub Date : 2023-03-01DOI: 10.1177/1536867X231162035
Jia Li, Z. Liao, Wenyu Zhou
In this article, we introduce a command, xtnpsreg, that implements a uniform nonparametric inference procedure for possibly unbalanced panel datasets with general forms of spatiotemporal dependence. We demonstrate how to apply this command via several examples, including 1) the nonparametric estimation of the conditional mean function and its marginal response, 2) the construction of uniform confidence bands for these nonparametric functional parameters, 3) specification tests for parametric model restrictions, and 4) the estimation and uniform inference for functional coefficients in semi-nonparametric models.
{"title":"Uniform nonparametric inference for spatially dependent panel data: The xtnpsreg command","authors":"Jia Li, Z. Liao, Wenyu Zhou","doi":"10.1177/1536867X231162035","DOIUrl":"https://doi.org/10.1177/1536867X231162035","url":null,"abstract":"In this article, we introduce a command, xtnpsreg, that implements a uniform nonparametric inference procedure for possibly unbalanced panel datasets with general forms of spatiotemporal dependence. We demonstrate how to apply this command via several examples, including 1) the nonparametric estimation of the conditional mean function and its marginal response, 2) the construction of uniform confidence bands for these nonparametric functional parameters, 3) specification tests for parametric model restrictions, and 4) the estimation and uniform inference for functional coefficients in semi-nonparametric models.","PeriodicalId":51171,"journal":{"name":"Stata Journal","volume":"23 1","pages":"243 - 264"},"PeriodicalIF":4.8,"publicationDate":"2023-03-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"43951461","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":2,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}