SAS中文论坛
标题:
关于非线性回归的问题,如何求R-square
[打印本页]
作者:
shiyiming
时间:
2004-11-5 15:49
标题:
关于非线性回归的问题,如何求R-square
现有数据如下:
data a;input x y;
cards;
2281 10.05723815
1223 8.890410552
1794 9.197660319
847 8.298290634
3072 10.2351267
1109 9.235228087
795 8.362408978
413 7.991592282
211 7.710653324
2193 10.0152078
2017 9.506734385
1086 9.260177607
827 8.704004653
747 8.457867725
296 7.609862201
257 7.521859252
236 7.400620577
1130 8.678631537
662 7.985824666
350 7.805067044
1910 10.01157933
1711 9.740203625
1122 8.930361884
351 7.288927695
1131 8.937612591
837 8.459564079
1275 8.953769295
638 8.26436333
267 7.410951876
1238 8.626944055
497 7.308542798
184 7.171656823
727 8.615408239
486 8.285765421
2230 9.964676721
959 8.442038518
441 8.028129059
510 8.325790526
2184 9.772923183
900 8.392763113
1158 9.016391479
293 7.347299701
106 6.626717749
393 8.040124664
1055 8.670600738
349 7.572502985
718 7.962067309
668 8.053569169
167 6.047372179
577 7.784057003
878 8.227642708
384 6.697034248
310 6.481577129
80 6.535241271
946 8.245646901
373 7.400620577
332 7.05012252
1246 9.211839248
941 8.167635715
798 8.22977775
852 8.392310009
756 8.212297138
905 7.87245515
356 7.239932591
956 7.887584032
479 6.918695219
899 7.61283103
339 6.73459166
305 7.183870715
863 8.169336396
977 8.087947555
378 6.703188113
204 5.488937726
854 7.896552702
441 6.652863029
923 8.139440522
600 7.381501895
297 6.439350371
374 5.093750201
;
run;
proc nlin data=a best=10 method=marquardt outest=test save;
parms b0 = 0.3 to 1.9 by .5
b1=0.00001 to 0.001 by 0.00005;
model y = B0*log(x)+b1*log(x)**4;
output out=b p=yhat r=yresid parms=b0 b1 sse=sse h=h
stdi=stdi stdp=stdp stdr=stdr student=student ;
run;
部分结果如下:
The NLIN Procedure
Sum of Mean Approx
Source DF Squares Square F Value Pr > F
Regression 2 5173.1 2586.6 9008.12 <.0001
Residual 77 22.1095 0.2871
Uncorrected Total 79 5195.2
Corrected Total 78 85.7881
Approx
Parameter Estimate Std Error Approximate 95% Confidence Limits
b0 1.2228 0.0321 1.1590 1.2867
b1 0.000073 0.000102 -0.00013 0.000277
Approximate Correlation Matrix
b0 b1
b0 1.0000000 -0.9572879
b1 -0.9572879 1.0000000
问题是:
我如何求得R-square? 如果可以求得,如何将它与参数估计值一同存在数据集中?
谢谢。
作者:
shiyiming
时间:
2004-11-10 21:08
标题:
请求帮助
还请指点一二,再次感谢
作者:
shiyiming
时间:
2004-11-14 03:43
标题:
RESULT
R-SQUARE = 0.742277
<!-- s:evil: --><img src="{SMILIES_PATH}/icon_evil.gif" alt=":evil:" title="Evil or Very Mad" /><!-- s:evil: -->
作者:
shiyiming
时间:
2004-11-22 19:58
标题:
多谢
谢谢DUOWEI1974。因为用stata算得的r2>0.98,所以不放心的求证一下。
作者:
shiyiming
时间:
2008-12-25 17:25
标题:
Re: 关于非线性回归的问题,如何求R-square
我也不会啊,怎么求出R的平方啊?我和上面的问题一样,只求出来了P值!!!
欢迎光临 SAS中文论坛 (https://mysas.net/forum/)
Powered by Discuz! X3.2