00001 #include "statsLib.h" 00002 00015 dvector rmvlogistic(const dvector& p, const double& tau2, const int& seed) 00016 { 00017 int a=p.indexmin(); 00018 int A=p.indexmax(); 00019 random_number_generator rng(seed); 00020 dvector epsilon(a,A); 00021 epsilon.fill_randn(rng); 00022 dvector x = log(p)+tau2*epsilon; 00023 x -= mean(x); 00024 return exp(x)/sum(exp(x)); 00025 }
Generated on Tue Mar 8 2016 19:51:35 for ADMB Documentation by 1.8.0 |