ADMB Documentation  11.1.2192
 All Classes Files Functions Variables Typedefs Friends Defines
df1b2norlogmix.cpp
Go to the documentation of this file.
00001 /*
00002  * $Id: df1b2norlogmix.cpp 1919 2014-04-22 22:02:01Z johnoel $
00003  *
00004  * Author: David Fournier
00005  * Copyright (c) 2008-2012 Regents of the University of California
00006  */
00011 #include <df1b2fun.h>
00012 
00017 df1b2variable robust_normal_logistic_mixture_deviate(const df1b2variable& x,
00018   double spread)
00019 {
00020   df1b2variable y=cumd_norm(x);
00021   y = 0.99999999*y + 0.000000005; // To gain numerical stability
00022   df1b2variable z = inv_cumd_normal_logistic_mixture(y,spread);
00023   return z;
00024 }
00025 
00030 df1b2variable robust_normal_mixture_deviate(const df1b2variable& x,
00031   double spread)
00032 {
00033   df1b2variable y=cumd_norm(x);
00034   y = 0.99999999*y + 0.000000005; // To gain numerical stability
00035   df1b2variable z = inv_cumd_normal_mixture(y,spread);
00036   return z;
00037 }