Aptech社国内正規販売代理店 インフォーマティック(株) [Home] [Bottom] 動作環境・価格 お問い合わせ・注文 Constrained Maximum Likelihood - 制約条件付き最尤法
Constrained Maximum Likelihood(CML)は、線形または非線形、等式条件または不等式パラメータ条件
のもとで一般の最尤法問題を解きます。すなわち次のように定式化される問題を解きます。
*
例)
次の例は、線形等式条件、非線形不等式条件、およびパラメーター範囲の制約を持つ
tobitモデルの推定の例です。
library cml;
#include cml.ext;
cmlset;
proc lpr(x,z);
local t,s,m,u;
s = x[4];
m = z[.,2:4]*x[1:3,.];
u = z[.,1] ./= 0;
t = z[.,1]-m;
retp(u.*(-(t.*t)./(2*s)-.5*ln(2*s*pi)) + (1-u).*(ln(cdfnc(m/sqrt(s)))));
endp;
x0 = { 1, 1, 1, 1 };
_cml_A = { 1 -1 0 0 };
_cml_B = { 0 };
proc ineq(x);
local b;
b = x[1:3];
retp(b'b - 3);
endp;
_cml_IneqProc = &ineq;
_cml_Bounds = { -10 10,
-10 10,
-10 10,
.01 10 };
{ x,f,g,cov,ret } = CMLPrt(CML("tobit",0,&lpr,x0));
print "linear equality Lagrangeans";
print vread(_cml_Lagrange,"lineq");
print;
print "nonlinear inequality Lagrangeans";
print vread(_cml_Lagrange,"nlinineq");
print;
print "bounds Lagangreans";
print vread(_cml_Lagrange,"bounds");
--------------------------------------------------------------------
結果の出力
=====================================================================
CML Version 2.0.0 02/08/2001 9:51 am
=====================================================================
Data Set: tobit
---------------------------------------------------------------------
return code = 0
normal convergence
Mean log-likelihood -1.34034
Number of cases 100
Covariance of the parameters computed by the following method:
Inverse of computed Hessian
Parameters Estimates Std. err. Gradient
------------------------------------------------------------------
P01 -0.1832 0.0710 -0.2073
P02 -0.1832 0.0710 0.1682
P03 1.7126 0.0152 0.1825
P04 1.0718 0.1589 -0.0000
Number of iterations 8
Minutes to convergence 0.06683
linear equality Lagrangeans
-0.1877
nonlinear inequality Lagrangeans
0.0533
bounds Lagangreans
[Home] [Top] お問い合わせ・注文