Question: 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

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!