<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Mark, <div><br></div><div>Based on the definitions of the variables you have defined in the DATA_SECTION and PARAMETER_SECTIONS, it appears that your trying to overwrite data-type variables with values from the differentiable variables. I would try in the PRELIMINARY_CALCS_SECTION or procedure section:</div><div><br></div><div>now_values=value(par_values);</div><div><br></div><div>the value function will allow you to overwirte a Data type variable with the values from the dvar_matrix.</div><div><br></div><div>Steve</div><div><div><div>On 2011-12-07, at 9:37 AM, Fowler, Mark wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="MS Exchange Server version 6.5.7654.12">
<title>Circumventing a type mismatch</title>
<div>
<!-- Converted from text/rtf format --><p><font size="2" face="Arial">I'm looking for a convenient way to bypass a type mismatch in data objects. I know go-arounds for this but they require lots of typing, I'm hoping for a simple translation syntax solution, or maybe a format definition I haven't come across.</font></p><p><font size="2" face="Arial">Example</font>
</p><p><font size="2" face="Arial">Define a matrix in the DATA_SECTION</font>
</p><p><font size="2" face="Arial"> matrix now_values(1,n_values,1,2)</font>
</p><p><font size="2" face="Arial">Define another matrix in the PARAMETER_SECTION (so type dvar)</font>
</p><p><font size="2" face="Arial"> matrix par_values(1,n_values,1,2)</font>
</p><p><font size="2" face="Arial">Capture or create values of par_values in PRELIMINARY_CALCS_SECTION. Something like</font>
</p><p><font size="2" face="Arial">now_values=justgimmethecurrentnumbers(par_values);</font>
</p><p><font size="2" face="Arial">Or</font>
</p><p><font size="2" face="Arial">par_values=dvarwannabe(now_values);</font>
</p><p><font size="2" face="Arial">Seeking a simple way to keep track of associated initial and fitted values in outputs, or alternatively pass computed initial values from a suite of choices to a parameter object. Inspired by hordes of ogives.</font></p>
<ul><ul><p><span lang="en-us"><font size="2" face="Arial">Mark Fowler</font></span>
<br><span lang="en-us"><font size="2" face="Arial">Population Ecology Division</font></span>
<br><span lang="en-us"><font size="2" face="Arial">Bedford Inst of Oceanography</font></span>
<br><span lang="en-us"><font size="2" face="Arial">Dept Fisheries & Oceans</font></span>
<br><span lang="en-us"><font size="2" face="Arial">Dartmouth NS Canada</font></span>
<br><span lang="en-us"><font size="2" face="Arial">B2Y 4A2</font></span>
<br><span lang="en-us"><font size="2" face="Arial">Tel. (902) 426-3529</font></span>
<br><span lang="en-us"><font size="2" face="Arial">Fax (902) 426-9710</font></span>
<br><span lang="en-us"><font size="2" face="Arial">Email <a href="mailto:Mark.Fowler@dfo-mpo.gc.ca">Mark.Fowler@dfo-mpo.gc.ca</a></font></span>
<br><span lang="en-us"><font size="2" face="Arial">Home Tel. (902) 461-0708</font></span>
<br><span lang="en-us"><font size="2" face="Arial">Home Email <a href="mailto:mark.fowler@ns.sympatico.ca">mark.fowler@ns.sympatico.ca</a></font></span>
</p>
<br>
</ul></ul>
</div>
_______________________________________________<br>Users mailing list<br><a href="mailto:Users@admb-project.org">Users@admb-project.org</a><br>http://lists.admb-project.org/mailman/listinfo/users<br></blockquote></div><br></div><br><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div><i>A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila....</i></div><div><br></div></span><br class="Apple-interchange-newline">
</div>
<br></body></html>