为什么不去stata里面查帮助啊?
还有,论坛上有stata7的reference上面介绍的都很详细的?还是免费的
我不知道为什么不去看看。
-------------------------------------------------------------------------------------------------------
help for constraint manual: [R] constraint
dialogs: define drop
-------------------------------------------------------------------------------------------------------
Define and list constraints
constraint [define] # [ exp=exp | coefficientlist ]
constraint dir [ numlist | _all ]
constraint drop { numlist | _all }
constraint list [ numlist | _all ]
constraint get #
constraint free
coefficientlist is one of
coefficient [coefficient ...]
[eqno]: coef [coef ...]
[eqno]
[eqno1=eqno2]: coef [coef ...]
[eqno1=eqno2]
coefficient is
coef
[eqno]coef
coef is
varname
_b[varname]
eqno is
##
#
name
Description
constraint defines, lists, and drops linear constraints. Constraints are for use by models that
allow constrained estimation.
constraint get and constraint free are programmer's commands. constraint get returns the
contents of the specified constraint in macro r(contents) and returns in scalar r(defined) 0 or
1, 1 being returned if the constraint was defined. constraint free returns the number of an
unused constraint in macro r(free).
Examples
For use, with, say, cnsreg (where there is one equation):
. constraint 1 price = weight
. cnsreg mpg price weight, constraint(1)
For use, with, say, mlogit (where there are multiple equations):
. constraint 2 [Insured]site2 = 0
. mlogit insure age male site*, constraint(2)
. cons 10 [Insured]: site2 site3
. cons 11 [Insured=Prepaid]: site3 site4
. mlogit insure age male site*, cons(10-11)
In all cases:
. cons drop 1, 10-11
. cons drop _all
Also see
Manual: [R] constraint
Online: help for cnsreg, ml, mlogit, test; local, matrix makecns