Page 1 of 1

Incomplete Beta function

PostPosted: Mon Apr 09, 2012 8:58 pm
by pguerron
Hi,

Is there a way to introduce an incomplete beta function in a model? I tried but got the error

ERROR: nke_capital_more.mod:193.9-22: To use an external function within the model block, you must first declare it via the external_function() statement.

Matlab calls the function with the statement betainc(c,alpha,beta) .

Thanks,

Pablo

Re: Incomplete Beta function

PostPosted: Tue Apr 10, 2012 2:13 pm
by bkjecn
Hi Pablo,
I produced the smallest example I could think of that included the betainc function. It is in the mod file. You have to use the external_function command (documented here:http://www.dynare.org/manual/index_13.html#index-external_005ffunction).
Best,
Ben

Re: Incomplete Beta function

PostPosted: Fri Apr 13, 2012 3:13 pm
by pguerron
Hi Ben,

Thanks for your response. Yes, the key is to use the external function command.

Pablo