Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Constrained optimization in mata


From   <mjbaker@hunter.cuny.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Constrained optimization in mata
Date   Thu, 20 May 2010 15:09:56 -0400 (EDT)

While I have never used it, I think you can add in a line using:

optimize_init_constraints(S,Cp)

as described in the mata manual (page 658). Here, Cp is a matrix 
with rows=number of constraints, and columns=parameters+1. The 
+1 is for the constant value at the end of each constraint. As your 
constraint is b1=0 with two parameters, I think Cp=(1,0,0) should 
do it.

Matt Baker
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index