标题: 请教: 问题出在哪儿? [打印本页] 作者: shiyiming 时间: 2004-1-31 14:27 标题: 请教: 问题出在哪儿? 同样的数据我用Sigmaplot 能fit 很好. 可是SAS却不行.请指教.
Sigplot report:
Nonlinear Regression
[Variables]
x = col(2)
y = col(1)
reciprocal_y = 1/abs(y)
reciprocal_ysquare = 1/y^2
[Parameters]
a = max(y) ''Auto {{previous: 0.93844}}
b = 2/x50(x,y) ''Auto {{previous: 0.0187073}}
c = 1 ''Auto {{previous: 17.4157}}
[Equation]
f=a*(1-exp(-b*x))^c
fit f to y
''fit f to y with weight reciprocal_y
''fit f to y with weight reciprocal_ysquare
[Constraints]
[Options]
tolerance=0.000100
stepsize=100
iterations=100
R = 0.99996550 Rsqr = 0.99993100 Adj Rsqr = 0.99990340
我写的SAS程序:
data;
input y x;
cards;
0.1 112.8
0.2 131.7
0.3 147.5
0.4 162.8
0.5 178.9
0.6 195.8
0.7 218.3
0.8 251.8
;
proc nlin method=marquardt;
parameters a=1 b=1 c=10;
model y=a*(1-exp(-b*x))**c;
run;作者: shiyiming 时间: 2004-2-1 04:20
The initial values may have problem, try the following. It will converge, but I am not sure it is in global minimum.
proc nlin method=marquardt;
parameters a=0.1 to 2 by 0.1
b=0.1 to 2 by 0.1
c=1 to 10 by 1;
model y=a*(1-exp(-b*x))**c;
run;作者: shiyiming 时间: 2004-2-1 06:25 标题: Thanks lot!!! 你真厉害! 多谢你的鼎立相助.
Thanks!作者: shiyiming 时间: 2004-2-1 17:31
You are welcome.