[ADMB Users] Beta deviate

dave fournier davef at otter-rsch.com
Tue Jul 31 11:06:06 PDT 2012


On 12-07-31 11:02 AM, Coilin Minto wrote:

Hi,

I think the dfbetai.cpp code is faster.  I added the

`dvariable::operator=(df1_two_variable const&)'

to my copy of the code. I'll send it to you later. Off for a short hike now.

     Dave

> Hi Dave,
>
> Thank you very much for the code.
>
> I included the globals section:
>
> GLOBALS_SECTION
>   #include <betai.cpp>
>   #include <dfbetai.cpp>
>   #include <df1b2invcumdbeta.cpp>
>
> which gave the linking error:
>
> g++ -s -L"/usr/local/admb"/lib -L"/usr/local/admb"/contrib fmi.o
> -ldf1b2o -ladmod -lcontribo -ladt -lado -ldf1b2o -ladmod -ladt -lado
> -lcontribo -o fmi
> fmi.o: In function `betacf(prevariable const&, prevariable const&,
> double, int)':
> fmi.cpp:(.text+0x4a16): undefined reference to
> `dvariable::operator=(df1_two_variable const&)'
> collect2: ld returned 1 exit status
>
> Commenting out:
>
> //#include <dfbetai.cpp>
>
> works, with the minor change of placing the random effect in the third position
>
> beta_deviate(a,b,u);
>
> in contrast with the ADMB-RE manual.
>
> It might be interesting to to get an example/benchmark together based
> on the the binomial-beta model in Lee and Nelder (1996) using the data
> in Crowder (1978).
>
> Thanks very much for your time and help.
>
> Best regards,
> Coilin
>
> References:
>
> Crowder, M.J. (1978). Beta-binomial anova for proportions. Applied
> Statistics, 27(1), 34-37.
>
> Lee, Y. and Nelder, J.A. (1996). Hierarchical generalized linear
> models. Journal of the Royal Statistical Society B, 58(4), 619-678.
>
>
> On Mon, Jul 30, 2012 at 9:16 PM, dave fournier <davef at otter-rsch.com> wrote:
>> Its really frustrating. I put a hell of a lot of work into that function and
>> it got wrecked.
>> in the open sourcing fiasco.   I have managed to get it to work again by
>> purging a lot of the
>> cephes code and reintroducing the old free world code.
>>
>> You can try compiling and linking these three files into your code and see
>> what happens.
>>
>> _______________________________________________
>> Users mailing list
>> Users at admb-project.org
>> http://lists.admb-project.org/mailman/listinfo/users
>>




More information about the Users mailing list