1
$\begingroup$

I am currently try to model child pedestrian casualties for each ward in England and to create a model that will predict how many casualties per area based on social and economic qualities of the area that proved significant. To do this I am using negative binomial regression however I am unsure how to read the output like what do the estimates tell us, how do I calculate predicted values using the model and should the predictions be integers.

Totally confused and new to modelling so help would be appreciated

Table of coefficients: are estimates not very small?
Coefficients:
                                   Estimate Std. Error  
(Intercept)                       1.601e-01  1.577e-01     
Multiple_Deprivation_Measure_Sco -4.744e-03  9.097e-03     
traffic.proxy                     2.224e-04  6.015e-05   
Proximity_to_Services_Domain_Sco -1.417e-01  2.564e-02  
Crime_and_Disorder_Domain_Score   1.065e-02  1.884e-03   
Income_Domain_Score               1.415e+00  9.385e-01    
All.households                    1.015e-03  3.599e-04   
Population                       -3.238e-04  2.228e-04    
Children                          1.132e-03  3.767e-04  
Crossing                         -8.300e-01  4.156e-01    
Controlled                        8.528e-01  4.185e-01    
Uncontrolled                      8.618e-01  4.150e-01   
All.cars.or.vans                 -3.205e-04  2.071e-04     
Enrolled                         -1.892e-04  1.195e-04      
FSME                              2.561e-04  3.571e-04   
Number_of_Schools                 1.343e-01  3.508e-02   
$\endgroup$
3
  • 1
    $\begingroup$ Can you paste in the output you are having trouble interpreting? $\endgroup$ Commented May 2, 2016 at 14:11
  • $\begingroup$ Not answering your question? $\endgroup$ Commented May 2, 2016 at 19:59
  • $\begingroup$ Yes, just one more quick question. 164 out of 890 of my observations had zero values, will this affect my choice of model? $\endgroup$
    – emonaghhan
    Commented May 3, 2016 at 8:53

1 Answer 1

1
$\begingroup$

I am missing information in your posted results. However, here is a quick simulation of something along the thematic lines of your post, but much simplified. It seems clear that you are using R.

The toy data was generated as follows (trial and error, mainly, but here it is if you want to reproduce):

options(scipen=999) # To ease the interpretation of the output values.
set.seed(2) # To reproduce exact results.
n=84 # Number of observations
fam.income = round(ifelse((x = (rlnorm(n, 0, 1) + 0.2) * 150) < 1e3, x, 100), 0) # $1,000
population = round(ifelse((x = (rlnorm(n, 0, 1) + 1) * 3) < 1e2, x, 1), 0)       # 100,000
gender = sample(c("M","F"), n, replace=T)
casualties = round(ifelse((x = (sample(10:30, n, replace=T) 
- 0.2 * fam.income + 5 * population)) > 0, x, sample(1:15)), 0)
data= data.frame(casualties, population, fam.income, gender)
head(data)

It would be something like this:

       casualties population fam.income gender
1          24          3         91      M
2          78         22        210      F
3           5          5        764      F
4          33          5         78      F
5          21          5        168      F
...

Here is the plot:

enter image description here

showing a positive relationship between casualties and population, and a negative relationship with fam.income.

Now we run the regression:

library(MASS)
fit = glm.nb(casualties ~ . , data)
 Coefficients:
              Estimate Std. Error z value            Pr(>|z|)    
(Intercept)  3.2059473  0.0814420   39.37 <0.0000000000000002 ***
population   0.0818850  0.0049025   16.70 <0.0000000000000002 ***
fam.income  -0.0034392  0.0002606  -13.20 <0.0000000000000002 ***
genderM      0.0305563  0.0679256    0.45               0.653   

And we see that predictably we get a statistically significant relationship between casualties and both population and income $\text{p-value}\sim0 $. Gender was not significant.

To your questions:

  1. How do I calculate predicted values using the model:

In R you would create a new data.frame to use the built-in function. For example for male's from a families with an income of $50,000, living in a city of 200,000 the predicted number of casualties is:

new.data=data.frame(population = 2, fam.income = 50, gender = "M")
predict(fit,new.data, type="response")
       1 
 25.2371  

If you were to do it manually, you would calculate predicted casualties using the formula:

$$\text{pr. casu'ties}= \exp\{3.2059+0.0818 \times \text{pop} -0.0034\times\text{fam.income}+\text{I}_M\times 0.0305\}$$

exp(coef(fit)[1] + coef(fit)[2] * 2 + coef(fit)[3] * 50 + coef(fit)[4])
  1. Should the predictions be integers?

Not necessarily. The formula applied to predict the number of casualties involves exponentiating the linear equation, so the predicted values will usually not be integers.

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.