温馨提示：定期 清理浏览器缓存，可以获得最佳浏览体验。

**目录**

- Transferring data to/from Stata
- Stata Graphical User Interface (for Windows)
- General Use and Data Management
- Missing values
- String variables
- Error messages
- How does Stata compare with SAS and SPSS?
- Margins Command
- Regression
- Mediation
- Logistic Regression
- Analysis of Variance
- SEM
- Graphics
- Time Series
- Capabilities
- Advanced Statistics – Survey commands and clustering
- Advanced Statistics – Other
- Other
- 相关课程
- 课程一览

Can’t find your question? Try checking our General FAQ page.

How can I convert files among SAS, SPSS and Stata? How can I read data from multiple Excel sheets in Stata? How can I read Stata 12 data files in Stata 11? How do I export Stata .dta files to comma-separated files? How do I export Stata .dta files to a SAS Xport file? How can I load, write, or view a dBASE file, Excel file or Access file using odbc? How can I convert a Stata file to an MLwiN file using Stata program stata2mlwin? How can I convert a Stata file to an Mplus file?

**Stata to HLM**

How do I convert a Stata file to HLM? How can I input a dataset quickly? How do I read a data file that uses commas/tabs as delimeters? How can I output a formatted ASCII file? How do I load large data sets (> 1GB) under 32-bit Windows? (from Stata FAQs)

How can I anonymize patient IDs and still be able to decode them, if necessary? How can I sort data within rows independently for each observation? How can I create all pairs within groups? How do I copy Stata output and Stata graphs into Word? How can I save the contents of the results window? How can I make the results window hold more results? How do I update my copy of Stata? How do I check that the same data input by two people are consistently entered? How can I list observations in blocks? Can I do by and sort in one command? Why am I losing precision with large whole numbers (such as an ID variable)? How can I quickly recode continuous variables into groups? How do I standardize variables (make them have a mean of 0 and sd of 1)? How can I randomly assign observations to groups in Stata? How can I draw a random sample of my data? How can I read dates with both 2-digit and 4-digit year? How can I “fill down”/expand observations with respect to dates and then update my dates? How can I count the number of days between two dates? How do I assign the values of one variable as the value labels for another variable? How can I detect duplicate observations? How can I access information stored after I run a command in Stata (returned results)? How can I identify cases used by an estimation command using e(sample)? How can I sample from a datasets with frequency weights? How do I document and search a Stata dataset? How can I create dyad IDs? How can I generate automated filenames in Stata? How can I merge multiple files in Stata? How can I combine a large number of files?

Can I quickly see how many missing values a variable has? How can I see the number of missing values and patterns of missing values in my data file? How can I quickly recode missing values into different categories? How can I use multiply imputed data where original data is not included?

How can I quickly convert many string variables to numeric variables? How can I turn a string variable containing dates into a date variable Stata can recognize? How can I extract a portion of a string variable using regular expressions?

How can I handle the matsize too small error? How can I handle the No Room to Add Observations error?

**General Statistics**

How can you get 3-way, 4-way, 5-way or more cross tabulations in Stata? How can I compute power for contingency tables in Stata? How can I get descriptive statistics and the five number summary on one line? What’s with the different formulas for kurtosis? What are the differences between one-tailed and two-tailed tests?

How can I get margins for a multiply imputed survey logit model? How can I get margins and marginsplot on multiply imputated data? How can I get anova type results from xtmixed using the margins command? How can I use the margins command to understand multiple interactions in regression and anova? More of how can I use the margins command to understand multiple interactions in regression? How can I use the margins command to understand multiple interactions in logistic regression? How can I graph the results of the margins command? How can I use the margins command with a 3-way anova interaction? How can I get anova simple main effects with the margins command? How can I do anova contrasts using the margins command? How can get anova main-effects with dummy coding using margins? Why doesn’t the margins command work with a nested factor in anova? How can I do simple main effects using anovalator? How do I use the anovalator command?

Everything you always wanted to know about contrasts* (*But were afraid to ask) How can I understand a 3-way continuous interaction? (Stata 12) How can I understand a continuous by continuous interaction? (Stata 12) How can I understand a categorical by continuous interaction? (Stata 12) What happens if you omit the main effect in a regression model with an interaction? Why don’t my anova and regression results agree? (Stata 11) How can I get anova main-effects with dummy coding? (Stata 10) How can I compare regression coefficients between 2 groups? How can I compare regression coefficients across 3 (or more) groups?

How can graphically compare OLS and BLUP results in Stata? How can I do a scatterplot with regression line in Stata?

How can I get an R ^{2}with robust regression (rreg)?How do I interpret quantile regression coefficients? How does one do regression when the dependent variable is a proportion? What is seemingly unrelated regression and how can I perform it in Stata? How can I analyze count data in Stata? How can I use countfit in choosing a count model? What is the difference between xtreg-re, xtreg-fe? How can I estimate effect size for mixed? How can I compute effect size in Stata for regression? How can I generate fungible regression weights? Comparing various methods of analyzing clustered data in Stata. How can I create dummy variables in Stata? Can I make regression tables that look like those in journal articles? How can I run a piecewise regression in Stata? How can I find where to split a piecewise regression? How can I perform the likelihood ratio, Wald, and Lagrange multiplier (score) test in Stata? How Can I Perform Post Estimation Tests with Multiply Imputed Datasets? How Can I Estimate R-squared for a Model Estimated Using Multiply Imputed Data?

How can I compute indirect effects with imputed data? (Method 2) How can I compute indirect effects with imputed data? (Method 1) How can I get Monte Carlo standard errors for indirect effects? How can I compare indirect effects in a multiple group model? (Stata 12) How can I do mediation analysis with the sem command? (Stata 12) How can I perform mediation with multilevel data? (Method 2) How can I perform mediation with multilevel data? (Method 1) How can I do mediation analysis with a categorical IV in Stata? How can I do moderated mediation in Stata? How can I do moderated mediation with a categorical moderator using sem? How can I do moderated mediation with a categorical moderator in Stata? How can I perform Sobel-Goodman mediation tests? How can I analyze multiple mediators in Stata?

How can I understand a continuous by continuous interaction in logistic regression? How can I understand a categorical by continuous interaction in logistic regression? How can I understand a categorical by categorical interaction in logistic regression? How can I compute predictive margins for xtmelogit with random effects? How can I estimate probabilities that include the random effects in xtmelogit? (Stata 11) How can I understand a categorical by continuous interaction in ologit? How do I interpret odds ratios in logistic regression? How do I use adjust in probit or logit? How can I get a Somers’ D after logistic regression in Stata? How can I estimate relative risk using glm for common outcomes in cohort studies? How can I test the difference in area under ROC curve for two logistic models?

Everything you always wanted to know about contrasts* (*But were afraid to ask) How can I get denominator degrees of freedom for xtmixed? How can I test simple effects in repeated measures models? (Stata 12) How can I understand a three-way interaction in ANOVA? (Stata 12) How can I do power and robustness analyses for factorial ANOVA? (Stata 11) How can I get ANOVA main-effects with dummy coding? How can I get ANOVA type III results using xtmixed? How can I get ANOVA simple main effects with dummy coding? Why don’t my ANOVA and regression results agree? (Stata 11) How can I analyze a nested model using xtmixed? How can I compute critical values for test of simple effects? How can I do classical ANOVA designs using xtmixed? (Stata 12) How can I do post-hoc pairwise comparisons in Stata? How can I do post-hoc pairwise comparisons of adjusted means in Stata? How can I do profile analysis in Stata? How can I do multivariate repeated measures in Stata? How can I plot ANOVA cell means in Stata? How can graph group means and standard deviations for ANOVA? How can I do ANOVA contrasts in Stata? How can I do tests of simple main effects in Stata? How can I check for homogeneity of variance in a factorial ANOVA design? How can I test for nonadditivity in a randomized block ANOVA in Stata? How can I determine the correct term in an ANOVA using Stata? How does the ANOVA command handle collinearity? (from Stata FAQs)

Linear growth models: xtmixed versus sem How can I do CFA with binary variables? What are the saturated and baseline models in sem? How can I do mediation analysis with the sem command? (Stata 12) How can I check measurement invariance using the sem command? (Stata 12) How can I do EFA within a CFA framework? (Stata 12) How can I perform a factor analysis with categorical (or categorical and continuous) variables?

How can I overlay two histograms? How can I make a correlation matrix heat map? How can I graph chi-square power curves in Stata? Where can I find examples of user written graph commands for Stata? How can I do a profile plot in Stata? How can graph group means and standard deviations for ANOVA? How can I combine a histogram and a boxplot in Stata? How can I make a bar graph with error bars? How can I graph two (or more) groups using different symbols? How do I graph data with dates? How can I view/compare different marker symbol options? How do I save a Stata graph as an EPS file? How do I use xtline in Stata? How can I visualize longitudinal data in Stata?

How to collapse a daily time series to a monthly time series How to extract month and year component from a variable with %tm format

See the Stata capabilities page for information about the capabilities of Stata, including Linear models, Binary, count, and limited dependent variables, Resampling and simulation methods, Graphics, Survey methods, Survival analysis

How do I use the Stata survey (svy) commands? Sample setups for commonly used survey data sets Choosing the correct analysis for various survey designs How can I check for collinearity in survey regression? How can I do a t-test with survey data? How can the standard errors with the cluster() option be smaller than those without the cluster() option? (from Stata FAQs) Do the svy commands handle zero weights differently than non-svy commands? (from Stata FAQs) How can I analyze a subpopulation of my survey data in Stata? Why doesn’t summarize accept pweights? What does summarize calculate when you use aweights? (from Stata FAQs) Why doesn’t the test of the overall survey regression model in Stata match the results from SAS and SUDAAN?

How can I do multilevel principal components analysis? How can I access the random effects after xtmixed using diparm? How can I convert a multilevel model to a mixed model? How can I do factor analysis with missing data in Stata? How can I do correspondence analysis on summary data? How to do parallel analysis for pca or factor analysis in Stata? How can I compute tetrachoric correlations? How can I calculate a kappa statistic for variables with unequal score ranges? How should I analyze percentile rank data? Why do estimation commands sometimes drop variables? (from Stata FAQs) How can I test for equality of distribution? How can I test for a trend across a categorical variable? How do I write my own bootstrap program? How can I manually generate the predicted counts from a ZIP or ZINB model based on the parameter estimates? How can I perform multiple imputation on longitudinal data using ICE? How can I calculate Moran’s I in Stata? How do I generate a variogram for spatial data in Stata? How can I fit a random intercept or mixed effects model with heteroskedastic errors in Stata? How is the 95% CI of the variance component in a mixed model calculated?

What is the difference between = and == in STATA? What types of weights do SAS, Stata and SPSS support? How do I do elementwise operations on a matrix? How can I get poisson probabilities in Stata? How can I generate a saturated model using DESMAT? How can I translate a file into a Postscript file? How do I use file write to write results or other information to an external text file? How do I use file read to read in information in an external text file? How do I use search to search for programs and additional help?

连享会-直播课上线了！

http://lianxh.duanshu.com

免费公开课：

直击面板数据模型 - 连玉君，时长：1小时40分钟 Stata 33 讲 - 连玉君, 每讲 15 分钟. 部分直播课 课程资料下载 (PPT，dofiles等)

支持回看，所有课程可以随时购买观看。

专题 | 嘉宾 | 直播/回看视频 |
---|---|---|

⭐ 最新专题 ⭐ |
DSGE, 因果推断, 空间计量等 | |

⭕ Stata数据清洗 |
游万海 | 直播, 2 小时，已上线 |

研究设计 | 连玉君 | 我的特斯拉-实证研究设计，-幻灯片- |

面板模型 | 连玉君 | 动态面板模型，-幻灯片- |

面板模型 | 连玉君 | 直击面板数据模型 [免费公开课，2小时] |

Note: 部分课程的资料，PPT 等可以前往 连享会-直播课 主页查看，下载。

## 关于我们

**Stata连享会**由中山大学连玉君老师团队创办，定期分享实证分析经验。直播间 有很多视频课程，可以随时观看。连享会-主页 和 知乎专栏，300+ 推文，实证分析不再抓狂。 **公众号推文分类：**计量专题 | 分类推文 | 资源工具。推文分成**内生性**|**空间计量**|**时序面板**|**结果输出**|**交乘调节**五类，主流方法介绍一目了然：DID, RDD, IV, GMM, FE, Probit 等。**公众号关键词搜索/回复**功能已经上线。大家可以在公众号左下角点击键盘图标，输入简要关键词，以便快速呈现历史推文，获取工具软件和数据下载。常见关键词：`课程, 直播, 视频, 客服, 模型设定, 研究设计, stata, plus, 绘图, 编程, 面板, 论文重现, 可视化, RDD, DID, PSM, 合成控制法`

等

连享会小程序：扫一扫，看推文，看视频……

扫码加入连享会微信群，提问交流更方便

✏ 连享会学习群-常见问题解答汇总：

✨ https://gitee.com/arlionn/WD

12/15
计量专题
108200

12/01
公开课
12898

05/29
Stata绘图
21

05/27
Stata命令
52

05/26
公开课
96

05/25
Stata命令
127

05/24
专题课程
412

05/24
专题课程
103

05/23
数据分享
378

05/21
Stata命令
190