<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Verdana; font-size: 10pt; color: #000000'><font face="Verdana" size="2">Maybe this will help</font><div style="color: rgb(0, 0, 0); font-family: Verdana; font-size: 10pt;"><br></div><div style="color: rgb(0, 0, 0); font-family: Verdana; font-size: 10pt;"># ******** dat file</div><div><div><font face="Verdana" size="2"># n</font></div><div><font face="Verdana" size="2">10</font></div><div><font face="Verdana" size="2"># y</font></div><div><font face="Verdana" size="2">1.4 4.7 5.1 8.3 9.0 14.5 14.0 13.4 19.2 18</font></div></div><div style="color: rgb(0, 0, 0); font-family: Verdana; font-size: 10pt;"><br></div><div style="color: rgb(0, 0, 0); font-family: Verdana; font-size: 10pt;"><br></div><div style="color: rgb(0, 0, 0); font-family: Verdana; font-size: 10pt;">// ******** tpl file</div><div><div><font face="Verdana" size="2">// Likelihood (short)</font></div><div><font face="Verdana" size="2">DATA_SECTION</font></div><div><font face="Verdana" size="2"> init_int n</font></div><div><font face="Verdana" size="2"> init_vector y(1,n)</font></div><div><font face="Verdana" size="2"><br></font></div><div><font face="Verdana" size="2">PARAMETER_SECTION</font></div><div><font face="Verdana" size="2"> init_number mu</font></div><div><font face="Verdana" size="2"> init_number logSigma</font></div><div><font face="Verdana" size="2"> objective_function_value f</font></div><div><font face="Verdana" size="2"><br></font></div><div><font face="Verdana" size="2">PROCEDURE_SECTION</font></div><div><font face="Verdana" size="2"> f=n*logSigma+sum(square(y-mu))/(2.0*square(exp(logSigma)));</font></div></div><div style="color: rgb(0, 0, 0); font-family: Verdana; font-size: 10pt;"><br></div><div style="color: rgb(0, 0, 0); font-family: Verdana; font-size: 10pt;"><br></div><div style="color: rgb(0, 0, 0); font-family: Verdana; font-size: 10pt;">cheers</div><div style="color: rgb(0, 0, 0); font-family: Verdana; font-size: 10pt;">JC<br><br>><((((°> ><((((°> ><((((°> ><((((°> ><((((°><br>JC Quiroz<br>División de Investigación Pesquera<br>Instituto de Fomento Pesquero (IFOP)<br>Blanco 839, Valparaíso<br>Chile<br>tel: 56-32-2151418<br>fax: 56-32-2151645<br>email: juancarlos.quiroz@ifop.cl <br>web: http://codemorecode.wordpress.com/ <br><br><br><br>----- Original Message -----<br>From: "Melissa T Drake (DNR)" <melissa.drake@state.mn.us><br>To: users@admb-project.org<br>Sent: Thursday, 29 November, 2012 19:03:29 (GMT-0400) Auto-Detected<br>Subject: [ADMB Users] calculating a median<br><br>
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal">Is there an easy way calculate the median value of a vector?</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Melissa T. Drake</p>
<p class="MsoNormal">Fisheries Research Supervisor</p>
<p class="MsoNormal">Minnesota Department of Natural Resources</p>
<p class="MsoNormal">500 Lafayette Road</p>
<p class="MsoNormal">St. Paul, MN 55155</p>
<p class="MsoNormal">651-259-5245</p>
<p class="MsoNormal">Melissa.drake@state.mn.us</p>
<p class="MsoNormal"> </p>
</div>
<br>_______________________________________________
Users mailing list
Users@admb-project.org
http://lists.admb-project.org/mailman/listinfo/users
<link rel="stylesheet" type="text/css" media="screen" href="chrome-extension://fcdjadjbdihbaodagojiomdljhjhjfho/css/atd.css"></div></div></body></html>