In general, the reason we might be interested in this summary is to see how well our model is fitting the data. Residuals are the differences between what we observe and what our model predicts. It would be nice if our residuals were evenly distributed. We would like for the first quantile and third quantile values and minimum and maximum values to be about the same in absolute value, and for the median to be close to 0. In addition, we would like to see the minimum and maximum values be less than about 3 in absolute value. This is because deviance residuals can be roughly approximated with a standard normal distribution when the model holds (Agresti, 2002). Residuals greater than the absolute value of 3 are in the tails of a standard normal distribution and usually indicate strain in the model.
But recall that our response variable, died, takes two values, 0 and 1, and that our model is predicting a probability that ranges between 0 and 1. So how are we getting residuals such as -2.31 or 2.44?
We can calculate these by hand. Notice we need to first convert our response to a 0 and 1. (It is stored as a factor in the ICU data frame.) When finished, we show the observed value (y), predicted probability from model (p_hat), and raw residual (e) for the first few observations.
An interesting property of standardized Pearson residuals is that they have an approximate standard normal distribution if the model fits (Agresti, 2002). This can be useful for assessing model fit as we demonstrate later in the article.
This test statistic can help us assess if our model is different from the saturated model. The null of the test is no difference between the models. The LRstats() function from the vcdExtra package runs this test for us. We fail to reject the null hypothesis in this case.
Deviance residuals measure how much probabilities estimated from our model differ from the observed proportions of successes. Bigger values indicate a bigger difference. Smaller values mean a smaller difference.
We mentioned the formula for deviance residuals is a bit weird. It uses log transformations and addition. Why is that? To better understand this, we need to talk about maximum likelihood. Consider the following toy example of flipping coins.
It turns out that multiplying this by -2 has desirable statistical qualities. The resulting value has a chi-square distribution as our sample size gets bigger (Wilks, 1938). When we multiply by -2, we get the following value:
To get the model-based deviance residuals, we multiply by the sign of the raw residual. As we mentioned before, the raw residual is the observed response (1 or 0) minus the predicted probability (in this case 0.6). The sign() function extracts 1 or -1 depending on the sign.
So we see that deviance residuals for binomial logistic regression are a scaled version of the components of the binomial log likelihood. In addition, since they sum to a statistic that has an approximate chi-squared distribution, the components themselves can be approximated with a standard normal distribution. (Recall a sum of n squared standard normal values has a chi-square distribution with n degrees of freedom.)
Now we refit the model using glm(), but this time we use different syntax. Instead of died, we use proportion as the response and add the argument weights = trials to provide the sample size for each proportion.
The labeled points refer to rows in our data. We can use those to investigate the residuals. For example, looking at rows 68 and 76, we see that our model predicts high probability of dying, but these subjects lived. Thus we have large residuals. But also notice each prediction is based on one observation. We should be cautious reading too much into these residuals. Even though this model is based on group-level data, we still have instances of groups with just one observation.
Earlier we mentioned that standardized Pearson residuals have an approximate standard normal distribution if the model fits. This implies looking at a QQ Plot of residuals can provide some assessment of model fit. We can produce this plot using plot() with which = 2. Again the plot created with the group-level model is more informative than the plot created with the subject-level model.
But when we acknowledge the risks of the job, we also must remember many of these risks are being managed and reduced. And here is the good news: In many ways, we are improving firefighter health and wellness both on the job and after we retire.
There is a term for this behavior: normalization of deviance. This was a term first coined by Sociologist Diane Vaughn in review of the Challenger shuttle disaster. By her definition, it is the process in which deviance from correct behavior no longer feels incorrect or wrong.
In the fire service, what we must realize is this is not simply about you as an individual allowing normalization of deviance in your own activities and tasks. It is also allowing others in your crew, your station or your organization to adopt similar behaviors, which leads to a culture of unsafe and dangerous practices. As we all know, we can only continue to do that for so long before a negative outcome occurs.
Second, are you observing others on your crew, in your station, or in your department not working safely? If you are, what are you doing about it? Remember, the normalization of deviance in the fire service is not just about you. It is also about those around you. Their negative outcomes can put you at risk too.
We are all passionate about what we do and why we do it. And we SHOULD be. But we should not only be passionate about serving the public and providing the best outcomes for the citizens we are sworn to protect. We should be equally passionate about protecting ourselves and our fellow firefighters, so we return home to our families healthy, happy, resilient, and able to enjoy our lives outside the job and the firehouse. Yes, we will sometimes be called upon to sacrifice our own safety. But we must be smart about which risks we must take and which we can manage.
We can and must do better. The best way to do that is to make sure you are doing it right. If you are not, fix it. It is completely within your control. And once you are doing it right, hold each other to the same behavior. When someone is not doing it right, say something and get everyone on board.
The fire service must embrace a culture of operating safely and managing risk appropriately. Until we do, we will continue to mourn those we have lost, support the families left behind, and read more reports about what went wrong again, and again, and again.
All the kids in Modoc Elementary School had been ushered into the Multi Purpose Room. It was an exciting day. We were all going to watch the Challenger Shuttle Launch. The school was especially excited about this launch. A civilian school teacher was going into space.
I was sitting right up front (probably so the teacher could keep an eye on me). I had on the paper helmet I had made the day before. I was ready to sign up for NASA. We all counted down and then cheered when the shuttle lifted off.
After studying the Challenger Launch and other failures, Vaughan came up with the theory for this type of breakdown in procedure. She called this theory the normalization of deviance. She defines it as:
The gradual process through which unacceptable practice or standards become acceptable. As the deviant behavior is repeated without catastrophic results, it becomes the social norm for the organization
In other words, the gradual breakdown in process where a violation of procedure becomes acceptable. One important key is, it happens even though everyone involved knows better.
Prior to the launch, NASA became more and more focused on hitting the launch date (sound familiar?). Deviants from established procedures kept popping up. Instead of reevaluating and changing things, the deviants were accepted. Over time these deviants became the new normal.
There is a study of how the normalization of deviance affects healthcare. The author, John Banja, identifies 7 factors that contribute to normalizing unacceptable behaviors. These 7 factors are extremely relevant to us in the software industry as well. Here are his seven factors and some takeaways for the software world.
Guess what? Sometimes this is true. Sometimes the rules are stupid and inefficient and are created by someone that is out of touch. What is the solution? Don't ignore the rule. Go find out why the rule is there.
What would be a better solution? If it's a better way and you don't see any negative to doing it that way, communicate it. It might be beneficial to everyone to not have that rule. Have a discussion with your team about what you are trying to do and why. Maybe the rule can be changed or maybe you aren't seeing the whole picture.
The key to fighting normalization of deviance is to understand that everyone knows better. If employees are consistently accepting deviants to accepted procedures then find out why.
A great way to see this is in action is to watch what happens when a new hire comes to the team with an alert. How does the team react? Do they brush them off? If so, then you probably have a team that is accepting deviant practices.
As you can tell, most of the solutions are the same: Communication. Creating a culture of communication is the only way to keep from falling into this trap. Empower your employees to question the status quo. You will create stronger teams, better ideas, and improved performance.
Sometimes it's hard to judge this in your own culture. I call this "ship in a bottle" syndrome. When you're in the bottle it's hard to see things clearly. AKF has helped hundreds of software companies change their culture. Give us a call, we can help. Want to know more? Try our AKF trained AI assistant.
The internet has become so ubiquitous in our lives that much of our commerce, socialising, dating and recreation are now carried out via electronic means (Katz & Rice, 2002). Such a growth in both traffic and time spent on the internet has seen new platforms emerge that allow individuals to easily cross the boundary from analogue reality to digital fantasy. This could be through the careful management of a social media page to present a fictitious account of one's life via platforms such as Facebook, Twitter and Instagram, or it could be the broadcasting of personal performance in order to experience celebrity via platforms such as YouTube, Vimeo and Twitch.tv. Whilst these digital portrayals are often carefully managed and do not reflect reality, there is a burgeoning market of consumers who are willing to monetise the performances which people share, and it is estimated that social media influencers generate $1.7 billion for the global economy each year (Media Kix, 2017).
93ddb68554