Some notes:
1) Please cc Gary, Tao and I on all questions. In general, I will do
most of the responding.
2) There is a mistake in the write up. We want each paper to have two
appendices. The first is for the R code as described in the write
up. The second is an appendix of the LaTeX code (you can just use
verbatim for this) for any table, figure or formula in your
paper. This does not have to be clean or documented. We just want to
make it easy for other people to learn from your eample (i.e., How did
she get that table to look so good?),
3) There are definately issues with this data. Again, this is true of
every non-trivial data set that you will ever encounter in real
applied work. We did *not* create problems in this data. They are as
we got them. You should deal with the issues as you think
best. Describe the most important ones in the paper, descibe all the
issues in the R code for loading the data.
4) In any empirical work, the best way to deal with "problems" --
whether of data or assumptions or anything else -- is to conduct your
analysis in various ways. If the basic conclusion is the same, then
things are OK. If the basic conclusions depend on things like what
data you deleted and why, then things are less OK. But the *key* is to
report everything to the reader. You must be honest and forthright and
complete. See Gary's web suggestions for more on this.
Dave
--
David Kane
Lecturer in Government
617-563-0122
dkane(a)latte.harvard.edu
1) Any questions on the midterm should be e-mailed to all three of Tao, Gary
and me. If we think that the question is reasonable, we will respond. If we
think that it is something that you should figure out by yourself, we
won't. In general, most of the reponses will come from me. If I think that
something is important enough for everyone to know, I will CC the list. In
fact, this will happen almost anytime that I respond to question. Just
remember: No response means to use your best judgement.
2) Several people are having trouble reading in the data. Welcome to the messy
world of applied data analysis! This is how things will be when you do your
research and write your dissertations. (Actually, this is *way* easier than
the difficulties that you will face there, but it is an exam, after all.)
3) Some advice that you may find helpful.
a) read.table is a useful command. It has many useful options. One of my
favorities is "nrows".
b) The Internet is a useful tool. When I googled "ICSPR state codes", I got
this: http://www.ipums.umn.edu/usa/hgeographic/stateicpb.html. Perhaps you
will find it useful to know that Alaska is `82'. There is another site with
similar information: http://homer.bus.miami.edu/~bbishin/adamscodebook.pdf
c) There is a disconnect between the documentation and the data. This is
true in almost every real world situation (because documentation is a bother
and people are sloppy). For example, there are no RXXX.CMD files. (That is,
we don't have them either.) Do the best that you can to figure out what is
going on.
d) Look at the raw ASCII files in xemacs, especially when you get an
error. This provides insight into where the error comes from and what you
might do to deal with it.
e) Document what you discover in your R code. In grading, we will check your
code to see if you handled the data problems correctly, or at least
reasonably. Do not be surprised to discover "mistakes" in the data. There
are almost always mistakes. Truly important issues should be mentioned in
the body of the paper, but any details that you would want someone (who was
trying to replicate your results) to know about should be clearly described
in your code.
f) Again, if you have wrestled with these issues in the problem sets, then
things will be easier for you. If you haven't . . . well, that's why we have
exams! ;-)
Good luck. Don't forget, if we don't respond to a question, you should press on
and use your best judgment.
Dave
--
David Kane
Lecturer In Government
617-563-0122
dkane(a)latte.harvard.edu
solution6, midterm2 and senate.zip now on respective sections of the
course website. your hw6 will be graded and returned on thursday section.
this is the standard policy of section and hw. thanks.
Tao Li
--------------
www.people.fas.harvard.edu/~li7
Sorry for the delay, but the midterm data is now available at:
http://gking.harvard.edu/tmp/senate.zip
Thanks to Gary for hosting this, for providing the data and for
suggestions on organization. As always when examining data from a
strange source, you should read the files that come along with it to
learn about the organization, variables and so on.
Dave
--
David Kane
Lecturer in Government
617-563-0122
dkane(a)latte.harvard.edu
Dear all,
Where can we find the data for the midterm? I looked on the course
website, then I went poking around Gary King's webpage, but no cigar.
Any suggestions?
Thanks,
Olivia.
(who is worried that the data might be a messy merge, and hopes that
there's a codebook or something to go with it)
Looks like a typo in the main command with different sorts of quotes --- ''
versus " --- in the main argument.
Also, you generally plot both an x and a y value. Of course, plot will work
with only an y variable (try plot(rnorm(100))), but are you sure that this is
what you want? Perhaps hist or truehist would be better . . .
Anyone else have ideas?
Dave
Yongwook Ryu writes:
> Here is the command I used
>
> > plot(b$counts/1000, type="k", ylab="Density", main='' Theoretical Pi Values
> and Empirical Pi Values", xlab="bins", lty=2)
> Error in c(..., recursive = TRUE) : unused argument(s) ( ...)
>
> thansks
>
> yongwook
>
> Quoting Dave Kane <dkane(a)latte.harvard.edu>:
>
> > Always helps to show us the exact command that you are using.
> >
> > Dave
> >
> > Yongwook Ryu writes:
> > > Dear all,
> > >
> > > whenever I try to plot, i get the following error message.
> > >
> > > Error in c(..., recursive=TRUE): unused argument(s) (...)
> > >
> > > What am I doing wrong here?
> > >
> > > yongwook
> > >
> > > -----------------------------
> > > Yongwook Ryu
> > > PhD Candidate
> > > Department of Government
> > > Harvard University
> > > Tel:617-493-3397
> > > Email: yryu(a)fas.harvard.edu
> > > -----------------------------
> > >
> > > _______________________________________________
> > > gov1000-list mailing list
> > > gov1000-list(a)fas.harvard.edu
> > > http://www.fas.harvard.edu/mailman/listinfo/gov1000-list
> >
> > --
> > David Kane
> > Lecturer in Government
> > 617-563-0122
> > dkane(a)latte.harvard.edu
> > _______________________________________________
> > gov1000-list mailing list
> > gov1000-list(a)fas.harvard.edu
> > http://www.fas.harvard.edu/mailman/listinfo/gov1000-list
> >
>
>
> -----------------------------
> Yongwook Ryu
> PhD Candidate
> Department of Government
> Harvard University
> Tel:617-493-3397
> Email: yryu(a)fas.harvard.edu
> -----------------------------
>
>
--
David Kane
Lecturer In Government
617-563-0122
dkane(a)latte.harvard.edu
Dear all,
whenever I try to plot, i get the following error message.
Error in c(..., recursive=TRUE): unused argument(s) (...)
What am I doing wrong here?
yongwook
-----------------------------
Yongwook Ryu
PhD Candidate
Department of Government
Harvard University
Tel:617-493-3397
Email: yryu(a)fas.harvard.edu
-----------------------------
There has been some discussion about plotting two things on the same
graph. Besides the suggestions that have already been made, you might also
consider use of the `par' --- for parameters, I think --- command. This sets
certain parameters for graphing.
Here is a simple example.
> plot(x = 1:10, y = 11:20, col = 3)
> plot(x = 10:1, y = 11:20, col = 5)
> # Note that a new plot command makes the old plot disappear.
> plot(x = 1:10, y = 11:20, col = 3)
> par(new = TRUE)
> # Causes R to keep the old plot and add any further ones.
> plot(x = 10:1, y = 11:20, col = 5)
> # Plots will keep going to this graph until you set new to FALSE
Apologies if someone else already mentioned this.
Dave
--
David Kane
Lecturer In Government
617-563-0122
dkane(a)latte.harvard.edu
Here is a schedule of the remaining assignments for the class.
1) Homework 6 is due tomorrow in section.
2) The second midterm will be handed out tomorrow and is due by noon a week later
on the 21st.
3) Homework 7 will be handed out in section on 11/21. Because of Thanksgiving, it
will not be due until section on 12/5.
4) Homework 8 will be handed out in section on 12/5. It will be due in section on
12/12.
The final and the paper will be kept as listed in the syllabus. (Approximately
half the people who expressed an interest in changing the final due date wanted
it *earlier* rather than later, so we will keep it as is. We will be
distributing the final on 12/16, so everyone should have more than enough time
to work on it.)
Dave
--
David Kane
Lecturer In Government
617-563-0122
dkane(a)latte.harvard.edu