Question: Code in R Studio ( partial data included in photo with values ranging from True / False and A - F ) table [

Code in R Studio (partial data included in photo with values ranging from True/False and A-F)\table[[accepted,female,department],[TRUE,FALSE,A],[TRUE,FALSE,A],[TRUE,FALSE,A],[TRUE,FALSE,A],[TRUE,FALSE,A],[TRUE,FALSE,A],[TRUE,FALSE,A],[TRUE,FALSE,A],[TRUE,FALSE,A],[TRUE,FALSE,A],[TRUE,FALSE,A],[TRUE,FALSE,A],[TRUE,FALSE,A],[TRUE,FALSE,A],[TRUE,FALSE,A],[TRUE,FALSE,A],[TRUE,FALSE,A],[TRUE,FALSE,A],[TRUE,FALSE,A],[TRUE,FALSE,A],[TRUE,FALSE,A],[TRUE,FALSE,A],[TRUE,FALSE,A],[TRUE,FALSE,A],[TRUE,FALSE,A],[TRUE,FALSE,A]]: # Students who intend to use the predict(...) function for these # problems are advised to consult the documentation in # ?predict.glm to determine how it is used for different types of # predictions in the context of logistic regression. # Do not edit the following BerkeleyData-read.csv("BerkeleyData.csv") # Do not edit the above # Fit a logistic regression model that predicts acceptance # based on the sex of the applicant. # Save the model as model.q1. # Note for autograder: You must fit this model using the format # glm(var1~var2+..., data=BerkeleyData); do not rename variables in # the data frame. model.q1-glm(accepted~1, data=BerkeleyData, family='binomial') # What are the log-odds of being accepted for a male applicant? # Save your answer in the variable q1.a q1.a-NA # What are the odds of being accepted for a female applicant? # Save your answer in the variable q1.b q1.b-NA # What is the probability of being accepted for a male applicant? # Save your answer in the variable q1.c q1.c-NA # What is the probability of being accepted for a female applicant? # Save your answer in the variable q1.d q1.d-NA # (Hidden answer) Based on this model, without considering other variables, # does it appear that there is a statistically significant gender disparity # in the admissions of Berkeley? # Answer TRUE or FALSE # Save your answer in the variable q1.e q1.e-NA
 Code in R Studio (partial data included in photo with values

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 Databases Questions!