00001 /* 00002 * $Id$ 00003 * 00004 * Author: David Fournier 00005 * Copyright (c) 2008-2012 Regents of the University of California 00006 */ 00011 #include <fvar.hpp> 00012 00017 dvariable regression(const dvector& obs, const dvar_vector& pred) 00018 { 00019 double nobs=double(size_count(obs)); 00020 dvariable vhat=norm2(obs-pred); 00021 vhat/=nobs; 00022 return (.5*nobs*log(vhat)); 00023 }
Generated on Tue Mar 8 2016 19:51:35 for ADMB Documentation by 1.8.0 |