Demography 213 Fall 2011

An introductory course for first year Demography Graduate Students in the use of the Demography Lab. Covers basic Unix skills & computer hygiene, the Emacs editor, LaTeX and the R computing environment.

R is the common computing language of the Demography Department and as such, the mastery of R will be an important by-product of the course. The primary purpose of the course, however, is to develop general computing skills-- specifically: (1) design and implementation of algorithms and (2) good computing habits.

Weekly lab assignements will involve simulating interesting population processes and presenting the results in written and oral form. In addition to simulation, we will explore well known datasets such as historical Census, ACS, and the Current Population Survey. There is no final exam.

Since first year students are required to take Demography 110/210 simultaneously, this course complements that course in that it will provide the R background necessary for success.

The course meets once per week for a 1.0 hour lecture/demonstration. In addition there will be a 2.0 hour supervised lab weekly. Substantial work is expected outside of class.

The text for this class is Introduction to R by W.N. Venabls and D.M. Smith. This is terse yet complete document.

Weekly Assignments

Week 1: Basics of Emacs and an introduction to R  |  Assignment  |  demonstration.r  | (extra) ESS mode
Week 2: R, Emacs, ssh, X11, rsync and LaTeX on your personal computer. For Mac  |  For windows
Week 3: A simulation exercise Assignment |  demonstration.r In class demonstration file
Week 4: A stochastic simulation. Using loops, branches and functions in R Assignment |  demonstraton.r
Week 5: A stochastic micro-simulation; dataframes; more programming and some ways to avoid programming Assignment |  demonstraton.r
Week 6: Calculating TFR and Other Rates Using tapply() Assignment  |  demonstration.r
Week 7: Graphics Assignment |  demonstraton.r 2232 Piedmont cave paintings
Week 8: Graphics Assignment |  demonstraton.r 2232 Piedmont cave paintings
Week 9: Lattice Graphics Project Assignment 9 |  demonstraton.r  | A tour of trellis
Week 10: lx and proportional hazard simulation assignment  |  demonstration
Week 11:  Proportional hazard simulation extentions Assignment | demonstration |
Alternate assigment: review of R basics | Answers to Alternate assigment
Week 12: Cox Regression Project Assignment  | demonstration.r
Week 13: Writing Your Dissertation (LaTeX) Assignment | 
  • demonstration.tex UC Thesis template (.tex) inclass.tex  | 

  • References

    Below are some additional (free) documents. Most are slightly out of date, but since they are free it's hard to complain.


    carlm@demog.berkeley.edu