integrate

Vectorize!

February 20, 2011 | xi'an

Here is an email sent by one of my students a few days ago: Do you know how to integrate a function with an  “if”? For instance: __X=rnorm(100) __Femp=function(x){ +   return(sum(Xintegrate(Femp,0,1)$value does not work. My reply was that the fundamental reason it does not ... [Read more...]

More typos in Chapter 5

December 29, 2010 | xi'an

Following Ashley’s latest comments on Chapter 5 of Introducing Monte Carlo Methods with R, I realised Example 5.5 was totally off-the-mark! Not only the representation of the likelihood should have used prod instead of mean, not only the constant should call the val argument of integrate, not only integrate  uses lower ...
[Read more...]

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)