[ADMB Users] bounded_vector elements
mbrooks at ufl.edu
Wed Nov 10 13:39:03 PST 2010
Thanks! Sorry I was searching the wrong term in the manual.
On Nov 10, 2010, at 4:35 PM, Steve Martell wrote:
> Yes read the manual on init_bounded_number_vectors
> init_int n
> // ...
> // need to create some vectors to hold the bounds and
> // phase numbers
> dvector lb(1,n);
> dvector ub(1,n);
> ivector ph(1,n);
> // get the desired values into lb,ub,ph somehow
> init_bounded_number_vector a(1,n,lb,ub,ph)
> On 2010-11-10, at 1:28 PM, Mollie Brooks wrote:
>> I think the answer is probably "no", but is there a way to create a
>> bounded_vector with different bounds on different elements?
>> 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?
>> I guess I could hack this by restricting the coefficients to be
>> positive and making certain predictors negative in my .dat file.
>> Users mailing list
>> Users at admb-project.org
> Steve Martell
> s.martell at fisheries.ubc.ca
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users