## Stata 15 help for _make_constraints

```
Title

[P] _make_constraints -- Make the constraint matrices associated with a
constraints() specification

Syntax

_make_constraints, b(name) [constraints(numlist|matname)]

Description

_make_constraints returns the constraint matrices defined by a
constraint() specification as well as those implied by the factor
specifications in the stripe of matrix b.

Options

b(name) specifies the striped coefficient matrix for generating the
constraint matrices. b() is required.

constraints(numlist) specifies the number list of the constraints defined
by the constraint command.  constraints(matname) specifies the matrix
used by makecns.

Remarks

For background about the linear constraint matrices used by Stata, see
[P] makecns.

Given the r x p constraint matrix C and r x 1 vector a, we apply
constraints as

C*b = a

on coefficient vector b using generated r x p matrix T as

bc = b*T

We compute the original parameterization from constrained vector bc using

b = bc*T' + a

_make_constraints uses only the stripe of coefficient matrix b; its
numeric contents are immaterial.

_make_constraints returns in e matrix e(Cm)

Cm = (C,a)

which can be used when initializing an moptimize() problem with
moptimize_init_constraints(M, Cm).

Stored results

_make_constraints stores the following in e():

Scalars
e(k_autoCns)   number of base, empty, and omitted constraints

Matrices
e(Cm)          constraint matrix (C,a)
e(T)           constraint matrix such that bc = b*T
e(a)           constraint right-hand-side vector

```