清空nlsList对象(长度= 0并列出0对象)

时间:2014-07-09 21:36:45

标签: r nls

我无法理解为什么我的nlsList()模型是空的:我使用一个相当简单的公式在分组数据上运行它,并且R运行顺利(没有返回错误消息)但我最终得到一个空模型,长度为0且列出0个对象。我正在使用以下代码:

datagroupEg<-groupedData(BAI~B_A|ID,data=dataEg)

nlssubmodE<-nlsList(data=datagroupEg, 
                    start=c(a=1,b=0,c=0.1), 
                    BAI~(a*(B_A)^(b)-c*B_A)|ID, 
                    na.action=na.exclude)

如果您想将此代码用于自己的运行,以下是我的数据示例,一个图:

BAI         B_A             ID 
3.309294   3.309294e+00   01152b6 
5.039944   8.349238e+00   01152b6 
7.449806   1.579904e+01   01152b6 
16.456000   3.225504e+01   01152b6 
15.528190   4.778323e+01   01152b6 
16.053870   6.383710e+01   01152b6 
15.669560   7.950666e+01   01152b6 
19.464130   9.897079e+01   01152b6 
16.989930   1.159607e+02   01152b6 
18.556510   1.345172e+02   01152b6 
24.197300   1.587145e+02   01152b6 
45.810370   2.045249e+02   01152b6 
37.383950   2.419089e+02   01152b6 
27.601330   2.695102e+02   01152b6 
16.126370   2.856366e+02   01152b6 
12.092800   2.977294e+02   01152b6 
9.903305   3.076327e+02   01152b6 
33.427950   3.410606e+02   01152b6 
17.894750   3.589554e+02   01152b6 
29.479190   3.884345e+02   01152b6 
40.809790   4.292443e+02   01152b6 
54.409670   4.836540e+02   01152b6 
67.268610   5.509226e+02   01152b6 
73.224360   6.241470e+02   01152b6 
51.419880   6.755669e+02   01152b6 
65.215640   7.407825e+02   01152b6 
103.824800   8.446073e+02   01152b6 
80.600480   9.252078e+02   01152b6 
89.416630   1.014624e+03   01152b6 
142.442900   1.157067e+03   01152b6 
206.419500   1.363487e+03   01152b6 
422.451100   1.785938e+03   01152b6 
478.865100   2.264803e+03   01152b6 
421.416500   2.686220e+03   01152b6 
487.037500   3.173257e+03   01152b6 
592.265300   3.765522e+03   01152b6 
550.156400   4.315679e+03   01152b6 
581.952300   4.897631e+03   01152b6 
626.954900   5.524586e+03   01152b6 
720.172300   6.244758e+03   01152b6 
667.376700   6.912135e+03   01152b6 
832.181400   7.744316e+03   01152b6 
595.570200   8.339887e+03   01152b6 
977.112900   9.316999e+03   01152b6 
1201.168000   1.051817e+04   01152b6 
1349.396000   1.186756e+04   01152b6 
1413.715000   1.328128e+04   01152b6 
1536.852000   1.481813e+04   01152b6 
1376.806000   1.619494e+04   01152b6 
1524.419000   1.771936e+04   01152b6 
1806.174000   1.952553e+04   01152b6 
2199.197000   2.172473e+04   01152b6 
2470.713000   2.419544e+04   01152b6 
2347.842000   2.654328e+04   01152b6 
1827.753000   2.837103e+04   01152b6 
1115.305000   2.948634e+04   01152b6 
1138.944000   3.062528e+04   01152b6 
1604.252000   3.222954e+04   01152b6 
2952.124000   3.518166e+04   01152b6 
3723.040000   3.890470e+04   01152b6 
4666.516000   4.357122e+04   01152b6 
3830.507000   4.740172e+04   01152b6 
4041.905000   5.144363e+04   01152b6 
4250.333000   5.569396e+04   01152b6 
4391.673000   6.008563e+04   01152b6 
4596.362000   6.468200e+04   01152b6 
4644.586000   6.932658e+04   01152b6 
4238.911000   7.356549e+04   01152b6 
5422.298000   7.898779e+04   01152b6 
4935.056000   8.392285e+04   01152b6 
4861.407000   8.878425e+04   01152b6 
3918.738000   9.270299e+04   01152b6 
4494.930000   9.719792e+04   01152b6 
4037.130000   1.012351e+05   01152b6 
5568.663000   1.068037e+05   01152b6 
4609.827000   1.114135e+05   01152b6 
3454.036000   1.148676e+05   01152b6 
3182.870000   1.180504e+05   01152b6 
3901.029000   1.219515e+05   01152b6 
5461.940000   1.274134e+05   01152b6 
6442.759000   1.338562e+05   01152b6 
6318.634000   1.401748e+05   01152b6 
4877.958000   1.450528e+05   01152b6 
3658.965000   1.487117e+05   01152b6 
5234.990000   1.539467e+05   01152b6 
7865.740000   1.618125e+05   01152b6 
7620.812000   1.694333e+05   01152b6 
7114.748000   1.765480e+05   01152b6 
4915.308000   1.814633e+05   01152b6 
4667.701000   1.861310e+05   01152b6 
5628.113000   1.917591e+05   01152b6 
6858.271000   1.986174e+05   01152b6 
7760.036000   2.063775e+05   01152b6 
6147.453000   2.125249e+05   01152b6 
7782.232000   2.203071e+05   01152b6 
4735.618000   2.250428e+05   01152b6 
4903.610000   2.299464e+05   01152b6 
5408.692000   2.353551e+05   01152b6 
4917.325000   2.402724e+05   01152b6 
5072.124000   2.453445e+05   01152b6 
6603.290000   2.519478e+05   01152b6

0 个答案:

没有答案