Stata

In: Business and Management

Submitted By zhangyp
Words 7147
Pages 29
STATA 十八讲1入门

STATA 十八讲

中国人民大学 陈传波 chrisccb@126.com

1

STATA 十八讲1入门

目录
STATA十八讲 ....................................................................................................................................1 目录 ..................................................................................................................................................2 前 言 ..............................................................................................................................................6 1 STATA入门.....................................................................................................................................9 1.1 安装.....................................................................................................................................9 1.2 启用和退出.........................................................................................................................9 1.3 打开和查看数据...............................................................................................................11 1.4 寻求帮助与网络资源.......................................................................................................12 1.5 命令示例...........................................................................................................................13 1.6 几个环境设置...................................................................................................................14 1.7 复习和练习.......................................................................................................................15 1.8 附录...................................................................................................................................16 2 命令语句 .....................................................................................................................................18 2.1…...

Similar Documents

Stata

...Appendix II: STATA Preliminary STATA is a statistical software package that offers a large number of statistical and econometric estimation procedures. With STATA we can easily manage data and apply standard statistical and econometric methods such as regression analysis and limited dependent variable analysis to crosssectional or longitudinal data. STATA is widely used by analysts working with household survey data. 1. Getting Started 1.1. Starting STATA Start a STATA session by double-clicking on the STATA icon in your desktop. The STATA computing environment comprises four main windows. The size and shape of these windows may be moved about on the screen. Their general look and description are shown below: It is useful to have the Stata Results window be the largest so you can see a lot of information about your commands and output on the screen. In addition to these windows STATA environment has a menu and a toolbar at the top (to perform STATA operations) and a directory status bar at the bottom (that shows the current directory). You can use menu and toolbar to issue different Poverty Manual, All, JH Revision of August 8, 2005 Page 170 of 218 STATA commands (like opening and saving data files), although most of the time it is more convenient to use the Stata Command window to perform those tasks. If you are creating a log file (see below for more details), the contents can also be displayed on the screen; this is sometimes useful if one needs to back up......

Words: 3880 - Pages: 16

Stata

...Economic Modelling 28 (2011) 1348–1353 Contents lists available at ScienceDirect Economic Modelling j o u r n a l h o m e p a g e : w w w. e l s ev i e r. c o m / l o c a t e / e c m o d Foreign direct investment and China's regional income inequality☆ Kang Yu a, Xian Xin b,c, Ping Guo a, Xiaoyun Liu d,⁎ a School of Economics and Management, Zhejiang Forestry University, Zhejiang, 311300, PR China Center for Rural Development Policy, China Agricultural University, Beijing, 100083, PR China c College of Economics and Management, China Agricultural University, Beijing, 100083, PR China d College of Humanities and Development Studies, China Agricultural University, Beijing, 100083, PR China b a r t i c l e i n f o a b s t r a c t China's widening regional income inequality coupled with its pronounced regional disparity in foreign direct investment stock since 1990 has claimed the attention of many scholars. While some researchers confirm regional disparity in China's foreign direct investment, others attribute the widening regional income inequality to this regional disparity. This paper thus assesses the impacts of China's stock of foreign direct investment on its regional income inequality using simultaneous equation model and the Shapley value regression-based decomposition approach. Our results suggest that China's stock of foreign direct investment has accounted for merely 2% of its regional income inequality. Furthermore, the contribution ratio of......

Words: 5685 - Pages: 23

Business

...out on your own how to use Stata in ways that are unfamiliar to you; therefore: NO consultation with other students allowed for this part of the assignment) This involves the use of the faculty salary data set faculty.dta, which is in the iSite Data tab. For each of questions (a) through (d), do the following: i. In 1 or 2 sentences, briefly summarize how you found the answer. ii. Give a URL or Stata manual-with-page-number or Stata help window or data-analysis-book-with-page-number (or the equivalent) that contains the answer. iii. Run the appropriate command and include the command and Stata output in your write-up. For some of the questions, a graph is produced, and should also be included in your write-up for this assignment. a) How can the Stata pwcorr command be used to find the significance level (i.e., p-value) for the test that the correlation between the variables salary and market is zero? i. Before beginning, we performed a Google search to better understand the correlation between variables. After loading the data file, we then entered the “pwcorr salary market, sig print (.05)” command. The University of Indiana Stata website was very helpful in both providing code and explanations. In this case, the correlation between salary and market test scores was positive, moderately strong, and statistically significant (r=.4072, p < .001). To find the significance level ii. http://kb.iu.edu/data/alya.html iii. The Stata code and results are:......

Words: 1346 - Pages: 6

Tp Probit Y Logit Stata

...con que hay una relación directa entre vivir en una ciudad y la probabilidad de participar en la fuerza de trabajo. Los parámetros distintos de 0 son: LWW1, KL6, WA, WE y PRIN. Según el Stata 11, converge en 4 iteraciones. Con respecto al valor del pseudo-R2 es 0.1270. Sin lugar a dudas, esto indica que un bajo porcentaje de las predicciones son correctas Por otra parte, en esta muestra, la aproximación de Amemiya no es buena. Algunos ejemplos son: LOGIT | | | OLS | | | AMEMIYA | LWW1 | 0,4644233 | | LWW1 | 0,093275 | | 0,116106 | KL6 | -1 | | KL6 | -0,29064 | | -0,3673 | Si bien los valores son cercanos, no equivale a 0,25 veces sino que en promedio equivale a un 0,19 veces aproximadamente. Con respecto a los coeficientes de la variable dummy (CIT), la aproximación no es buena mientras que para el coeficiente que acompaña a la constante si lo es: LOGIT | | | OLS | | AMEMIYA+0,5 | CIT | 0,0127482 |   | CIT | -0,00448 | 0,50318705 | CONS | 0,9510144 |   | CONS | 0,692292 | 0,7377536 | c) Con respecto a los signos de los parámetros, estos tienen sentido ya que coinciden con los signos de la estimación utilizando el modelo Logit. Es decir, todos los parámetros tienen los signos iguales. Los parámetros distintos de 0 son: LWW1, KL6, WA, WE y PRIN Según el Stata 11, converge en 4 iteraciones. En particular, converge a la misma velocidad que en el modelo Logit. Con respecto al valor del pseudo-R2 es 0.1272. Nuevamente, esto indica que el......

Words: 1823 - Pages: 8

Case

...Mgmt 469 Practice Using Stata; Estimating CAPM In this tutorial, you will use monthly returns on several assets to compute stock betas. (The data is from 1978-1987.) Be sure to do steps 1-4. Steps 5-10 require navigating folders. This may prove tricky and can be skipped if you like. 1) You have three options for getting the data. Option (a) is much preferred for now. I will assume that you choose option (a) for this practice project. a) I will send you the data as attachments to an email. You can then save the files to the folder of your choice on the lab computer (or your own computer if you own Stata.) b) You can find the link on the course page. If you choose this option, please save the data to another folder. Do not work with the original data set. cd path:\folder save mycapmfile I will assume you have selected option (a). You should now open Stata (as you would any other program) and then open the capm.dta Stata file (again, as you would with any other file.) 2) Create new variables representing the risk premia for the market and for General Foods ge rpmarket=market-riskfree ge rpgenmills=genmills-riskfree 3) Obtain some summary statistics su riskfree market genmills or, better yet, su riskfree, de (this provides detailed statistics) Which has the highest return? Which has the lowest variance? Are you surprised? 4) Compute beta. Regress rpgmills on rpmarket: regress rpgenmills rpmarket At this point, your Stata screen should look something like the next page (the......

Words: 586 - Pages: 3

Analog Devices, Incorporated: Microelectromechanical Systems (Mems )

...no. 2-0018 Analog Devices, Incorporated: Microelectromechanical Systems (MEMS) From a conference room on the top floor of the four-story semiconductor manufacturing facility, Ray Stata briefly took in the view of the Massachusetts Institute of Technology (MIT) campus. In particular, he noticed the building under construction that would soon bear his name. Asked how this particular honor felt, Mr. Stata responded with a humble shrug. However, when asked about the Microelectromechanical Systems (MEMS) business, Mr. Stata was willing to show considerable pride. Mr. Stata was Chairman of Analog Devices, Incorporated (ADI), a company which he co-founded in 1965. MEMS was one division. He had invested a tremendous amount of personal attention and energy to the success of MEMS – and risked his reputation. In fact, without his vision and dedicated leadership, this ambitious, entrepreneurial effort would have collapsed under mounting losses several years earlier. During one three-year stretch, from 1997 to 2000, Mr. Stata had decided to simultaneously serve as Chairman of ADI and General Manager of the MEMS division in order to keep the venture alive. In 2002, Mr. Stata regarded the MEMS business as a jewel. With worldwide technical supremacy that had been built over fifteen years, the business was profitable, and the long-term growth prospects appeared tremendous. Still, he readily acknowledged that many of his colleagues disagreed with his assessment that the business was an......

Words: 9773 - Pages: 40

Stata Guide

...Stata Guide (Version 10) Sunaina Dhingra This guide introduces the basic commands of Stata. 1. Starting Stata    Start Stata by using shortcut on the desktop that you can double-click Start Stata using the Windows menu, click the Start > All Programs > Stata 10 Locate a Stata data file, with *.dta extension, and double-click 2. Stata environment     Command—this is where Stata command are typed Results—output from commands, and error messages, appear here Review—a listing of commands recently executed Variables—names of variables in data and labels (if created) 3. Recording Output a. Log file Log file keeps track of everything that happens in the result window. In short, it keeps a record of the commands you have issued and their results during your session. In STATA log files have the extension .smcl or .log  Go to File > Log > Begin to open a log file. A screen will pop up, asking for where you want the log file to be saved.  Use command: log using filename [, append replace text]  where filename is any name you wish to give the file. The append option simply adds more information to an existing file, whereas the replace option erases anything that was already in the file.  Full logs are recorded in one of two formats: SMCL (Stata Markup and Control Language) or text (meaning ASCII). The default is SMCL, but the option text can change that.  If you want to temporarily turn off the log session, type log off in the command window. The session will......

Words: 4290 - Pages: 18

Stata

...De acuerdo a la prueba F de la regresión, se puede ver que el modelo es estadísticamente significativo ya que su valor es menor a 0.05 (su valor es 0.0000), de manera que este modelo logra explicar relaciones entre variables. La Hipótesis 1 plantea que los estudiantes de derecha tienden a tener actitudes más fuertes en contra de la democracia liberal que los estudiantes de izquierda. De acuerdo a este modelo, la variable ideología (l1) se encuentra relacionada de forma positiva con las actitudes en contra de la democracia liberal (variable iliberal) dado que el valor T de la ideología es 5.87. Teniendo en cuenta este valor se puede ver entonces que cuando la ideología de un estudiante aumenta (hacia el espectro de derecha), las actitudes en contra de la democracia liberal aumentan en 1.53. Esto demuestra que la hipótesis es válida. La Hipótesis 2 plantea que quienes evalúan mejor el trabajo del gobierno actual tienen actitudes más fuertes en contra de la democracia liberal. De acuerdo a este modelo, la evaluación del gobierno actual (m1ar) no se encuentra relacionada con las actitudes en contra de la democracia liberal (iliberal) dado que su valor T es -0.44. Este valor muestra que no hay una relación existente entre estas dos variables, de manera que son independientes la una de la otra y así, se rechaza la hipótesis. La Hipótesis 3 plantea que quienes evalúan mejor el trabajo del gobierno anterior tienen actitudes más fuertes en contra de la democracia liberal.......

Words: 717 - Pages: 3

Us Skewness

...estimation (prediction) and individual prediction : We can predict the mean, individuals and their confidence intervals. (Spss statistics regression linear save predicted values: unstandardized) Testing a model Wonjae Before setting up a model 1. Identify the linear relationship between each independent variable and dependent variable. Create scatter plot for each X and Y. ( STATA: plot Y X1 ovtest, rhs graph Y X1 X2 X3, matrix avplots ( STATA: pcorr Y X1 X2 , ) pcorr X1 Y X2 , pcorr X2 Y X1 ) 2. Check partial correlation for each X and Y. , plot Y X2 ) After setting up a model 1. Testing whether two different variables have same coefficients. The null hypothesis is that “X1” and “X2” variables have the same impact on Y. ( STATA: test X1 = X2 ) 2. Testing Multicollinearity (Gujarati, p.345) 1) Detection High R2 but few significant t-ratios. High pair-wise (zero-order) correlations among regressors ( STATA: regress Y X1 X2 X3 graph Y X1 X2 X3, matrix avplots Examination of partial correlations Auxiliary regressions Eigen-values and condition index Tolerance and variance inflation factor ( STATA: regress Y X1 X2 X3 vif ) There might be a problem of multicollinearity. ) # Interpretation: If a VIF is in excess of 20, or a tolerance (1/VIF) is .05 or less, 2) Correction: A. Do nothing If the main purpose of modeling is predicting Y only, then don’t worry. (since ESS is left the same) “Don’t worry about multicollinearity if the R-squared from the regression......

Words: 1446 - Pages: 6

Question 1 Had Mr. Payne Negotiated an Agreement with Adi That Allowed Him to Start a Separate, Venture-Financed Company to Commercialize Mems Devices in the Late 80s, He Would Have Realized His Goal of Heading His Own

...no. 2-0018 Analog Devices, Incorporated: Microelectromechanical Systems (MEMS) From a conference room on the top floor of the four-story semiconductor manufacturing facility, Ray Stata briefly took in the view of the Massachusetts Institute of Technology (MIT) campus. In particular, he noticed the building under construction that would soon bear his name. Asked how this particular honor felt, Mr. Stata responded with a humble shrug. However, when asked about the Microelectromechanical Systems (MEMS) business, Mr. Stata was willing to show considerable pride. Mr. Stata was Chairman of Analog Devices, Incorporated (ADI), a company which he co-founded in 1965. MEMS was one division. He had invested a tremendous amount of personal attention and energy to the success of MEMS – and risked his reputation. In fact, without his vision and dedicated leadership, this ambitious, entrepreneurial effort would have collapsed under mounting losses several years earlier. During one three-year stretch, from 1997 to 2000, Mr. Stata had decided to simultaneously serve as Chairman of ADI and General Manager of the MEMS division in order to keep the venture alive. In 2002, Mr. Stata regarded the MEMS business as a jewel. With worldwide technical supremacy that had been built over fifteen years, the business was profitable, and the long-term growth prospects appeared tremendous. Still, he readily acknowledged that many of his colleagues disagreed with his assessment that the business was an......

Words: 9858 - Pages: 40

Do Mind Your Mind

...Princeton University Press Print ISBN-13: 978-0-691-12035-5 Purdue University Economics Department: Econometrics - Spring Semester 2015 3. The statistical software package, Stata, is used in this course. Some of the assignments will require it. The software is available in several (Krannert Computing Center and possibly others) of the labs on campus. Demonstrations, in class, of its use and voluntary (outside class) training will equip students with the requisite knowledge about the software. Assessment Students’ performances in the class will be measured using the following tasks. 1. Examinations: Students will complete 2 midterm exams and 1 final exam. All exams are cumulative. The exams will be held as shown on the schedule on the last page of this syllabus (please mark your calendars). The final exam is held during exam week. Please plan to remain on campus through all of exam week. 2. Problem Sets: The instructor will assign problems pertaining to each topic covered in the Wooldridge textbook. These problem sets will combine computer (Stata) and written response exercises. a. Students are encouraged to work on problem sets in small groups, but each student must turn in his own individual copy, showing his own understanding of the problems. b. For Stata problems, students will attach the Stata output upon which their answers are based to receive full credit. c. Students are encouraged to go through the notes before working on the problem sets. Don’t wait until the......

Words: 2067 - Pages: 9

Stata Problems

...CHANGE MANAGEMENT IN ACTION Transforming the corporate culture at Heinz Australia The Heinz Company's association with Australia began back in the 1880s when Heinz products were first imported from the USA to feed the American miners who came to work in the goldfields. Production first began in Australia in 1935 when Heinz (US) leased a factory in Richmond, Melbourne. During World War II Heinz began operating a factory in Devonport, and, from 1943 to 1946, the company sold 86 per cent of its production to the Commonwealth Government for supply to all the armed services. Postwar, Heinz Australia continued to expand, establishing new factories and acquiring numerous companies from the 1970s through to the 1990s. In 1998 Heinz Australia merged with Heinz–Watties, New Zealand. In 2003 the Heinz Watties Australasian business was restructured into three separate business units: HJ Heinz Australia, Tegal Foods New Zealand, and Heinz Watties New Zealand. It currently employs around 800 people in Australia and 1200 in New Zealand. With the restructure in 2003, Peter Widdows was appointed Managing Director of Heinz Australia and the company moved into its new head office at Southbank, Melbourne. In February 2009 Widdows was appointed Chief Executive Officer of Heinz Australasia (Japan, Australia, New Zealand and Korea). The phenomenal success of Heinz in Australia and its influence on Heinz businesses in the Pacific region over the last six years are largely credited to the......

Words: 1146 - Pages: 5

Analog Devices, Incorporated: Microelectromechanical Systems (Mems)

...management control system case analysis solution and analysis Analog Devices, Incorporated: Microelectromechanical Systems (MEMS) From a conference room on the top floor of the four-story semiconductor manufacturing facility, Ray Stata briefly took in the view of the Massachusetts Institute of Technology (MIT) campus. In particular, he noticed the building under construction that would soon bear his name. Asked how this particular honor felt, Mr. Stata responded with a humble shrug. However, when asked about the Microelectromechanical Systems (MEMS) business, Mr. Stata was willing to show considerable pride. Mr. Stata was Chairman of Analog Devices, Incorporated (ADI), a company which he co-founded in 1965. MEMS was one division. He had invested a tremendous amount of personal attention and energy to the success of MEMS – and risked his reputation. In fact, without his vision and dedicated leadership, this ambitious, entrepreneurial effort would have collapsed under mounting losses several years earlier. During one three-year stretch, from 1997 to 2000, Mr. Stata had decided to simultaneously serve as Chairman of ADI and General Manager of the MEMS division in order to keep the venture alive. In 2002, Mr. Stata regarded the MEMS business as a jewel. With worldwide technical supremacy that had been built over fifteen years, the business was profitable, and the long-term growth prospects appeared tremendous. Still, he readily acknowledged that......

Words: 278 - Pages: 2

Econometrics-Stata

...means that the same variance in salary can be explained by the variables still in the model. → Now all the variables left are highly significant at 1% level (at any level). 2.3 Result report - The estimated equation is: [pic] (1099.50) (61.69) (2.09) N= 97 , R-squared = 0.7245 - Interpretation of coefficients: 182.07 police → this means that an increase of polices for 1 unit will increase the estimated enroll by 0,182.07 USD. 17.85crime→ this means that an increase of the number of crime in current will increase the estimated enroll by 0,017.85 USD. - Significance of explanatory variables: All the explanatory variables are highly significant at 1% level. - Explain the meaning of R-squared and F value showed in Stata outcome: R-squared = 0.7245→ this means that of the variation in enroll 72,45 % can be explained by the variables. Prob > F = 0.0000 → this means that the whole model is highly significant at a 1% level. 2.4 Conclusion The data used in this paper consists of observations on six variables supposed take part in the enrolment in campus. The purpose was to find out which factors have a significant influence on the students’ decision. In the first place the insignificant variables were removed in a step by step process. Here it is interesting that the number of private college do not play a significant role in the model. Only the highly significant variables police and crime play a significant role, which is very......

Words: 1314 - Pages: 6

Fdi-International Trade

...STATA USER’S GUIDE RELEASE 13 ® A Stata Press Publication StataCorp LP College Station, Texas ® Copyright c 1985–2013 StataCorp LP All rights reserved Version 13 Published by Stata Press, 4905 Lakeway Drive, College Station, Texas 77845 Typeset in TEX ISBN-10: 1-59718-115-3 ISBN-13: 978-1-59718-115-0 This manual is protected by copyright. All rights are reserved. No part of this manual may be reproduced, stored in a retrieval system, or transcribed, in any form or by any means—electronic, mechanical, photocopy, recording, or otherwise—without the prior written permission of StataCorp LP unless permitted subject to the terms and conditions of a license granted to you by StataCorp LP to use the software and documentation. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted by this document. StataCorp provides this manual “as is” without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. StataCorp may make improvements and/or changes in the product(s) and the program(s) described in this manual at any time and without notice. The software described in this manual is furnished under a license agreement or nondisclosure agreement. The software may be copied only in accordance with the terms of the agreement. It is against the law to copy the software onto DVD, CD, disk, diskette, tape,...

Words: 66820 - Pages: 268

2 Chainz – Based On A True Story II Me Deluxe Edition 2013 MP3 VBR LATEST ALBUM MAHIY | Nat Geo Wild: Выжить в дикой природе / Survive the Wild [01-04 из 04] (2016) HDTVRip | P1 | Eps1 28 Weeks Later HD-720p