还是之前的那个例子,只不过数据集增加了几列
某商业银行2002年主要业务数据
分行编号 | 不良贷款(亿元) | 各项贷款余额(亿元) | 本年累计应收货款(亿元) | 贷款项目个数(个) | 本年固定资产投资额(亿元) |
---|---|---|---|---|---|
1 | 0.9 | 67.3 | 6.8 | 5 | 51.9 |
2 | 1.1 | 111.3 | 19.8 | 16 | 90.9 |
3 | 4.8 | 173.0 | 7.7 | 17 | 73.7 |
4 | 3.2 | 80.8 | 7.2 | 10 | 14.5 |
5 | 7.8 | 199.7 | 16.5 | 19 | 63.2 |
6 | 2.7 | 16.2 | 2.2 | 1 | 2.2 |
7 | 1.6 | 107.4 | 10.7 | 17 | 20.2 |
8 | 12.5 | 185.4 | 27.1 | 18 | 43.8 |
9 | 1.0 | 96.1 | 1.7 | 10 | 55.9 |
10 | 2.6 | 72.8 | 9.1 | 14 | 64.3 |
11 | 0.3 | 64.2 | 2.1 | 11 | 42.7 |
12 | 4.0 | 132.2 | 11.2 | 23 | 76.7 |
13 | 0.8 | 58.6 | 6.0 | 14 | 22.8 |
14 | 3.5 | 174.6 | 12.7 | 26 | 117.1 |
15 | 10.2 | 263.5 | 15.6 | 34 | 146.7 |
16 | 3.0 | 79.3 | 8.9 | 15 | 29.9 |
17 | 0.2 | 14.8 | 0.6 | 2 | 42.1 |
18 | 0.4 | 73.5 | 5.9 | 11 | 25.3 |
19 | 1.0 | 24.7 | 5.0 | 4 | 13.4 |
20 | 6.8 | 139.4 | 7.2 | 28 | 64.3 |
21 | 11.6 | 368.2 | 16.8 | 32 | 163.9 |
22 | 1.6 | 95.7 | 3.8 | 10 | 44.5 |
23 | 1.2 | 109.6 | 10.3 | 14 | 67.9 |
24 | 7.2 | 196.2 | 15.8 | 16 | 39.7 |
25 | 3.2 | 102.2 | 12.0 | 10 | 97.1 |
不良贷款( y ),贷款余额(
x1
),累计应收货款( x2 ),贷款项目个数( x3 ),固定资产投资额( x4 )
#添加到数据框中
> y<- c(0.9,1.1,4.8,3.2,7.8,2.7,1.6,12.5,1.0,2.6,0.3,4.0,0.8,3.5,10.2,3.0,0.2,0.4,1.0,6.8,11.6,1.6,1.2,7.2,3.2)
> x_1<-c(67.3,111.3,173.0,80.8,199.7,16.2,107.4,185.4,96.1,