我在统计和使用R方面是一个非常新的方面。我为具有3个因子的析因设计创建了一个lm对象。现在我想绘制响应轮廓。我已经找到了rsm软件包,但是由于coded.data对象将所有变量都视为连续数字,因此无法建立等效的rsm模型。 但是,轮廓函数带有lm对象。因此,我尝试仅使用我的原始lm模型。但是我得到了错误:按顺序(newdata [[v [1]]],newdata [[v [2]]]): 参数1不是向量
library(readr)
library(rsm)
paraTuning <- read_csv("ParaTuning 2018.08.13.csv")
paraTuning$Velotype = as.factor(paraTuning$Velotype)
paraTuning$block = as.factor(paraTuning$block)
#paraTuning$AssignmentMutationProb = to_factor(paraTuning$AssignmentMutationProb)
#paraTuning$SwapRemoveProb = to_factor(paraTuning$SwapRemoveProb)
paraTuning$`Relative gap` = log(paraTuning$`Relative gap`+0.1)
model = lm(`Relative gap`~block+SwapRemoveProb*AssignmentMutationProb*Velotype ,data=paraTuning)
summary(model)
contour(model,x2~x1,image=TRUE) # crash!!! require rsm object!
# of course no problem at all
CR <- coded.data(paraTuning,x1~(SwapRemoveProb-0.5)/0.5,x2~(AssignmentMutationProb-0.5)/0.5,block = list("Velotype","block"))
CR.rsm1<-rsm(`Relative gap`~block+SO(x1,x2),data=CR,subset=(Velotype=="2"))
contour(CR.rsm1,x2~x1,image=TRUE)
如何解决错误或建立等效的rsm模型? 此外,使用as.factor和to_factor有什么区别吗? 这是文件的前5行。
ID,block,Iterations,Recombinations,TimeElapsed,SwapRemoveProb,AssignmentMutationProb,Velotype,Einstellung,Relative gap,Fitness
1,1,2000,2093010,6.59118922,0,0,1,1,0.364276443,769.5883417
2,1,2000,2079007,6.623102825,0,0,1,1,0.364276443,769.5883417
3,1,2000,2063005,6.73869278,0,0,1,1,0.364276443,769.5883417
4,1,2000,2079004,6.939622569,0,0,1,1,0.364276443,769.5883417
5,1,2000,2074003,7.133251938,0,0,1,1,0.364276443,769.5883417
编辑: summary(model)输出-块和Velotype是因子+二阶x1 ^ 2 + x2 ^ 2
Call:
lm(formula = `Relative gap` ~ block + SwapRemoveProb * AssignmentMutationProb *
Velotype + I(SwapRemoveProb^2) + I(AssignmentMutationProb^2),
data = paraTuning)
Residuals:
Min 1Q Median 3Q Max
-1.13650 -0.19154 -0.00969 0.20454 0.91650
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.624705 0.007068 -88.390 < 2e-16 ***
block2 0.118510 0.003497 33.893 < 2e-16 ***
block3 0.014220 0.003497 4.067 4.77e-05 ***
block4 0.005503 0.003497 1.574 0.115553
block5 -0.046342 0.003497 -13.254 < 2e-16 ***
block6 -0.047255 0.003497 -13.515 < 2e-16 ***
block7 -0.043856 0.003497 -12.543 < 2e-16 ***
block8 -0.220289 0.003497 -63.002 < 2e-16 ***
block9 0.415866 0.003497 118.936 < 2e-16 ***
block10 -0.020386 0.003497 -5.830 5.55e-09 ***
SwapRemoveProb -2.369575 0.013292 -178.272 < 2e-16 ***
AssignmentMutationProb -0.420653 0.013292 -31.647 < 2e-16 ***
Velotype2 -1.048002 0.009194 -113.985 < 2e-16 ***
Velotype3 -0.798961 0.009194 -86.899 < 2e-16 ***
Velotype4 -0.953966 0.009194 -103.758 < 2e-16 ***
Velotype5 -0.577996 0.009194 -62.865 < 2e-16 ***
Velotype6 -0.440016 0.009194 -47.858 < 2e-16 ***
Velotype7 -0.470197 0.009194 -51.141 < 2e-16 ***
I(SwapRemoveProb^2) 2.436897 0.007836 310.989 < 2e-16 ***
I(AssignmentMutationProb^2) 0.346536 0.007836 44.224 < 2e-16 ***
SwapRemoveProb:AssignmentMutationProb 0.097024 0.017731 5.472 4.46e-08 ***
SwapRemoveProb:Velotype2 0.334921 0.015184 22.058 < 2e-16 ***
SwapRemoveProb:Velotype3 -0.025541 0.015184 -1.682 0.092546 .
SwapRemoveProb:Velotype4 0.008144 0.015184 0.536 0.591715
SwapRemoveProb:Velotype5 -0.554558 0.015184 -36.523 < 2e-16 ***
SwapRemoveProb:Velotype6 -0.659950 0.015184 -43.464 < 2e-16 ***
SwapRemoveProb:Velotype7 -0.657391 0.015184 -43.296 < 2e-16 ***
AssignmentMutationProb:Velotype2 0.063261 0.015184 4.166 3.10e-05 ***
AssignmentMutationProb:Velotype3 0.121300 0.015184 7.989 1.37e-15 ***
AssignmentMutationProb:Velotype4 0.027265 0.015184 1.796 0.072551 .
AssignmentMutationProb:Velotype5 -0.005575 0.015184 -0.367 0.713478
AssignmentMutationProb:Velotype6 -0.099939 0.015184 -6.582 4.66e-11 ***
AssignmentMutationProb:Velotype7 -0.021671 0.015184 -1.427 0.153517
SwapRemoveProb:AssignmentMutationProb:Velotype2 0.083709 0.025075 3.338 0.000843 ***
SwapRemoveProb:AssignmentMutationProb:Velotype3 -0.045736 0.025075 -1.824 0.068160 .
SwapRemoveProb:AssignmentMutationProb:Velotype4 -0.085764 0.025075 -3.420 0.000626 ***
SwapRemoveProb:AssignmentMutationProb:Velotype5 -0.026143 0.025075 -1.043 0.297135
SwapRemoveProb:AssignmentMutationProb:Velotype6 -0.010413 0.025075 -0.415 0.677936
SwapRemoveProb:AssignmentMutationProb:Velotype7 -0.064842 0.025075 -2.586 0.009713 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.2775 on 125961 degrees of freedom
Multiple R-squared: 0.7154, Adjusted R-squared: 0.7153
F-statistic: 8332 on 38 and 125961 DF, p-value: < 2.2e-16
摘要(模型)输出-所有类别预测变量
Call:
lm(formula = `Relative gap` ~ block + SwapRemoveProb * AssignmentMutationProb *
Velotype, data = paraTuning)
Residuals:
Min 1Q Median 3Q Max
-0.93936 -0.15266 0.00982 0.15636 0.77895
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.9484205 0.0093919 -100.983 < 2e-16 ***
block2 0.1185101 0.0025998 45.584 < 2e-16 ***
block3 0.0142200 0.0025998 5.470 4.52e-08 ***
block4 0.0055026 0.0025998 2.117 0.034303 *
block5 -0.0463420 0.0025998 -17.825 < 2e-16 ***
block6 -0.0472548 0.0025998 -18.176 < 2e-16 ***
block7 -0.0438562 0.0025998 -16.869 < 2e-16 ***
block8 -0.2202886 0.0025998 -84.732 < 2e-16 ***
block9 0.4158655 0.0025998 159.958 < 2e-16 ***
block10 -0.0203856 0.0025998 -7.841 4.50e-15 ***
SwapRemoveProb0.2 -0.0032583 0.0130511 -0.250 0.802850
SwapRemoveProb0.4 -0.0005868 0.0130511 -0.045 0.964139
SwapRemoveProb0.6 0.0012509 0.0130511 0.096 0.923645
SwapRemoveProb0.8 0.0034551 0.0130511 0.265 0.791214
SwapRemoveProb1 0.0054196 0.0130511 0.415 0.677954
AssignmentMutationProb0.2 -0.1731648 0.0130511 -13.268 < 2e-16 ***
AssignmentMutationProb0.4 -0.1755351 0.0130511 -13.450 < 2e-16 ***
AssignmentMutationProb0.6 -0.1788021 0.0130511 -13.700 < 2e-16 ***
AssignmentMutationProb0.8 -0.1780580 0.0130511 -13.643 < 2e-16 ***
AssignmentMutationProb1 -0.1767305 0.0130511 -13.541 < 2e-16 ***
Velotype2 -0.1740800 0.0130511 -13.338 < 2e-16 ***
Velotype3 -0.0406991 0.0130511 -3.118 0.001818 **
Velotype4 -0.8312534 0.0130511 -63.692 < 2e-16 ***
Velotype5 -0.0616283 0.0130511 -4.722 2.34e-06 ***
Velotype6 -0.0213636 0.0130511 -1.637 0.101649
Velotype7 -0.0118484 0.0130511 -0.908 0.363959
SwapRemoveProb0.2:AssignmentMutationProb0.2 0.1663394 0.0184570 9.012 < 2e-16 ***
SwapRemoveProb0.4:AssignmentMutationProb0.2 0.1691298 0.0184570 9.163 < 2e-16 ***
SwapRemoveProb0.6:AssignmentMutationProb0.2 0.1701792 0.0184570 9.220 < 2e-16 ***
SwapRemoveProb0.8:AssignmentMutationProb0.2 0.1728096 0.0184570 9.363 < 2e-16 ***
SwapRemoveProb1:AssignmentMutationProb0.2 0.1731648 0.0184570 9.382 < 2e-16 ***
SwapRemoveProb0.2:AssignmentMutationProb0.4 0.1663027 0.0184570 9.010 < 2e-16 ***
SwapRemoveProb0.4:AssignmentMutationProb0.4 0.1714693 0.0184570 9.290 < 2e-16 ***
SwapRemoveProb0.6:AssignmentMutationProb0.4 0.1716980 0.0184570 9.303 < 2e-16 ***
SwapRemoveProb0.8:AssignmentMutationProb0.4 0.1746710 0.0184570 9.464 < 2e-16 ***
SwapRemoveProb1:AssignmentMutationProb0.4 0.1754996 0.0184570 9.509 < 2e-16 ***
SwapRemoveProb0.2:AssignmentMutationProb0.6 0.1669868 0.0184570 9.047 < 2e-16 ***
SwapRemoveProb0.4:AssignmentMutationProb0.6 0.1696846 0.0184570 9.194 < 2e-16 ***
SwapRemoveProb0.6:AssignmentMutationProb0.6 0.1743410 0.0184570 9.446 < 2e-16 ***
SwapRemoveProb0.8:AssignmentMutationProb0.6 0.1788138 0.0184570 9.688 < 2e-16 ***
SwapRemoveProb1:AssignmentMutationProb0.6 0.1783429 0.0184570 9.663 < 2e-16 ***
SwapRemoveProb0.2:AssignmentMutationProb0.8 0.1626257 0.0184570 8.811 < 2e-16 ***
SwapRemoveProb0.4:AssignmentMutationProb0.8 0.1711284 0.0184570 9.272 < 2e-16 ***
SwapRemoveProb0.6:AssignmentMutationProb0.8 0.1741824 0.0184570 9.437 < 2e-16 ***
SwapRemoveProb0.8:AssignmentMutationProb0.8 0.1762708 0.0184570 9.550 < 2e-16 ***
SwapRemoveProb1:AssignmentMutationProb0.8 0.1776022 0.0184570 9.622 < 2e-16 ***
SwapRemoveProb0.2:AssignmentMutationProb1 0.1635607 0.0184570 8.862 < 2e-16 ***
SwapRemoveProb0.4:AssignmentMutationProb1 0.1703794 0.0184570 9.231 < 2e-16 ***
SwapRemoveProb0.6:AssignmentMutationProb1 0.1748472 0.0184570 9.473 < 2e-16 ***
SwapRemoveProb0.8:AssignmentMutationProb1 0.1736722 0.0184570 9.410 < 2e-16 ***
SwapRemoveProb1:AssignmentMutationProb1 0.1765604 0.0184570 9.566 < 2e-16 ***
SwapRemoveProb0.2:Velotype2 -1.0099721 0.0184570 -54.720 < 2e-16 ***
SwapRemoveProb0.4:Velotype2 -1.0058022 0.0184570 -54.494 < 2e-16 ***
SwapRemoveProb0.6:Velotype2 -0.9228003 0.0184570 -49.997 < 2e-16 ***
SwapRemoveProb0.8:Velotype2 -0.7073653 0.0184570 -38.325 < 2e-16 ***
SwapRemoveProb1:Velotype2 0.0962646 0.0184570 5.216 1.84e-07 ***
SwapRemoveProb0.2:Velotype3 -0.9410778 0.0184570 -50.988 < 2e-16 ***
SwapRemoveProb0.4:Velotype3 -1.1080066 0.0184570 -60.032 < 2e-16 ***
SwapRemoveProb0.6:Velotype3 -1.1162122 0.0184570 -60.476 < 2e-16 ***
SwapRemoveProb0.8:Velotype3 -0.9584047 0.0184570 -51.926 < 2e-16 ***
SwapRemoveProb1:Velotype3 -0.0369994 0.0184570 -2.005 0.045005 *
SwapRemoveProb0.2:Velotype4 -0.1656806 0.0184570 -8.977 < 2e-16 ***
SwapRemoveProb0.4:Velotype4 -0.1848871 0.0184570 -10.017 < 2e-16 ***
SwapRemoveProb0.6:Velotype4 -0.1621154 0.0184570 -8.783 < 2e-16 ***
SwapRemoveProb0.8:Velotype4 -0.1222473 0.0184570 -6.623 3.53e-11 ***
SwapRemoveProb1:Velotype4 0.0406861 0.0184570 2.204 0.027500 *
SwapRemoveProb0.2:Velotype5 -0.9597984 0.0184570 -52.002 < 2e-16 ***
SwapRemoveProb0.4:Velotype5 -0.9776637 0.0184570 -52.970 < 2e-16 ***
SwapRemoveProb0.6:Velotype5 -0.9847754 0.0184570 -53.355 < 2e-16 ***
SwapRemoveProb0.8:Velotype5 -0.9706634 0.0184570 -52.591 < 2e-16 ***
SwapRemoveProb1:Velotype5 -0.7273719 0.0184570 -39.409 < 2e-16 ***
SwapRemoveProb0.2:Velotype6 -0.6466411 0.0184570 -35.035 < 2e-16 ***
SwapRemoveProb0.4:Velotype6 -0.8638435 0.0184570 -46.803 < 2e-16 ***
SwapRemoveProb0.6:Velotype6 -0.9312597 0.0184570 -50.456 < 2e-16 ***
SwapRemoveProb0.8:Velotype6 -0.9384262 0.0184570 -50.844 < 2e-16 ***
SwapRemoveProb1:Velotype6 -0.7124085 0.0184570 -38.598 < 2e-16 ***
SwapRemoveProb0.2:Velotype7 -0.7451392 0.0184570 -40.372 < 2e-16 ***
SwapRemoveProb0.4:Velotype7 -0.9501609 0.0184570 -51.480 < 2e-16 ***
SwapRemoveProb0.6:Velotype7 -1.0128507 0.0184570 -54.876 < 2e-16 ***
SwapRemoveProb0.8:Velotype7 -1.0359143 0.0184570 -56.126 < 2e-16 ***
SwapRemoveProb1:Velotype7 -0.7251910 0.0184570 -39.291 < 2e-16 ***
AssignmentMutationProb0.2:Velotype2 -0.4611114 0.0184570 -24.983 < 2e-16 ***
AssignmentMutationProb0.4:Velotype2 -0.4427387 0.0184570 -23.988 < 2e-16 ***
AssignmentMutationProb0.6:Velotype2 -0.4376682 0.0184570 -23.713 < 2e-16 ***
AssignmentMutationProb0.8:Velotype2 -0.4189664 0.0184570 -22.700 < 2e-16 ***
AssignmentMutationProb1:Velotype2 -0.3988381 0.0184570 -21.609 < 2e-16 ***
AssignmentMutationProb0.2:Velotype3 -0.0293864 0.0184570 -1.592 0.111352
AssignmentMutationProb0.4:Velotype3 -0.0045930 0.0184570 -0.249 0.803477
AssignmentMutationProb0.6:Velotype3 0.0266054 0.0184570 1.441 0.149452
AssignmentMutationProb0.8:Velotype3 0.0574726 0.0184570 3.114 0.001847 **
AssignmentMutationProb1:Velotype3 0.0811005 0.0184570 4.394 1.11e-05 ***
AssignmentMutationProb0.2:Velotype4 0.0773231 0.0184570 4.189 2.80e-05 ***
AssignmentMutationProb0.4:Velotype4 0.0866955 0.0184570 4.697 2.64e-06 ***
AssignmentMutationProb0.6:Velotype4 0.1104680 0.0184570 5.985 2.17e-09 ***
AssignmentMutationProb0.8:Velotype4 0.1180725 0.0184570 6.397 1.59e-10 ***
AssignmentMutationProb1:Velotype4 0.1383054 0.0184570 7.493 6.76e-14 ***
AssignmentMutationProb0.2:Velotype5 0.0395880 0.0184570 2.145 0.031965 *
AssignmentMutationProb0.4:Velotype5 0.0508957 0.0184570 2.758 0.005825 **
AssignmentMutationProb0.6:Velotype5 0.0782647 0.0184570 4.240 2.23e-05 ***
AssignmentMutationProb0.8:Velotype5 0.0925803 0.0184570 5.016 5.28e-07 ***
AssignmentMutationProb1:Velotype5 0.1099097 0.0184570 5.955 2.61e-09 ***
AssignmentMutationProb0.2:Velotype6 0.1758441 0.0184570 9.527 < 2e-16 ***
AssignmentMutationProb0.4:Velotype6 0.1805351 0.0184570 9.781 < 2e-16 ***
AssignmentMutationProb0.6:Velotype6 0.1898814 0.0184570 10.288 < 2e-16 ***
AssignmentMutationProb0.8:Velotype6 0.1928818 0.0184570 10.450 < 2e-16 ***
AssignmentMutationProb1:Velotype6 0.1920427 0.0184570 10.405 < 2e-16 ***
AssignmentMutationProb0.2:Velotype7 0.0822994 0.0184570 4.459 8.24e-06 ***
AssignmentMutationProb0.4:Velotype7 0.1089173 0.0184570 5.901 3.62e-09 ***
AssignmentMutationProb0.6:Velotype7 0.1273503 0.0184570 6.900 5.23e-12 ***
AssignmentMutationProb0.8:Velotype7 0.1335722 0.0184570 7.237 4.62e-13 ***
AssignmentMutationProb1:Velotype7 0.1490236 0.0184570 8.074 6.86e-16 ***
SwapRemoveProb0.2:AssignmentMutationProb0.2:Velotype2 0.3717529 0.0261021 14.242 < 2e-16 ***
SwapRemoveProb0.4:AssignmentMutationProb0.2:Velotype2 0.3673115 0.0261021 14.072 < 2e-16 ***
SwapRemoveProb0.6:AssignmentMutationProb0.2:Velotype2 0.3252155 0.0261021 12.459 < 2e-16 ***
SwapRemoveProb0.8:AssignmentMutationProb0.2:Velotype2 0.3038559 0.0261021 11.641 < 2e-16 ***
SwapRemoveProb1:AssignmentMutationProb0.2:Velotype2 0.4110531 0.0261021 15.748 < 2e-16 ***
SwapRemoveProb0.2:AssignmentMutationProb0.4:Velotype2 0.4102527 0.0261021 15.717 < 2e-16 ***
SwapRemoveProb0.4:AssignmentMutationProb0.4:Velotype2 0.3722260 0.0261021 14.260 < 2e-16 ***
SwapRemoveProb0.6:AssignmentMutationProb0.4:Velotype2 0.3372986 0.0261021 12.922 < 2e-16 ***
SwapRemoveProb0.8:AssignmentMutationProb0.4:Velotype2 0.3044782 0.0261021 11.665 < 2e-16 ***
SwapRemoveProb1:AssignmentMutationProb0.4:Velotype2 0.3673912 0.0261021 14.075 < 2e-16 ***
SwapRemoveProb0.2:AssignmentMutationProb0.6:Velotype2 0.4975366 0.0261021 19.061 < 2e-16 ***
SwapRemoveProb0.4:AssignmentMutationProb0.6:Velotype2 0.4488679 0.0261021 17.197 < 2e-16 ***
SwapRemoveProb0.6:AssignmentMutationProb0.6:Velotype2 0.3994692 0.0261021 15.304 < 2e-16 ***
SwapRemoveProb0.8:AssignmentMutationProb0.6:Velotype2 0.3697794 0.0261021 14.167 < 2e-16 ***
SwapRemoveProb1:AssignmentMutationProb0.6:Velotype2 0.3400001 0.0261021 13.026 < 2e-16 ***
SwapRemoveProb0.2:AssignmentMutationProb0.8:Velotype2 0.5859716 0.0261021 22.449 < 2e-16 ***
SwapRemoveProb0.4:AssignmentMutationProb0.8:Velotype2 0.5321156 0.0261021 20.386 < 2e-16 ***
SwapRemoveProb0.6:AssignmentMutationProb0.8:Velotype2 0.4854390 0.0261021 18.598 < 2e-16 ***
SwapRemoveProb0.8:AssignmentMutationProb0.8:Velotype2 0.4508490 0.0261021 17.272 < 2e-16 ***
SwapRemoveProb1:AssignmentMutationProb0.8:Velotype2 0.3307505 0.0261021 12.671 < 2e-16 ***
SwapRemoveProb0.2:AssignmentMutationProb1:Velotype2 0.6627505 0.0261021 25.391 < 2e-16 ***
SwapRemoveProb0.4:AssignmentMutationProb1:Velotype2 0.6095482 0.0261021 23.352 < 2e-16 ***
SwapRemoveProb0.6:AssignmentMutationProb1:Velotype2 0.5564854 0.0261021 21.320 < 2e-16 ***
SwapRemoveProb0.8:AssignmentMutationProb1:Velotype2 0.5477225 0.0261021 20.984 < 2e-16 ***
SwapRemoveProb1:AssignmentMutationProb1:Velotype2 0.3253266 0.0261021 12.464 < 2e-16 ***
SwapRemoveProb0.2:AssignmentMutationProb0.2:Velotype3 -0.1893166 0.0261021 -7.253 4.10e-13 ***
SwapRemoveProb0.4:AssignmentMutationProb0.2:Velotype3 -0.0872452 0.0261021 -3.342 0.000831 ***
SwapRemoveProb0.6:AssignmentMutationProb0.2:Velotype3 -0.0643415 0.0261021 -2.465 0.013703 *
SwapRemoveProb0.8:AssignmentMutationProb0.2:Velotype3 -0.0890999 0.0261021 -3.414 0.000642 ***
SwapRemoveProb1:AssignmentMutationProb0.2:Velotype3 -0.0268402 0.0261021 -1.028 0.303822
SwapRemoveProb0.2:AssignmentMutationProb0.4:Velotype3 -0.1840808 0.0261021 -7.052 1.77e-12 ***
SwapRemoveProb0.4:AssignmentMutationProb0.4:Velotype3 -0.0801815 0.0261021 -3.072 0.002128 **
SwapRemoveProb0.6:AssignmentMutationProb0.4:Velotype3 -0.0645971 0.0261021 -2.475 0.013333 *
SwapRemoveProb0.8:AssignmentMutationProb0.4:Velotype3 -0.0855890 0.0261021 -3.279 0.001042 **
SwapRemoveProb1:AssignmentMutationProb0.4:Velotype3 -0.0820897 0.0261021 -3.145 0.001662 **
SwapRemoveProb0.2:AssignmentMutationProb0.6:Velotype3 -0.1608866 0.0261021 -6.164 7.13e-10 ***
SwapRemoveProb0.4:AssignmentMutationProb0.6:Velotype3 -0.0577995 0.0261021 -2.214 0.026806 *
SwapRemoveProb0.6:AssignmentMutationProb0.6:Velotype3 -0.0382778 0.0261021 -1.466 0.142525
SwapRemoveProb0.8:AssignmentMutationProb0.6:Velotype3 -0.0516851 0.0261021 -1.980 0.047693 *
SwapRemoveProb1:AssignmentMutationProb0.6:Velotype3 -0.1242133 0.0261021 -4.759 1.95e-06 ***
SwapRemoveProb0.2:AssignmentMutationProb0.8:Velotype3 -0.1572086 0.0261021 -6.023 1.72e-09 ***
SwapRemoveProb0.4:AssignmentMutationProb0.8:Velotype3 -0.0243968 0.0261021 -0.935 0.349963
SwapRemoveProb0.6:AssignmentMutationProb0.8:Velotype3 0.0020628 0.0261021 0.079 0.937010
SwapRemoveProb0.8:AssignmentMutationProb0.8:Velotype3 0.0121941 0.0261021 0.467 0.640379
SwapRemoveProb1:AssignmentMutationProb0.8:Velotype3 -0.1461374 0.0261021 -5.599 2.16e-08 ***
SwapRemoveProb0.2:AssignmentMutationProb1:Velotype3 -0.1154923 0.0261021 -4.425 9.67e-06 ***
SwapRemoveProb0.4:AssignmentMutationProb1:Velotype3 0.0237890 0.0261021 0.911 0.362097
SwapRemoveProb0.6:AssignmentMutationProb1:Velotype3 0.0676186 0.0261021 2.591 0.009584 **
SwapRemoveProb0.8:AssignmentMutationProb1:Velotype3 0.0747663 0.0261021 2.864 0.004179 **
SwapRemoveProb1:AssignmentMutationProb1:Velotype3 -0.1593367 0.0261021 -6.104 1.04e-09 ***
SwapRemoveProb0.2:AssignmentMutationProb0.2:Velotype4 -0.1391419 0.0261021 -5.331 9.80e-08 ***
SwapRemoveProb0.4:AssignmentMutationProb0.2:Velotype4 -0.1270258 0.0261021 -4.866 1.14e-06 ***
SwapRemoveProb0.6:AssignmentMutationProb0.2:Velotype4 -0.1480909 0.0261021 -5.674 1.40e-08 ***
SwapRemoveProb0.8:AssignmentMutationProb0.2:Velotype4 -0.1585985 0.0261021 -6.076 1.24e-09 ***
SwapRemoveProb1:AssignmentMutationProb0.2:Velotype4 -0.1066675 0.0261021 -4.087 4.38e-05 ***
SwapRemoveProb0.2:AssignmentMutationProb0.4:Velotype4 -0.1436733 0.0261021 -5.504 3.71e-08 ***
SwapRemoveProb0.4:AssignmentMutationProb0.4:Velotype4 -0.1532051 0.0261021 -5.869 4.38e-09 ***
SwapRemoveProb0.6:AssignmentMutationProb0.4:Velotype4 -0.1567855 0.0261021 -6.007 1.90e-09 ***
SwapRemoveProb0.8:AssignmentMutationProb0.4:Velotype4 -0.1779429 0.0261021 -6.817 9.33e-12 ***
SwapRemoveProb1:AssignmentMutationProb0.4:Velotype4 -0.1082808 0.0261021 -4.148 3.35e-05 ***
SwapRemoveProb0.2:AssignmentMutationProb0.6:Velotype4 -0.1631099 0.0261021 -6.249 4.15e-10 ***
SwapRemoveProb0.4:AssignmentMutationProb0.6:Velotype4 -0.1622843 0.0261021 -6.217 5.07e-10 ***
SwapRemoveProb0.6:AssignmentMutationProb0.6:Velotype4 -0.1958725 0.0261021 -7.504 6.23e-14 ***
SwapRemoveProb0.8:AssignmentMutationProb0.6:Velotype4 -0.1986317 0.0261021 -7.610 2.76e-14 ***
SwapRemoveProb1:AssignmentMutationProb0.6:Velotype4 -0.1427858 0.0261021 -5.470 4.50e-08 ***
SwapRemoveProb0.2:AssignmentMutationProb0.8:Velotype4 -0.1820295 0.0261021 -6.974 3.10e-12 ***
SwapRemoveProb0.4:AssignmentMutationProb0.8:Velotype4 -0.1819334 0.0261021 -6.970 3.18e-12 ***
SwapRemoveProb0.6:AssignmentMutationProb0.8:Velotype4 -0.2041128 0.0261021 -7.820 5.33e-15 ***
SwapRemoveProb0.8:AssignmentMutationProb0.8:Velotype4 -0.2372701 0.0261021 -9.090 < 2e-16 ***
SwapRemoveProb1:AssignmentMutationProb0.8:Velotype4 -0.1206579 0.0261021 -4.623 3.79e-06 ***
SwapRemoveProb0.2:AssignmentMutationProb1:Velotype4 -0.1994628 0.0261021 -7.642 2.16e-14 ***
SwapRemoveProb0.4:AssignmentMutationProb1:Velotype4 -0.2082177 0.0261021 -7.977 1.51e-15 ***
SwapRemoveProb0.6:AssignmentMutationProb1:Velotype4 -0.2147746 0.0261021 -8.228 < 2e-16 ***
SwapRemoveProb0.8:AssignmentMutationProb1:Velotype4 -0.2113466 0.0261021 -8.097 5.69e-16 ***
SwapRemoveProb1:AssignmentMutationProb1:Velotype4 -0.1299945 0.0261021 -4.980 6.36e-07 ***
SwapRemoveProb0.2:AssignmentMutationProb0.2:Velotype5 -0.1220259 0.0261021 -4.675 2.94e-06 ***
SwapRemoveProb0.4:AssignmentMutationProb0.2:Velotype5 -0.0938504 0.0261021 -3.596 0.000324 ***
SwapRemoveProb0.6:AssignmentMutationProb0.2:Velotype5 -0.0887194 0.0261021 -3.399 0.000677 ***
SwapRemoveProb0.8:AssignmentMutationProb0.2:Velotype5 -0.0579297 0.0261021 -2.219 0.026465 *
SwapRemoveProb1:AssignmentMutationProb0.2:Velotype5 -0.1015995 0.0261021 -3.892 9.93e-05 ***
SwapRemoveProb0.2:AssignmentMutationProb0.4:Velotype5 -0.1418732 0.0261021 -5.435 5.48e-08 ***
SwapRemoveProb0.4:AssignmentMutationProb0.4:Velotype5 -0.1203112 0.0261021 -4.609 4.05e-06 ***
SwapRemoveProb0.6:AssignmentMutationProb0.4:Velotype5 -0.1162080 0.0261021 -4.452 8.51e-06 ***
SwapRemoveProb0.8:AssignmentMutationProb0.4:Velotype5 -0.1158440 0.0261021 -4.438 9.08e-06 ***
SwapRemoveProb1:AssignmentMutationProb0.4:Velotype5 -0.1031790 0.0261021 -3.953 7.73e-05 ***
SwapRemoveProb0.2:AssignmentMutationProb0.6:Velotype5 -0.1793961 0.0261021 -6.873 6.32e-12 ***
SwapRemoveProb0.4:AssignmentMutationProb0.6:Velotype5 -0.1579134 0.0261021 -6.050 1.45e-09 ***
SwapRemoveProb0.6:AssignmentMutationProb0.6:Velotype5 -0.1504548 0.0261021 -5.764 8.23e-09 ***
SwapRemoveProb0.8:AssignmentMutationProb0.6:Velotype5 -0.1448539 0.0261021 -5.550 2.87e-08 ***
[ reached getOption("max.print") -- omitted 61 rows ]
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.2064 on 125739 degrees of freedom
Multiple R-squared: 0.8429, Adjusted R-squared: 0.8426
F-statistic: 2595 on 260 and 125739 DF, p-value: < 2.2e-16
摘要(模型)输出-所有数字预测变量
lm(formula = `Relative gap` ~ block + SwapRemoveProb * AssignmentMutationProb *
Velotype + I(SwapRemoveProb^2) + I(AssignmentMutationProb^2),
data = paraTuning)
Residuals:
Min 1Q Median 3Q Max
-1.13073 -0.29937 -0.04838 0.25899 1.39180
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -1.2428216 0.0085173 -145.917 < 2e-16 ***
block 0.0034938 0.0003941 8.866 < 2e-16 ***
SwapRemoveProb -1.9500666 0.0173564 -112.354 < 2e-16 ***
AssignmentMutationProb -0.3345203 0.0173564 -19.274 < 2e-16 ***
Velotype 0.0009410 0.0017787 0.529 0.5968
I(SwapRemoveProb^2) 2.4368967 0.0113439 214.820 < 2e-16 ***
I(AssignmentMutationProb^2) 0.3465360 0.0113439 30.548 < 2e-16 ***
SwapRemoveProb:AssignmentMutationProb 0.1275940 0.0216937 5.882 4.07e-09 ***
SwapRemoveProb:Velotype -0.1603905 0.0029373 -54.604 < 2e-16 ***
AssignmentMutationProb:Velotype -0.0185103 0.0029373 -6.302 2.95e-10 ***
SwapRemoveProb:AssignmentMutationProb:Velotype -0.0129706 0.0048509 -2.674 0.0075 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.4018 on 125989 degrees of freedom
Multiple R-squared: 0.4034, Adjusted R-squared: 0.4033
F-statistic: 8518 on 10 and 125989 DF, p-value: < 2.2e-16
该功能针对所有型号的变体报告相同的错误消息。
答案 0 :(得分:0)
错误是在调用contour()
时未使用实际的变量名。
contour(model, SwapRemoveProb ~ AssignmentMutationProb, image = TRUE)
正常工作。但是
contour(model, x2 ~ x1, image = TRUE)
产生错误消息:
Error in order(newdata[[v[1]]], newdata[[v[2]]]) :
argument 1 is not a vector