ADMB Documentation  11.1.2382
 All Classes Files Functions Variables Typedefs Friends Defines
vbetdev.cpp
Go to the documentation of this file.
00001 /*
00002  * $Id: vbetdev.cpp 1112 2013-07-12 21:41:41Z johnoel $
00003  *
00004  * Author: David Fournier
00005  * Copyright (c) 2008-2012 Regents of the University of California
00006  */
00011 #include <fvar.hpp>
00012 
00017 dvariable beta_deviate(const prevariable& _a,const prevariable& _b,
00018   const prevariable& _x,double eps)
00019 {
00020   prevariable& x= (prevariable&)(_x);
00021   prevariable& a= (prevariable&)(_a);
00022   prevariable& b= (prevariable&)(_b);
00023 
00024   dvariable y=cumd_norm(x);
00025   y=.9999999*y+.00000005;
00026 
00027   dvariable z=inv_cumd_beta_stable(a,b,y,eps);
00028 
00029   return z;
00030 }