📄 rmatrix.src
字号:
/*
** rmatrix.src - To Construct Restriction Matrix and Constant
** Vector for Linear Hypothesis Testing and
** Restricted Estimation.
** (C) Copyright 1992-1998 by Aptech Systems, Inc.
** All Rights Reserved.
**
** This Software Product is PROPRIETARY SOURCE CODE OF APTECH
** SYSTEMS, INC. This File Header must accompany all files using
** any portion, in whole or in part, of this Source Code. In
** addition, the right to create such files is strictly limited by
** Section 2.A. of the GAUSS Applications License Agreement
** accompanying this Software Product.
**
** If you wish to distribute any portion of the proprietary Source
** Code, in whole or in part, you must first obtain written
** permission from Aptech Systems.
**
** ------------------------------------------
** procedure Line
** ------------------------------------------
** Rmatrix 18
** SRmatrix 286
** ------------------------------------------
**
**> Rmatrix
**
** Format: { R,z } = Rmatrix(restrict,varnames);
**
** Input : restrict string, the restriction equations.
**
** The syntax of restrict is as follows:
**
** restrict = "eqn1, eqn2,... ,eqnJ";
**
** More than one restriction is allowed provided each is
** separated by a comma. Each restriction must be written
** as a linear equation with all variables in the left hand
** side and the constant in the right hand side
** (i.e., x1+ x2 = 1). Variables shown in each restriction
** must be variables in the right-hand side of the equation.
** Restrictions in the "Restrict" argument must be consistent
** and not redundant otherwise error messages will be given.
** Note that the corresponding variable names are used to
** represent the regression parameters.
**
** varnames variable names of the regression parameters
**
** Output:
** R the restriction matrix. If errors are encountered,
** it is handled with the low order bit of the trap flag.
**
** TRAP 0 terminate with error message
** TRAP 1 return scalar error code in R
**
** For more details of the TRAP, see the command reference
** of the GAUSS manual. Since the returning error code
** appears as a missing, it can be translated with the
** command scalerr(R). Definition of the error codes
** is defined as follows:
**
** 21 mispecification in the restriction string.
** 22 the restricted equations are inconsistent.
** 23 the restricted equations are linearly dependent.
**
** z the constant vector of the restriction equations.
**
** Example:
**
** Suppose you wish to perform a Linear Hypothesis Testing,
**
** Hypothesis: Rb = z
**
** where the R matrix, b, and z vector are as follows:
**
**
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -