Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use this R script code to answer these 4 formulas . breast = read.csv ( file . choose ( ) , header =

Use this R script code to answer these
4
formulas.
breast
=
read.csv
(
file
.
choose
(
"
"
)
,
header
=
TRUE
)
attach
(
breast
)
model
2
=
glm
(
as
.
factor
(
BenignMalignant
)
~ClumpThickness
+
CellSizeUniformity
+
CellShapeUniformity
+
MarginalAdhesion
+
SingleEpithelialCell
+
BareNuclei
+
BlandChromatin
+
NormalNucleoli
+
Mitoses,
family
=
binomial
(
link
=
"logit"
)
)
breast$prediction
2
=
exp
(
predict
(
model
2
,
breast
)
)
/
1
+
exp
(
predict
(
model
2
,
breast
)
)
for
(
i in
1
:
6
9
9
)
{
if
(
breast$prediction
2
[
i
]
>
0
.
5
)
{
breast$prediction
2
[
i
]
=
4
}
else
(
breast$prediction
2
[
i
]
=
2
)
}
table
(
as
.
factor
(
breast$BenignMalignant
)
,
as
.
factor
(
breast$prediction
2
)
)
table
(
as
.
factor
(
breast$prediction
)
,
as
.
factor
(
breast$prediction
2
)
)
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Foundations Technology Fundamentals For IT Success

Authors: Bob Bryla

1st Edition

0782143725, 9780782143720

More Books

Students also viewed these Databases questions

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago