Take the 2-minute tour ×
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

I'm working in R, using glm.nb (of the MASS package) to model count data with a negative binomial regression model. I'd like to get the standardized (beta) coefficients from the model, but am given the unstandardized (b "Estimate") coefficients.

The R documentation does not seem to show of a way to retrieve the standardized beta weights easily for a negative bionomial regression model.

The R script is something like:

library("MASS")
nb = glm.nb(responseCountVar ~ predictor1 + predictor2 + 
    predictor3 + predictor4 + predictor5 + predictor6 + 
    predictor7 + predictor8 + predictor9 + predictor10 + 
    predictor11 + predictor12 + predictor13 + predictor14 + 
    predictor15 + predictor16 + predictor17 + predictor18 + 
    predictor19 + predictor20 + predictor21,
    data=myData, control=glm.control(maxit=125))
summary(nb)

and the output of the above is:

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-5.1462  -1.0080  -0.4247   0.2277   3.4336  

Coefficients:
                Estimate Std. Error z value Pr(>|z|)    
(Intercept)   -3.059e+00  3.782e-01  -8.088 6.05e-16 ***
predictor1    -2.447e+00  4.930e-01  -4.965 6.88e-07 ***
predictor2    -1.004e+00  1.313e-01  -7.650 2.00e-14 ***
predictor3     1.158e+00  1.440e-01   8.047 8.46e-16 ***
predictor4     1.334e+00  7.034e-02  18.970  < 2e-16 ***
predictor5     9.862e-01  2.006e-01   4.915 8.87e-07 ***
predictor6     1.166e+00  2.378e+00   0.490  0.62392    
predictor7    -1.057e-01  1.494e-01  -0.707  0.47936    
predictor8     4.051e-01  7.318e-02   5.536 3.10e-08 ***
predictor9    -3.320e-01  1.132e-01  -2.933  0.00336 ** 
predictor10    3.761e-01  1.561e-01   2.409  0.01600 *  
predictor11    8.660e-02  4.332e-02   1.999  0.04557 *  
predictor12   -1.583e-01  2.044e-01  -0.774  0.43872    
predictor13    6.404e-02  3.972e-03  16.122  < 2e-16 ***
predictor14    4.264e-03  2.297e-04  18.563  < 2e-16 ***
predictor15    3.279e-03  5.697e-04   5.755 8.68e-09 ***
predictor16    3.487e-03  3.447e-03   1.012  0.31177    
predictor17    1.534e-04  1.647e-04   0.931  0.35182    
predictor18   -7.606e-05  9.021e-05  -0.843  0.39917    
predictor19    2.536e-04  1.733e-05  14.633  < 2e-16 ***
predictor20    2.997e-02  4.977e-03   6.021 1.73e-09 ***
predictor21    2.756e+01  3.508e+00   7.856 3.98e-15 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 

(Dispersion parameter for Negative Binomial(0.9232) family taken to be 1)

    Null deviance: 5631.1  on 1835  degrees of freedom
Residual deviance: 2120.7  on 1814  degrees of freedom

                                AIC: 19268    
Number of Fisher Scoring iterations: 1    
                              Theta: 0.9232 
                          Std. Err.: 0.0282 
                 2 x log-likelihood: -19221.9910

My question is: Is there a way to get the beta weights, or do I need to try to convert my unstandardized b coefficients to standardized beta coefficients (if so, how would I do that)?

share|improve this question

1 Answer 1

A quick way to get at the standardized beta coefficients directly from any lm (or glm) model in R, try using lm.beta(model). In the example provided, this would be:

library("MASS")
nb = glm.nb(responseCountVar ~ predictor1 + predictor2 + 
    predictor3 + predictor4 + predictor5 + predictor6 + 
    predictor7 + predictor8 + predictor9 + predictor10 + 
    predictor11 + predictor12 + predictor13 + predictor14 + 
    predictor15 + predictor16 + predictor17 + predictor18 + 
    predictor19 + predictor20 + predictor21,
    data=myData, control=glm.control(maxit=125))
summary(nb)

library(QuantPsyc)
lm.beta(nb)
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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