Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The question is like this: Fit a binomial regression model to these data with Deaths as the response and Indigenous (a factor) and Year as

The question is like this: Fit a binomial regression model to these data with Deaths as the

response and Indigenous (a factor) and Year as predictors.

I write codes in r:

custody<- read.table(file.choose(),header = TRUE)

custody$Indigenous<-factor(custody$Indigenous)

fit.glm<-glm(Deaths~Year+Indigenous,data=custody,family="binomial")

And the error says y should be 0<= y<=1, so could you help me to correct my codes, please?

Data here:

YearIndigenousPrisonersDeathsPopulation

1990Yes20416168317

1991Yes21668172462

1992Yes22232176827

1993Yes24167181341

1994Yes274211185836

1995Yes290717190438

1990No122642713141817

1991No128553113326044

1992No133363413501987

1993No134504213649262

1994No143024213810095

1995No145014213995940

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_2

Step: 3

blur-text-image_3

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

Differential Equations With Boundary-Value Problems

Authors: Dennis G Zill, Brad Strong, Michael Cullen

7th Edition

1111798524, 9781111798529

More Books

Students also viewed these Mathematics questions