Question: After loading the faraway library, use the help(pima) command to obtain details regarding the pima data set that was referenced in HW08.Become familiar with the

After loading the faraway library, use the help(pima) command to obtain details regarding the pima data set that was referenced in HW08.Become familiar with the data set to provide context for this HW exercise.

Use the R code below to help you obtain the crude and adjusted Odds Ratios.

a) Interpret the adjusted Odds Ratio for diastolic.

b) Perform the Likelihood Ratio Test to determine if age, insulin, and triceps can be dropped from the model using and overall alpha=0.05.

c) Perform the Likelihood Ratio Test to determine if the coefficient of diastolic is equal to the coefficient of insulin using alpha=0.05.

library(faraway)

library(lmtest)

library(epiDisplay)

#Multiple Logistic Regression in R

logistic = glm(test ~ age + bmi + diastolic + diabetes + glucose + insulin + pregnant + triceps,family=binomial(logit),data=pima)

summary(logistic)

## Easier view

logistic.display(logistic)

#Example code for Likelihood Ratio Test

#for H0: B(triceps)=0 #write model without triceps

logistic1 = glm(test ~ age + bmi + diastolic + diabetes + glucose + insulin + pregnant,family=binomial(logit),data=pima)

lrtest(logistic1,logistic)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!