The n is defined as the size of the output "draw" from the exponential
distribution. So, if you set n to 10000, you would get a vector of
10000 numbers drawn from an exponential distribution, with rate equal
to whatever you set it to (lambda in this case).
Patrick's section notes again have a great example of how to do this
with the rbeta() function, which works in a similar way (although it
takes different inputs other than n).
-Bernard
-----------------------
Bernard L. Fraga
Ph.D. Student, Harvard University
Government and Social Policy
bfraga at
fas.harvard.edu
-----------------------
On Feb 19, 2009, at 9:31 AM, Olena Ageyeva wrote:
I am having the same problem. Also, I don't
understand what to do in
c.
The syntacsis of rexp() is:
rexp(n, rate = 1)
where n is the number of observation and rate, I guess, is lambda.
What should we take as n?
And I am so confused what to do next? Is there any example how to
deal with problems like that?
Sincerely,
Olena Ageyeva
Date: Thu, 19 Feb 2009 09:24:23 -0500
From: jpferg at
mit.edu
To: gov2001-l at
lists.fas.harvard.edu
Subject: [gov2001-l] Vectorize...?
Hi All,
It's flattering to write in pset 2, problem 4 that we might "forget"
to use Vectorize(), when in truth I for one cannot figure out why we
would need it in the first place. The command's documentation is
not, frankly, the most informative I've ever read. Can someone in
the know clue me in as to its use here?
Thanks,
John-Paul Ferguson
PhD Candidate, Economic Sociology
MIT Sloan School of Management
50 Memorial Drive, E52-533
Cambridge, MA 02142
617.253.3940 (w)
617.549.8482 (c)
Get more out of the Web. Learn 10 hidden secrets of Windows Live.
Learn Now_______________________________________________
gov2001-l mailing list
gov2001-l at
lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l