# Re: Regression with linear constraint

• From: "Hans Schmidt" <whitechild@xxxxxx>
• Date: Wed, 4 Jan 2012 12:37:07 +0000 (UTC)

"John D'Errico" <woodchips@xxxxxxxxxxxxxxxx> wrote in message <jdvi9o\$eqk\$1@xxxxxxxxxxxxxxxxxxxxxxxx>...
"Hans Schmidt" wrote in message <jdv5qc\$s12\$1@xxxxxxxxxxxxxxxxxxxxxxxx>...
> Torsten <Torsten.Hennig@xxxxxxxxxxxxxxxxxxxxx> wrote in message <41c9838a-8591-4bb2-87ee-b0eb1c7e2038@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>...
> > On 3 Jan., 15:14, "Hans Schmidt" <whitech...@xxxxxx> wrote:
> > > Hey folks,
> > >
> > > I am having trouble in estimating a linear regression of this form by simply using Ordinary Least Squares:
> > >
> > > Ri = a1 + d1*R1 + d2*R2 + ui
> > >
> > > where R1 and R2 stand for two arbitrary indpendent variables, d1 and d2 are the respective regression coefficients and a1 is defined as:
> > >
> > > a1 = r0(1 - d1) + (r - 1*r0)'d2
> > >
> > > Hence, the estimation of a1 involves the estimates for d1 and d2. How can such a problem be solved with Matlab? Do I have to define a1 as a linear constraint?
> > >
> > > Thanks for your assistance.
> > > > What do r and r0 stand for ?
> > > > Maybe I don't understand your problem correcty, but
> > why not writing the equation as
> > Ri - r0 = d1*(R1-r0) + d2*(R2+r-r0)
> > and estimating d1 and d2 as usual ?
> > > > Best wishes
> > Torsten.
> > > Hi Torsten,
> > thank for your response.
> > r and r0 stand for the risk-free interest rate of the foreign country and the home country, respectively. This framework is typical in the context of the International Capital Asset Pricing Model (ICAPM).
> > Your suggestion seems intuitive, however, i am afraid that I also need a standard error estimate with respective t-statistics for the coefficient a1.
> > Best,
> Hans

Simple.

Eliminate a1 from the first equation. (As suggested by Torsten.)

This yields estimates for the parameters d1, d2, and ui,
which are apparently unknowns. It also yields a covariance
matrix for those parameters.

Now compute the estimate of a1 from those computed
parameters. The variance of a1 is also easy since it is simply
a linear transformation of the parameters, so it has a variance
that is easily computed from the covariance matrix.

John

John,

thank you for your response. I think this is exactly what I need. But how can the variance of a1 be computed from using the covariance matrix of the other parameters?

Best,
Hans
.

## Relevant Pages

• Re: Regression with linear constraint
... >> I am having trouble in estimating a linear regression of this form by simply using Ordinary Least Squares: ... This yields estimates for the parameters d1, d2, and ui, ... The variance of a1 is also easy since it is simply ... that is easily computed from the covariance matrix. ...
(comp.soft-sys.matlab)
• Re: PCA C code contradictions
... one would get different results using those as PCA input. ... In the Covariance case, if ONE of the variables has variance 100 ... has variance 1 in the diagonal of the covariance matrix. ... that they use the iris data set, ...
(sci.stat.math)