For those of you who haven't used R before, I uploaded a brief
introduction to R which is written by Dan Ho for another class. It's under
``Handout'' on the course website.
A reminder that today I will hold an extra office hour right after the
lecture in my office at CBRSS. Tomorrow, I will have a regular office hour
from 4 to 6pm.
Kosuke
all,
I wrote the following function for Q1(a), and got the obviously wrong answer.
any idea as to what I did wrong?
> sims<-1000
> people<-5
> pool<-seq(1,100,1)
> same<-0
> for(i in 1:sims){
+ comm<-sample(pool, people, replace=FALSE)
+ if(length(unique(comm))<people)
+ same<-same+1}
> cat("probability of =5 people being in the same committee:", same/sims, "\n")
probability of >=5 people being in the same committee: 0
yongwook
-----------------------------
Yongwook Ryu
PhD Candidate
Department of Government
Harvard University
Tel:617-493-3397
Email: yryu(a)fas.harvard.edu
-----------------------------
I've done some grading of hw2, and it seems that many of you didn't do as
well as hw1. I suggest that you review my solution set to make sure you
understand *all* the questions. Send an e-mail to the list if you have any
questions. Having weekly homeworks is tough because there isn't much time
to review previous homeworks. But I hope you all do that since it's very
important!
Have a good weekend,
Kosuke
check the Harvard-MIT data center website, which has many other datasets
online.
Kosuke
On Fri, 28 Feb 2003, Yongwook Ryu wrote:
> Could you tell me where I can get the following datasets online?
>
> Correlates of War
> Polity 98
>
> cheers,
> yongwook
>
>
>
> -----------------------------
> Yongwook Ryu
> PhD Student
> Department of Government
> Harvard University
> Tel:617-493-3397
> Email: yryu(a)fas.harvard.edu
> -----------------------------
>
Hey, peoples.
Does anyone know, if I'm working on two projects at the same
time, if they're saved in different directories (e.g., the
starting directories for R are different), if I save the session
when I q(), will the workspace be restored when I open the
session again in that same directory? Or is my saved workspace
from my last R session, irrespective of starting directory?
Thanks,
Olivia.
Hi everyone,
There was a typo in Hw3. The exponential distribution is a special case
of the Weibull when beta=1 not when alpha=1. This change won't affect your
answer. Thanks to Ivan for pointing this out. Also, I changed the notation
of the first question to avoid confusion. The revised homework is
available on the course website.
Good luck,
Kosuke
A number of people have asked questions about problem 4 last night. Here
is a basic idea. You want to evaluate the "joint" density with different
values of y and lambda where y is poisson and lambda is gamma. This is the
joint density function, so you are not drawing random variables from any
distribution. you are simply evaluating the height of the density. To do
this, you need to create a matrix where its row and column represents y
and labmda, respectively. Then, to integrate out lambda, you want to sum
over the column. After normalizing it, this gives you the marginal
density of negative binomial.
Kosuke
I am looking for someone who can help me analyze data. I am trying to
finish up a project that looks at the economic performance of Africa the
second half of the 20th Century; political reform; and violence.
The data come from 46 countries over 26 years; they can be viewed with a
link from my website. Given the extensive use of limited dependent
variables, there are some real econometric challenges, but also some real
opportunities to learn.
The principal focus at this point is violence.
RHBates
Robert H. Bates
Robert_Bates(a)Harvard.edu
tel: (617) 496-0919
fax: (617) 496-6849
Department of Government
Littauer Center M-29
Harvard University
Cambridge MA 02138