[ADMB Users] calculating a median
JC Quiroz
juancarlos.quiroz at ifop.cl
Thu Nov 29 19:21:36 PST 2012
Maybe this will help
# ******** dat file
# n
10
# y
1.4 4.7 5.1 8.3 9.0 14.5 14.0 13.4 19.2 18
// ******** tpl file
// Likelihood (short)
DATA_SECTION
init_int n
init_vector y(1,n)
PARAMETER_SECTION
init_number mu
init_number logSigma
objective_function_value f
PROCEDURE_SECTION
f=n*logSigma+sum(square(y-mu))/(2.0*square(exp(logSigma)));
cheers
JC
><((((°> ><((((°> ><((((°> ><((((°> ><((((°>
JC Quiroz
División de Investigación Pesquera
Instituto de Fomento Pesquero (IFOP)
Blanco 839, Valparaíso
Chile
tel: 56-32-2151418
fax: 56-32-2151645
email: juancarlos.quiroz at ifop.cl
web: http://codemorecode.wordpress.com/
----- Original Message -----
From: "Melissa T Drake (DNR)" <melissa.drake at state.mn.us>
To: users at admb-project.org
Sent: Thursday, 29 November, 2012 19:03:29 (GMT-0400) Auto-Detected
Subject: [ADMB Users] calculating a median
Is there an easy way calculate the median value of a vector?
Melissa T. Drake
Fisheries Research Supervisor
Minnesota Department of Natural Resources
500 Lafayette Road
St. Paul, MN 55155
651-259-5245
Melissa.drake at state.mn.us
_______________________________________________ Users mailing list Users at admb-project.org http://lists.admb-project.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.admb-project.org/pipermail/users/attachments/20121130/d246deeb/attachment.html>
More information about the Users
mailing list