Important Lessons on Stata

1. Always save your .do file

2. NEVER save changes to the .dta file unless you are absolutely sure

3. Comment, comment, comment

4. Keep track of .log files

5. When making a major change to your .do file, create a new version 

6. Keep a .do file template so you don't have to rewrite the simple stuff

7. Stata is case-sensitive

Math and Programming Operators in Stata

Make special note of the difference between = and ==.

+  "addition"

-  "subtraction"

*  "multiplication"

/  "division"

^  "power"

&  "and"

| "or"

!  "not"

>  "greater than"

>= "greater than or equal to"

<  "less than"

<= "less than or equal to"

=  "assign the value"

== "equal to"

!= "not equal to"