Best practices - How to efficiently manage a statistical analysis project? Annotated Stata Output: ttest. Stata Annotated Output T-test The ttest command performs t-tests for one sample, two samples and paired observations.
The single-sample t-test compares the mean of the sample to a given number (which you supply). The independent samples t-test compares the difference in the means from the two groups to a given value (usually 0). In other words, it tests whether the difference in the means is 0. The dependent-sample or paired t-test compares the difference in the means from the two variables measured on the same set of subjects to a given number (usually 0), while taking into account the fact that the scores are not independent. Use clear (highschool and beyond (200 cases)) Single sample t-test The single sample t-test tests the null hypothesis that the population mean is equal to the given number specified using the option write == . In this example, the t-statistic is 4.1403 with 199 degrees of freedom. Ttest write==50 Summary Statistics. Regression with Stata Web Book: Chapter 2 - Regression Diagnostics. Stata Web Books Regression with Stata Chapter 2 - Regression Diagnostics Chapter Outline 2.0 Regression Diagnostics 2.1 Unusual and Influential data 2.2 Checking Normality of Residuals 2.3 Checking Homoscedasticity 2.4 Checking for Multicollinearity 2.5 Checking Linearity 2.6 Model Specification 2.7 Issues of Independence 2.8 Summary 2.9 Self assessment 2.10 For more information 2.0 Regression Diagnostics In the previous chapter, we learned how to do ordinary linear regression with Stata, concluding with methods for examining the distribution of our variables.
Without verifying that your data have met the assumptions underlying OLS regression, your results may be misleading. This chapter will explore how you can use Stata to check on how well your data meet the assumptions of OLS regression. Additionally, there are issues that can arise during the analysis that, while strictly speaking are not assumptions of regression, are none the less, of great concern to data analysts. avplots Summary. Some notes on text editors for Stata users. (last updated: 5 July 2006) Comments and corrections to Nicholas J.
Cox, Durham University Contributions by and acknowledgements to Email addresses are given in the form joanna.smith at whereever.whatever and so should be translated to email@example.com. This FAQ is intended primarily for users of the statistical software Stata. If this web page is of any interest to people who are not Stata users, that's fine. Limitations – and a disclaimer Just a brief search of the internet or of available documentation will reveal many possible editors, even for one of the platforms, Macintosh, various flavors of Unix (including Linux) and Windows, on which Stata runs.
Don't use a word processor to edit text files First, be clear about the difference between a word processor and a text editor. Word processors insert line breaks and page breaks to make the document follow a uniform style. Let us single out some of the specific advantages of text editors. Resource links. Resources to help you learn and use Stata. Introduction to Stata. This tutorial is an introduction to Stata emphasizing data management and graphics.
A complementary discussion of statistical models may be found in the Stata Logs section of my GLM course at 1. Introduction Stata is a powerful statistical package with smart data-management facilities, a wide array of up-to-date statistical techniques, and an excellent system for producing publication-quality graphs. Stata is fast and easy to use. The tutorial has been updated for version 13, but most of the discussion applies to versions 8 and later. Re: st: do-file editor shortcuts.
Regression with Stata Web Book: Chapter 2 - Regression Diagnostics. Dummy variables. There are two straightforward ways to turn string variables into corresponding dummies -- also known as categorical variables -- using Stata.
One is an extension of the tab command: tab stringvar, gen(dummy) Another makes use of the fact that you seldom need dummies for their own sake. Usually you want them used in some sort of regression model. The xi: extension to various estimation commands turns string variables into dummies automatically, as in xi: regress y x i.stringvar Both are described in detail here and they both work well when your string variable translates into dummies directly. That, however, is not always the case. Think of a data set where you have a string variable named "color" which is equal to "red" for the first observation, "blue" for the second and "yellow, blue" for the third. Stata // - SymbolHound Search. u17.pdf. u18.pdf. Matrix Operations in Stata.
Multivariate Analysis Matrix Operations in Stata The Matrix matrix A = (2,1\3,2\-2,2) matrix list A A[3,2] c1 c2 r1 2 1 r2 3 2 r3 -2 2 Multiplication by a Scalar mat B = 3*A mat lis B B[3,2] c1 c2 r1 6 3 r2 9 6 r3 -6 6 Matrix Addition & Subtraction mat B = (1,1\4,2\-2,1) mat C = A + B mat lis C C[3,2] c1 c2 r1 3 2 r2 7 4 r3 -4 3 mat D = A - B mat lis D D[3,2] c1 c2 r1 1 0 r2 -1 0 r3 0 1.