"Paul " <paul.murray@pioneerinvestmentsremovethissection.com> wrote in
message news:gpom5t$mml$1@fred.mathworks.com...
> "Steven Lord" <slord@mathworks.com> wrote in message
> <gpokl6$6ca$1@fred.mathworks.com>...
>>
>> "Paul " <paul.murray@pioneerinvestmentsremovethissection.com> wrote in
>> message news:gpok2g$6jb$1@fred.mathworks.com...
>> > Hi,
>> >
>> > I'm not very familiar with setting up constraints in lsqlin but I was
>> > wondering how do write equality constraints so that only some of the
>> > regressors are affected e.g. if I have x1, x2, x3 and x4 and I want x1
>> > to
>> > take any value but x2+x3+x4=1. How can I write this using the form
>> > Aeq*x=beq.
>> >
>> > Any help much appreciated,
>> > Paul
>>
>> The constraint x2+x3+x4 = 1 is equivalent to the constraint 0*x1 + 1*x2 +
>> 1*x3 + 1*x4 = 1 if you assume that x1 must be finite, which is a
>> reasonable
>> assumption when using LSQLIN. Can you convert this new constraint into
>> the
>> form Aeq*x = beq?
>>
>> 
>> Steve Lord
>> slord@mathworks.com
>>
>
> Thanks Steve. I probably should have expanded: I'm trying to run a
> constrainted dummy variable regression with 3 unconstrained regressors and
> two dummy blocks consisting of 10 columns each. The 1st & 2nd dummy blocks
> should add up to 1 respectively.
>
> Paul
The equivalence I mentioned generalizes to any number of regressors that you
want to include or exclude for a given constraint.
Also keep in mind that Aeq can be an mbyn matrix, where m is the number of
equality constraints and n is the number of regressors. It is not limited
to being a 1byn vector. Your expanded problem description requires that m
>= 2 for your problem.

Steve Lord
slord@mathworks.com
