Closed arni-magnusson closed 6 years ago
Thank Arni for noticing that.
Sorry yes we should revert it. I suggest using dnorm function if this is the first example a new ADMB user is supposed to look at. That likelihood calculation is pretty opaque for someone coming from R.
That's a good point, Cole, the likelihood calculation in simple.tpl is rather complicated for a hello world example.
I've replaced it with f=regression(y,yhat);
Turns out that's how the example was covered in the manual all along :) I used the opportunity to make other things in the example more intuitive, x and y, b0 and b1.
The dnorm function is not (yet) documented in the manual. It might also seem a bit perplexing to someone coming from R, since dnorm(x,mu,sd) gives very different results in R and ADMB.
The manual covers the regression() function quite well.
It looks like simple.tpl was modified to use as a testbed for new algorithms developed by @colemonnahan
The changes have made simple.tpl a bit less simple than it used to be. The simple.tpl is intended as a hello world for ADMB, using only the most basic types, etc.
Can we revert simple.tpl back to the original?