00001 /* 00002 * $Id$ 00003 * 00004 * Author: David Fournier 00005 * Copyright (c) 2008-2012 Regents of the University of California 00006 */ 00011 #include <df1b2fun.h> 00012 00017 df1b2variable inv_cumd_t(const df1b2variable& n,const df1b2variable& u, 00018 double eps) 00019 { 00020 double sgn; 00021 df1b2variable v; 00022 if (value(u)<0.5) 00023 { 00024 v=2.0*u; 00025 sgn=-1.0; 00026 } 00027 else 00028 { 00029 v=2.0*(1.0-u); 00030 sgn=1.0; 00031 } 00032 df1b2variable pfive=0.5; 00033 df1b2variable w=inv_cumd_beta_stable(0.5*n,pfive,v,eps); 00034 return sgn*sqrt(n*(1.0/w-1.0)); 00035 }
Generated on Tue Mar 8 2016 19:51:32 for ADMB Documentation by 1.8.0 |