Question
After loading the faraway library, use the help(pima) command to obtain details regarding the pima data set. Please solve the following questions and data is
After loading the faraway library, use the help(pima) command to obtain details regarding the pima data set. Please solve the following questions and data is within the package'faraway'.
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
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