Question
The pima data set contains data from 768 adult female Pima Indians leaving near Phoenix. The faraway library will need to be installed to access
The pima data set contains data from 768 adult female Pima Indians leaving near Phoenix. The "faraway" library will need to be installed to access the data set. After the library has been installed use the following commands to access the data set and look at the first 6 entries.
library(faraway)
head(pima)
Use the following command to get a description of the data set and the variables.
help(pima)
a)Fit a model for the probability of getting a positive test given the other variables in the data set. Write down the estimated model.
b)Perform a hypothesis test of whether the probability of having diabetes changes with the number of pregnancies a women has after controlling for the other variables available in the model.
c)Provide and interpret the confidence interval for the pregnant coefficient from the model fit for part (a). Hint use the confint() function.
d)What does your model predict the probability of getting a positive test for someone who has been pregnant 6 times, has a glucose value of 148, a diastolic value of 72, a triceps value of 35, an insulin value of 0, a bmi of 33.6, a diabetes pedigree function of .627 and is 50 years old. (These are the attributes for the first person in the study, which can be accessed by pima[1,]. That information may or may not be helpful for you depending on how you approach this problem.)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started