<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Yes read the manual on init_bounded_number_vectors<div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 9px/normal Helvetica; ">DATA_SECTION</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 9px/normal Helvetica; ">init_int n</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 9px/normal Helvetica; ">// ...</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 9px/normal Helvetica; ">PARAMETER_SECTION</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 9px/normal Helvetica; ">// need to create some vectors to hold the bounds and</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 9px/normal Helvetica; ">// phase numbers</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 9px/normal Helvetica; ">LOC_CALCS</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 9px/normal Helvetica; ">dvector lb(1,n);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 9px/normal Helvetica; ">dvector ub(1,n);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 9px/normal Helvetica; ">ivector ph(1,n);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 9px/normal Helvetica; ">// get the desired values into lb,ub,ph somehow</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 9px/normal Helvetica; ">lb.fill_seqadd(1,0.5);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 9px/normal Helvetica; ">ub.fill_seqadd(2,0.5);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 9px/normal Helvetica; ">ph.fill_seqadd(1,1);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 9px/normal Helvetica; ">END_CALCS</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 9px/normal Helvetica; ">init_bounded_number_vector a(1,n,lb,ub,ph)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 9px/normal Helvetica; "><br></div><div><div>On 2010-11-10, at 1:28 PM, Mollie Brooks wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I think the answer is probably "no", but is there a way to create a bounded_vector with different bounds on different elements? <div>I need this because I store my model coefficients in a vector to be multiplied by the matrix of predictors and I want to restrict some coefficients to be positive and others negative. Maybe this could go on a to-do list?</div><div><br></div><div>I guess I could hack this by restricting the coefficients to be positive and making certain predictors negative in my .dat file.</div><div>thanks,</div><div>Mollie</div><div><font class="Apple-style-span" size="3"><br></font></div><div><div apple-content-edited="true"><br class="Apple-interchange-newline"> </div><br></div></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>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; 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: 0; "><div>Steve Martell</div><div><a href="mailto:s.martell@fisheries.ubc.ca">s.martell@fisheries.ubc.ca</a></div><div><br></div></span><br class="Apple-interchange-newline">
</div>
<br></div></body></html>