11.07.2015 Views

statisticalrethinkin..

statisticalrethinkin..

statisticalrethinkin..

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

7.3. CONTINUOUS INTERACTIONS 233It’s easy enough to fix the problem, though. Let’s fix it, then I’ll explain why it happened.ere are two basic solutions.(1) We can use another method of optimization. ere are many different ways toclimb the posterior density. R’s optim knows several, because no method alwaysworks. e default for map is called BFGS. Two others to try, when you have trouble,are called Nelder-Mead and (when all else fails) SANN. Tell map to use anothermethod by adding the parameter method to the call. ere will be an examplebelow.(2) We can tell optim to search longer, so it doesn’t reach its maximum iterations. Youcan tell map to allow a larger number of iterations by passing it a control list. erewill be an example below.I’ll go ahead and use both solutions, which is more than we need, just so you can see howthey are implemented.m7.6

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!