Chat with us, powered by LiveChat Cumberlands Logistic Regression to Handle Binary Outcome Paper | acewriters
+1(978)310-4246 credencewriters@gmail.com
Select Page

Q1: In assessing the predictive power of categorical predictors of a binary outcome,should logistic regression be used? Q2: Objective: Using Logistic Regression to handle a binary outcome. Given the prostate cancer dataset, in which biopsy results are given for 97 men:• You are to predict tumor spread in this dataset of 97 men who had undergone a biopsy.• The measures to be used for prediction are: age, lbph, lcp, gleason, and lpsa. This
implies that binary dependent variable of lcavol will be the outcome variable.We start by loading the appropriate libraries in R: ROCR, ggplot2, and aod packages as
follows:> install.packages(“ROCR”)> install.packages(“ggplot2”)> install.packages(“aod”)> library(ROCR)> library(ggplot2)> library(aod)Next, we load the csv file and check the statistical properties of the csv
File as follow:> setwd(“C:/RData”) # your working directory> tumor <- read.csv("prostate.csv") # loading the file> str(tumor) # check the properties of the file. . . continue from here!ReferenceR Documentation (2016). Prostate cancer data. Retrieved fromhttp://rafalab.github.io/pages/649/prostate.html
prostate.xlsx

Unformatted Attachment Preview

lcavol
age
-0.57982
-0.99425
-0.51083
-1.20397
0.751416
-1.04982
0.737164
0.693147
-0.77653
0.223144
0.254642
-1.34707
1.61343
1.477049
1.205971
1.541159
-0.41552
2.288486
-0.56212
0.182322
1.147402
2.059239
-0.54473
1.781709
0.385262
1.446919
0.512824
-0.40048
1.040277
2.409644
0.285179
0.182322
1.275363
0.00995
-0.01005
1.308333
1.423108
0.457425
2.660959
0.797507
0.620576
1.442202
0.582216
1.771557
1.48614
1.663926
50
58
74
58
62
50
64
58
47
63
65
63
63
67
57
66
70
66
41
70
59
60
59
63
69
68
65
67
67
65
65
65
71
54
63
64
73
64
68
56
60
68
62
61
66
61
lbph
-1.38629
-1.38629
-1.38629
-1.38629
-1.38629
-1.38629
0.615186
1.536867
-1.38629
-1.38629
-1.38629
1.266948
-1.38629
-1.38629
-1.38629
-1.38629
1.244155
-1.38629
-1.38629
1.658228
-1.38629
1.474763
-0.79851
0.438255
1.599388
0.300105
-1.38629
1.816452
0.223144
-1.38629
1.962908
1.704748
1.266948
-1.38629
-1.38629
2.171337
-0.57982
-1.38629
1.373716
0.936093
-1.38629
-1.38629
1.713798
-1.38629
1.7492
0.615186
lcp
gleason
lpsa
-1.38629
6 -0.43078
-1.38629
6 -0.16252
-1.38629
7 -0.16252
-1.38629
6 -0.16252
-1.38629
6 0.371564
-1.38629
6 0.765468
-1.38629
6 0.765468
-1.38629
6 0.854415
-1.38629
6 1.047319
-1.38629
6 1.047319
-1.38629
6 1.266948
-1.38629
6 1.266948
-0.59784
7 1.266948
-1.38629
7 1.348073
-0.43078
7 1.398717
-1.38629
6 1.446919
-0.59784
7 1.470176
0.371564
6 1.492904
-1.38629
6 1.558145
-1.38629
6 1.599388
-1.38629
6 1.638997
1.348073
7 1.658228
-1.38629
6 1.695616
1.178655
7 1.713798
-1.38629
6 1.731656
-1.38629
6 1.766442
-0.79851
7 1.800058
-1.38629
7 1.816452
0.04879
7 1.848455
1.619388
6 1.894617
-0.79851
6 1.924249
-1.38629
6 2.008214
-1.38629
6 2.008214
-1.38629
6 2.021548
-0.79851
6 2.047693
-1.38629
7 2.085672
1.658228
8 2.157559
-1.38629
7 2.191654
1.832581
7 2.213754
-0.16252
7 2.277267
-1.38629
9 2.297573
-1.38629
7 2.307573
-0.43078
6 2.327278
0.81093
7 2.374906
-0.43078
7 2.521721
-1.38629
7 2.553344
2.727853
1.163151
1.745716
1.22083
1.091923
1.660131
0.512824
2.127041
3.15359
1.266948
0.97456
0.463734
0.542324
1.061257
0.457425
1.997418
2.775709
2.034706
2.073172
1.458615
2.022871
2.198335
-0.44629
1.193922
1.86408
1.160021
1.214913
1.838961
2.999226
3.14113
2.010895
2.537657
2.6483
2.77944
1.467874
2.513656
2.613007
2.677591
1.562346
3.302849
2.024193
1.731656
2.807594
1.562346
3.246491
2.532903
2.830268
79
68
43
70
68
64
64
68
59
66
47
49
70
61
73
63
72
66
64
61
68
72
69
72
60
77
69
60
69
68
72
78
69
63
66
57
77
65
60
64
58
62
65
76
68
61
68
1.879465
1.713798
-1.38629
1.373716
-1.38629
2.073172
1.492904
1.766442
-1.38629
2.122262
-1.38629
1.423108
0.438255
1.294727
2.326302
1.619388
-1.38629
2.008214
-1.38629
1.321756
1.783391
2.307573
-1.38629
2.326302
-1.38629
1.7492
-1.38629
0.438255
-1.38629
-0.05129
2.122262
2.326302
-1.38629
-1.38629
0.559616
0.438255
-0.52763
1.115142
1.695616
-1.38629
1.638997
-1.38629
-1.38629
0.936093
-1.38629
1.348073
-1.38629
2.656757
-0.43078
-1.38629
-0.79851
-1.38629
-1.38629
0.04879
1.446919
-1.38629
-1.38629
0.500775
-1.38629
-1.38629
-1.38629
-1.38629
1.909543
1.558145
2.110213
-1.38629
-0.43078
1.321756
-0.43078
-1.38629
-0.79851
1.321756
-1.38629
0.223144
1.178655
1.909543
2.420368
0.500775
-1.38629
2.583998
0.371564
0.223144
2.327278
0.559616
1.7492
0.81093
2.327278
-1.38629
0.300105
2.463853
0.81093
-1.38629
-1.38629
1.321756
9
7
6
6
7
6
7
7
7
7
7
6
7
7
6
7
9
7
6
7
7
7
6
7
7
7
7
9
7
7
7
7
7
7
7
7
7
9
7
7
6
7
7
7
6
7
7
2.568788
2.568788
2.591516
2.591516
2.656757
2.677591
2.68444
2.691243
2.704711
2.718001
2.788093
2.794228
2.806386
2.81241
2.841998
2.853593
2.853593
2.882004
2.882004
2.88759
2.92047
2.962692
2.962692
2.972975
3.013081
3.037354
3.056357
3.075005
3.275256
3.337547
3.392829
3.435599
3.457893
3.513037
3.516013
3.530763
3.565298
3.57094
3.587677
3.630985
3.680091
3.712352
3.984344
3.993603
4.029806
4.129551
4.385147
3.821004
2.907447
2.882564
3.471966
44 -1.38629 2.169054
52 -1.38629 2.463853
68 1.558145 1.558145
68 0.438255 2.904165
7
7
7
7
4.684443
5.143124
5.477509
5.582932

Our essay writing service fulfills every request with the highest level of urgency
attachment

error: Content is protected !!