Sunteți pe pagina 1din 5

bank <- read.table("C:/Users/Amit Kumar/Desktop/bank.

csv",header=TRUE,sep=",")
> chisq.test(mytable)
Error in is.data.frame(x) : object 'mytable' not found
> chisq.test(bank)
Error in chisq.test(bank) :
all entries of 'x' must be nonnegative and finite
> chisq.test(bank.csv)
Error in is.data.frame(x) : object 'bank.csv' not found
> bank
age job marital education cerdit_defaulter balance housing_loan
1 30 unemployed married primary no 1787 no
2 33 services married secondary no 4789 yes
3 35 management single tertiary no 1350 yes
4 30 management married tertiary no 1476 yes
5 59 blue-collar married secondary no 0 yes
6 35 management single tertiary no 747 no
7 36 self-employed married tertiary no 307 yes
8 39 technician married secondary no 147 yes
9 41 entrepreneur married tertiary no 221 yes
10 43 services married primary no -88 yes
11 39 services married secondary no 9374 yes
12 43 admin. married secondary no 264 yes
13 36 technician married tertiary no 1109 no
14 20 student single secondary no 502 no
15 31 blue-collar married secondary no 360 yes
16 40 management married tertiary no 194 no
17 56 technician married secondary no 4073 no
18 37 admin. single tertiary no 2317 yes
19 25 blue-collar single primary no -221 yes
20 31 services married secondary no 132 no
21 38 management divorced unknown no 0 yes
22 42 management divorced tertiary no 16 no
23 44 services single secondary no 106 no
24 44 entrepreneur married secondary no 93 no
25 26 housemaid married tertiary no 543 no
26 41 management married tertiary no 5883 no
27 55 blue-collar married primary no 627 yes
28 67 retired married unknown no 696 no
29 56 self-employed married secondary no 784 no
30 53 admin. married secondary no 105 no
31 68 retired divorced secondary no 4189 no
32 31 technician married secondary no 171 no
33 59 management married secondary no 42 no
34 32 management single tertiary no 2536 yes
35 49 technician married tertiary no 1235 no
36 42 admin. divorced secondary no 1811 yes
37 78 retired divorced primary no 229 no
38 32 blue-collar married secondary no 2089 yes
39 33 management married secondary no 3935 yes
40 23 services single tertiary no 363 yes
41 38 management single tertiary no 11971 yes
42 36 management single tertiary no 553 no
43 52 blue-collar married secondary no 1117 yes
44 32 technician married tertiary no 396 yes
45 32 technician single tertiary no 2204 yes
46 34 management single tertiary no 872 yes
47 55 blue-collar married primary no 145 no
48 26 blue-collar married primary no 0 yes
49 32 entrepreneur single primary yes -849 yes
50 61 admin. married unknown no 4629 yes
51 45 blue-collar divorced primary no 844 no
52 37 technician single secondary no 228 yes
53 38 technician single secondary no 50 no
54 34 technician married tertiary no 1539 yes
55 53 blue-collar married secondary no 2231 yes
56 48 admin. married secondary no 3064 yes
57 57 management married secondary no 82 no
58 33 self-employed single tertiary no 2155 no
59 36 retired single secondary no 101 yes
60 54 technician divorced secondary no 784 yes
61 41 blue-collar married primary no -516 no
62 63 retired married secondary no 415 yes
63 48 management married tertiary no 5887 no
64 48 services married secondary no 1355 no
65 56 admin. married secondary no 16873 no
66 51 blue-collar divorced secondary no 203 yes
67 31 services married secondary no 338 yes
68 29 technician married secondary no 444 yes
69 41 management married secondary no 0 no
70 32 technician single tertiary no 360 no
71 37 management married tertiary no 0 no
72 42 entrepreneur divorced tertiary yes 2 yes
73 31 management single tertiary no 6248 yes
74 41 services married tertiary no 412 yes
75 56 retired married secondary no 344 yes
76 54 management divorced tertiary no 3222 no
77 41 blue-collar divorced secondary no 174 yes
78 40 technician single secondary no 591 no
79 50 blue-collar divorced primary no 388 no
80 40 unemployed married secondary no 219 yes
81 27 admin. divorced secondary no 451 yes
82 60 retired married primary no 5 no
83 28 admin. single secondary no 177 yes
84 52 services married secondary no 657 no
85 37 management married tertiary no 1315 no
86 51 blue-collar married primary no 1466 yes
87 41 technician single secondary no 879 no
88 35 blue-collar single primary no 293 yes
89 38 admin. married secondary no 424 yes
90 34 blue-collar married secondary no 1831 yes
91 39 blue-collar married primary no 111 no
92 34 blue-collar married primary no 455 yes
93 27 services single secondary no -195 yes
94 32 management single tertiary no 3616 no
95 57 blue-collar married secondary no 14093 no
96 41 unknown single tertiary no 1567 no
97 41 admin. married tertiary no 5426 yes
98 30 admin. single tertiary no 261 no
99 36 blue-collar divorced secondary no 2843 no
100 31 unemployed single primary no 406 no
101 36 blue-collar married secondary no 0 yes
102 38 management single tertiary no 493 yes
103 49 technician married secondary no 5996 no
104 57 services single primary no 3777 yes
105 34 management single secondary no 524 no
106 32 management single tertiary no 574 yes
107 37 blue-collar married secondary no 427 yes
108 33 self-employed married tertiary no 483 yes
109 56 unemployed married primary no 3391 no
110 27 housemaid married primary no 0 yes
111 21 student single secondary no 2488 no
112 58 management married tertiary no 1517 yes
113 32 self-employed married secondary no 217 yes
114 33 blue-collar single secondary no 22 no
115 25 student single secondary no 331 no
116 25 technician single secondary no 505 no
117 30 services married secondary no 1808 yes
118 22 admin. single secondary no 4111 no
119 39 blue-collar married primary no 52 no
120 46 management divorced tertiary no 25 no
121 31 admin. divorced secondary no 1890 yes
122 45 blue-collar married primary no 419 no
123 32 technician married secondary no 2693 yes
124 36 blue-collar married secondary no -231 no
125 51 management single tertiary yes -55 yes
personal_loan
1 no
2 yes
3 no
4 yes
5 no
6 no
7 no
8 no
9 no
10 yes
11 no
12 no
13 no
14 no
15 yes
16 yes
17 no
18 no
19 no
20 no
21 no
22 no
23 no
24 no
25 no
26 no
27 no
28 no
29 yes
30 yes
31 no
32 no
33 no
34 no
35 no
36 no
37 no
38 no
39 no
40 no
41 no
42 no
43 no
44 no
45 no
46 no
47 no
48 no
49 yes
50 no
51 no
52 no
53 no
54 no
55 no
56 no
57 yes
58 no
59 yes
60 yes
61 yes
62 no
63 no
64 no
65 no
66 no
67 no
68 no
69 yes
70 no
71 no
72 no
73 no
74 no
75 no
76 no
77 no
78 yes
79 no
80 no
81 no
82 no
83 yes
84 no
85 no
86 no
87 yes
88 no
89 no
90 no
91 no
92 no
93 no
94 no
95 no
96 no
97 no
98 no
99 no
100 no
101 no
102 no
103 no
104 no
105 no
106 no
107 yes
108 no
109 no
110 no
111 no
112 no
113 yes
114 no
115 no
116 yes
117 no
118 yes
119 no
120 no
121 no
122 no
123 no
124 yes
125 no
[ reached getOption("max.print") -- omitted 4396 rows ]
> cntgncy_table<-
+ table(bank$marital,bank$personal_loan)
> cntgncy_table
no yes
divorced 438 90
married 2344 453
single 1048 148
> res=anova(balance~job,data=bank)
Error in UseMethod("anova") :
no applicable method for 'anova' applied to an object of class "formula"
> res=aov(balance~job,data=bank)
> summary(res)
Df Sum Sq Mean Sq F value Pr(>F)
job 11 5.477e+08 49795242 5.558 6.61e-09 ***
Residuals 4509 4.039e+10 8958540
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

>

S-ar putea să vă placă și