Run Code  | API  | Code Wall  | Users  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

Project2.Question1

Language: Layout:
+ ] Show input
Absolute running time: 0.59 sec, cpu time: 0.65 sec, memory peak: 31 Mb, absolute service time: 0,6 sec 
edit mode |  history  | discussion
              Socioeconomic Status
Smoking Habits High Middle Low
       Current   51     22  43
       Former    92     21  28
       Never     68      9  22
Current  Former   Never 
    116     141      99 
  High Middle    Low 
   211     52     93 
              Socioeconomic Status
Smoking Habits      High     Middle       Low
       Current 0.4396552 0.18965517 0.3706897
       Former  0.6524823 0.14893617 0.1985816
       Never   0.6868687 0.09090909 0.2222222
              Socioeconomic Status
Smoking Habits  High Middle   Low
       Current 0.440  0.190 0.371
       Former  0.652  0.149 0.199
       Never   0.687  0.091 0.222

	Pearson's Chi-squared test

data:  heartdisease
X-squared = 18.51, df = 4, p-value = 0.0009808


	Pearson's Chi-squared test with simulated p-value (based on 10000
	replicates)

data:  heartdisease
X-squared = 18.51, df = NA, p-value = 0.0011

Current  Former   Never 
    116     141      99 
  High Middle    Low 
   211     52     93 
[1] 356
         High   Middle      Low
[1,] 68.75281 16.94382 30.30337
[2,] 83.57022 20.59551 36.83427
[3,] 58.67697 14.46067 25.86236
[1] 4
[1] 18.6635
[1] 0.000915055
[1] "Standard Residual Table:"
              Socioeconomic Status
Smoking Habits       High      Middle       Low
       Current -2.1410256  1.22833504  2.306444
       Former   0.9221259  0.08913048 -1.455609
       Never    1.2170921 -1.43599191 -0.759484
[1] "Standard Adjusted Residual Table:"
              Socioeconomic Status
Smoking Habits      High     Middle       Low
       Current -6.111346  5.1013164  7.077609
       Former   2.106417  0.3783069 -5.407278
       Never    3.096155 -9.1477860 -3.154162
[1] "Table Partion of G_2"
              Socioeconomic Status
Smoking Habits High Middle
       Current   51     22
       Former    92     21
[1] "Table Partion of G_2"
     [,1] [,2]
[1,]   73   43
[2,]  113   28
[1] "Table Partion of G_3"
     [,1] [,2]
[1,]  143   43
[2,]   68   21
[1] "Table Partion of G_34"
     [,1] [,2]
[1,]  186   71
[2,]   77   22
              Socioeconomic Status
Smoking Habits High Low
       Current   51  43
       Never     68  22
   prop 1    prop 2 
0.5425532 0.7555556 
   prop 1 
0.5425532 
   prop 2 
0.7555556 
  prop 1   prop 2 
1.186047 3.090909 
[1] "The odds ratio is:"
   prop 1 
0.3837209 
[1] 0.3837209
[1] 0.3209737
[1] "confidence interval"
[1] -1.5869481 -0.3287314
[1] "exponetial confidence interval"
[1] 0.2045489 0.7198364