0

I created a logistic/logit model with a binomial response variable using

model <- glm(response~predictor1+predictor2+...)

and then I used the predict function to create a new data frame

outcome <-data.frame(predict(model,newdata=IndependentDataSet,type="response"),as.numeric(as.character(Independent$ResponseVariable)))

names(outcome) <- c("Pr","Obs")

I can use one of the following functions

plot(verify(data$obs,data$pr),CI=TRUE) 
attribute(verify(data$obs,data$pr)) 

to create a plot that looks like this to create a plot that looks like this

or

reliability.plot(verify(data$obs,data$pr))

from

library(verification)

to create a reliability diagram. I am wondering how I can separate the bins based on specific values. For example, the model that I am evaluating is based around a climatology of 19% (0.19) and I want there to be a bin at (1/3)*climatology, climatology, and go up by (2/3) of climatology for the proceeding bins. How can I do this?

Additionally, I have seen the bins represented as circles that are proportional in size to the percent of the data that is at that bin. Does anyone know how to make a more aesthetically pleasing reliability diagram in R? Any recommendations are welcome.

This is how I would like my diagrams to appear This is how I would like my diagrams to appear

MrFlick
  • 195,160
  • 17
  • 277
  • 295
Taylor Adams
  • 21
  • 1
  • 3
  • When asking for plotting help be sure to include a [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input data. We have no idea what you are seeing. And vague questions about making them "more aesthetically pleasing" are kind of off topic. Ask a more specific question. – MrFlick Jun 14 '17 at 13:58
  • @MrFlick I have added more information to the question in response to your comment. My question regarding the bin values is specific and should not yield any problems with ambiguity. Any help I can receive on this topic is appreciated. The last question regarding the looks is simply a bonus if anyone happens to know the answer. – Taylor Adams Jun 14 '17 at 14:35

1 Answers1

0

The easiest could be using

    trace("attribute.default",edit=TRUE)

or whichever other function. In this way, you access the source code and edit it. These changes affect only the current R session.

fcq
  • 1