UCLA Stata FAQ:Stata常见问题详解

Stata 现场班报名中……
  • Stata连享会 精品专题 || 精彩推文
    点击此处-查看完整推文列表

文章目录

          • [Stata 现场班报名中……](https://gitee.com/arlionn/stata_training/blob/master/README.md)
  • Stata Frequently Asked Questions
      • Transferring data to/from Stata
        • Stata to HLM
      • 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
        • Interactions and comparing coefficients across groups
        • Regression graphics
        • Types of regression
      • Mediation
      • Logistic Regression
      • Analysis of Variance
      • SEM
      • Graphics
      • Time Series
      • Capabilities
      • Advanced Statistics – Survey commands and clustering
      • Advanced Statistics – Other
      • Other
        • 关于我们
        • 联系我们
        • 往期精彩推文

Source: https://stats.idre.ucla.edu/stata/faq/

Stata Frequently Asked Questions

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

Transferring data to/from Stata

  • 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)

Stata Graphical User Interface (for Windows)

  • How do I change the font (PC version)?

General Use and Data Management

  • 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?

Missing values

  • 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?

String variables

  • 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?

Error messages

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

How does Stata compare with SAS and SPSS?

  • How do I do this SAS Command in Stata?
  • How do I do this SPSS Command in Stata?

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?

Margins Command

  • 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?

Regression

Interactions and comparing coefficients across groups

  • 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?

Regression graphics

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

Types of regression

  • How can I get an R2 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?

Mediation

  • 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 perform mediation with binary variables?
  • 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?

Logistic Regression

  • 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?

Analysis of Variance

  • 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)

SEM

  • 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?

Graphics

  • 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?

Time Series

  • 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

Capabilities

  • 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

Advanced Statistics – Survey commands and clustering

  • 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?

Advanced Statistics – Other

  • 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?

Other

  • 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?

关于我们

  • Stata 连享会(公众号:StataChina)】由中山大学连玉君老师团队创办,旨在定期与大家分享 Stata 应用的各种经验和技巧。
  • 公众号推文同步发布于 CSDN-Stata连享会 、简书-Stata连享会 和 知乎-连玉君Stata专栏。可以在上述网站中搜索关键词StataStata连享会后关注我们。
  • 点击推文底部【阅读原文】可以查看推文中的链接并下载相关资料。
  • Stata连享会 精彩推文1 || 精彩推文2

联系我们

  • 欢迎赐稿: 欢迎将您的文章或笔记投稿至Stata连享会(公众号: StataChina),我们会保留您的署名;录用稿件达五篇以上,即可免费获得 Stata 现场培训 (初级或高级选其一) 资格。
  • 意见和资料: 欢迎您的宝贵意见,您也可以来信索取推文中提及的程序和数据。
  • 招募英才: 欢迎加入我们的团队,一起学习 Stata。合作编辑或撰写稿件五篇以上,即可免费获得 Stata 现场培训 (初级或高级选其一) 资格。
  • 联系邮件: StataChina@163.com

往期精彩推文

  • Stata连享会推文列表
  • Stata连享会 精彩推文1 || 精彩推文2

欢迎加入Stata连享会(公众号: StataChina)

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/49772.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

心理学博士vs计算机博士,UCLA心理学博士排名,地表最客观干货

原标题:UCLA心理学博士排名,地表最客观干货 加州大学洛杉矶分校是一间位于美国加利福尼亚州洛杉矶的公立学校。UCLA是美国商业金融、高科技产业、电影艺术等专业人才的摇篮。UCLA是加利福尼亚大学系统中的第二所大学,与柏克莱加利福尼亚大学(…

ucla ai_UCLA的可持续性:用户体验案例研究

ucla ai Role: UX Researcher / UX Designer / Critical-thinker 角色: UX研究人员/ UX设计人员/批判性思维者 Scope: 4 weeks, March — March 2020 范围: 4周,2020年3月至2020年3月 What I Did: UX Research, Speculative Design, Produc…

UCLA-(R Graphics: Intro to ggplot2)笔记

目录 原文请见R Graphics: Introduction to ggplot2 (12) (ucla.edu)https://stats.oarc.ucla.edu/stat/data/intro_ggplot2_int/ggplot2_intro_interactive.html#(12) 由于CSDN有时候图会看不见,本文将不放置图片 图形的语法元素 Sitka数据集(这一部分其实就是…

医学图像公开数据集

1. 前列腺数据集 ​ 包含六个center的前列腺分割数据集(可以用来做multi-domain相关的分割任务),详细情况可以查看下表,可以从这条 github链接下载和预处理数据集

UCLA ECE M199 Winter 2021 Midterm Review 笔记整理

UCLA 2021 M199 嵌入式课程中期复习笔记整理 原视频连接:点击

火爆的图机器学习,2020年将有哪些研究趋势?

2020-02-05 23:41 导语:ICLR 2020 图机器学习全面分析 2019年绝对是图机器学习(GML)大火的一年,凡是学术会议,图神经网络的会场总会爆满。 图机器学习的研究之所以在2019年突然变得火热,原因在于&#x…

ucla研究生计算机科学,详解UCLA研究生录取数据,达到什么标准才能稳被录?

原标题:详解UCLA研究生录取数据,达到什么标准才能稳被录? 加州大学洛杉矶分校(UCLA)成立于1919年。它是继加州大学伯克利分校和加州大学戴维斯分校之后的第三所加州大学。 UCLA经常被评为世界顶尖大学之一。它在2019年USNews上评为美国排名第…

ucla研究生计算机科学,揭秘UCLA研究生录取数据,达到什么标准才能稳被录?

原标题:揭秘UCLA研究生录取数据,达到什么标准才能稳被录? 加州大学洛杉矶分校(UCLA)成立于1919年。它是继加州大学伯克利分校和加州大学戴维斯分校之后的第三所加州大学。 UCLA经常被评为世界顶尖大学之一。它在2019年USNews上评为美国排名第…

2018 ucla计算机排名,2018福布斯最具价值美国大学排名:加州UCLA位列榜首!

对于美国留学的申请来说,也许大家在选校过程中都会比较倾向于USNEWS的院校排名榜。但是,怎样从多方面更多的了解你想要选择的学校呢?美国著名的权威财经杂志《福布斯》根据净价格、净债务、校友收入、按时毕业、学校质量等指标进行排名&#…

加州ucla 计算机学校,美国加州大学洛杉矶分校UCLA计算机硕士CS录取

原标题:美国加州大学洛杉矶分校UCLA计算机硕士CS录取 【背景介绍】 H同学,美国本科,CS; GPA 3.79/4.0,GRE 332,免TOEFL; University of California-Los Angeles,MS in Computer Science 加州大学洛杉矶分校…

ucla 计算机网络,2020年UCLA计算机工程排名珍贵干货专业讲解

原标题:2020年UCLA计算机工程排名珍贵干货专业讲解 UCLA著名的理由很多,当中包含它拥有800万册以上藏书的图书馆,得奖连连的体育团体(UCLA的篮球队在美国NCAA大学联赛中获得冠军最多,号称篮球大学);直到去年为止UCLA获得99次美国全…

吾剑未尝不利,国内Azure平替,科大讯飞人工智能免费AI语音合成(TTS)服务Python3.10接入

微软Azure平台的语音合成(TTS)技术确实神乎其技,这一点在之前的一篇:含辞未吐,声若幽兰,史上最强免费人工智能AI语音合成TTS服务微软Azure(Python3.10接入),已经做过详细介绍,然则Azure平台需要信用卡验证,有一定门槛&…

关于讯飞科大语音识别SDK导入的10407问题

一、问题 使用科大讯飞SDK做在线语音识别,参考别人项目在Java中实现在线语音识别实现的时候, 因为导入了别人SDK中的.so文件,所以使用别人Appid的时候项目可以正常运行,但是采用自己的Appid就会出错,出现错误如下&am…

科大讯飞语音合成实例

代码地址如下:http://www.demodashi.com/demo/13209.html 前言 今天讲讲科大讯飞的语音合成功能吧 涉及以下内容: 1. 在科大讯飞平台上创建应用 2. 在androidstudio中的配置 3. 语音合成相关代码 4. 语音合成工具类SpeechHelper的调用 5. 使用过程…

Android 科大讯飞离线语音识别

最近Boss让我开发一个离线语音听写功能 , 可是我发现科大讯飞的离线版本下架了 , 也看了很多地方如百度语音....... 都没发现有离线版本 , 然而今天突然发现科大讯飞的离线听写又上架了 这就让我很开心 . 我就立马把它下载了下来,集成到我的项目中去 . 然后经过一个小时的努力…

Python调用科大讯飞语音合成离线SDK

Python调用科大讯飞语音合成离线SDK 科大讯飞语音合成技术代码展示总结 科大讯飞语音合成技术 科大讯飞语音合成技术在国内是领先的,如果单纯想要Python语言对其进行编写,是不支持的。故我们可以采用对其离线C语言的SDK进行调用,从而达到我们…

科大讯飞SDK下载

科大讯飞SDK下载 科大讯飞作为中国最大的智能语音技术提供商,在智能语音技术领域有着长期的研究积累,并在中文语音合成、语音识别、口语评测等多项技术上拥有国际领先的成果。今天就带领大家初涉科大讯飞,成为科大讯飞语音开发者。 本文只介绍…

详解科大讯飞语音识别

公司的项目要用到一个语音识别所以就弄了一下,国内的科大讯飞的名气比较响一些所以就选用了科大讯飞,废话不多说直接开干 1,下载sdk,注册获取APPid,这都不废话,需要什么就下载什么 2,把下载的…

百度移动端和PC蜘蛛的区别

百度移动端和PC蜘蛛分别是什么,如何让百度做到针对性抓取 众所周知,百度蜘蛛大体上分为百度移动端蜘蛛和百度PC端蜘蛛,百度移动端和百度PC端蜘蛛又可分为百度高权重蜘蛛、百度低权重蜘蛛(百度官方并没有承认的)以及百…

百度蜘蛛的抓取方式有哪些

做seo的人都知道,百度蜘蛛对网站的抓取是间歇性的,需要根据网站的质量、网站的权重以及网站类型的大小,来决定抓取的频率。百度蜘蛛最喜欢的就是抓取网站文章了,所以网站需要保持每日的文章更新。那么百度蜘蛛的抓取方式有哪些呢&…