1 Introduction

Congratulations! As you are holding his book in your hands right now, this probably means you want to (or have to) work with Stata, the best statistical software package available! It does not matter whether you are completely new to the field of data sciences or an experienced veteran, Stata will hopefully enable you to answer your research questions correctly, efficiently and in an enjoyable fashion. As you bought this book for a really short and direct introduction, let’s skip the formal chit-chat and start right away.

What this book is not

This is not a book about statistics. We will not talk about mathematical techniques, formal hypothesis testing or algorithms for regressions. We will get down to business and start managing and analyzing data. This means you should know about basic statistical concepts, like what a mean is, how to read a table or what a regression is supposed to do.

What this book is

You are now probably sitting in front of a screen, at home or in class, trying to make sense of a collection of data using software you don’t know. This book will enable you to manage, assess, manipulate and analyze your data. Your field of study, for example sociology, psychology or political sciences, is of less relevance, as the methods and tools we will see, work with all kinds of datasets. You can use this book for self-study or in addition to your classes (or for self-study after you have skipped all your classes).

Please…

When you like this book, tell your friends and colleagues, as it might help them getting to know Stata. If you don’t like this book, tell me, so I have the chance to make things better in the next edition. You can always send emails to .

Thank you!

This book has benefited enormously from people who supported me. I want to thank Bill Rising, Dahla Rodewald, Elsje Nieboer, Marie Pauline Burkart, Markus Kreggenwinkel, Minh Nguyet Pham, Steffen Schindler, Svenja Dilger and Viktoria Sophie Zorn. Furthermore I want to acknowledge that the general outline of this book is based on the teachings of Michael Gebel (while I take responsibility for any errors remaining)!

1.1 Formatting

To make reading and finding things easier, this book uses formatting to highlight text. Stata commands are printed like this

use “testfile.dta”

You can enter these commands directly or write them in do-files. Point-and-click pathways are written in bold.

Some additional information (Notes), that can be skipped by the reader in a hurry, are printed in boxes separated by horizontal bars. However, you are strongly advised to come back later and have a look.

Some headings are marked with an asterisk (*). These chapters contain slightly more advanced topics that might not be interesting for your very first seminar paper with Stata (but maybe for your second).

Some Stata commands can be abbreviated and are thus easier to type. Within a few hours of use you will also come to the conclusion that the shorter form is often preferable. Throughout the book, we will always use the complete form, yet underline the part that is the alternative short command, for example

tabulate age

could also be written shorter as

tab age

Please note that I will not always provide the shortest abbreviation possible, but the command that I encountered most often in my work and the work of others.

1.2 Graphic style

This book is printed without colors, therefore, all graphics are in black and white. While this is fine for most outputs Stata generates, some use colors to highlight differences between groups. To visualize these differences without colors, a certain color style (scheme) is used (Bischof, 2017).1 Therefore, visually, the results presented in this book might differ slightly from what you see on your computer screen (while the interpretation is identical). When you want to receive the exactly same output you have to set the scheme when you start Stata. You can do this by entering the following in your command line

ssc install blindschemes, replace   //Download scheme set scheme plotplain                //Set scheme as standard

Now Stata will employ this style every time it produces a graphic. To revert to the standard settings either restart Stata or enter

set scheme s2color     //Revert to standard settings

1.3 Version info

This book is written for Stata 15. If your interface, icons, graphs, tables or path descriptions are slightly off, it may be that you are using a different version. This might be somewhat inconvenient, yet the basic commands are in almost all cases identical.

Throughout the book, we will mostly rely on one dataset, the NLSW88 data. The dataset can always be downloaded using the command

webuse nlsw88

or you can download it manually from Stata’s website2 for Stata 8 or newer.

1.4 Online resources

You can find complete do-files for every chapter as well as additional material online (www.statabook.com).

1.5 Cheat sheet

Throughout the book, you will learn many commands that you don’t need to memorize. However, it can be helpful to write down important information by hand, which will also help you remember it better. Finally, I want to recommend some excellent cheat sheets which were created by Tim Essam and Laura Hughes. Beginners and experts will find these equally useful.3

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.26.138