[R] inconsistent output using 'round'

Bob Green bgreen at dyson.brisnet.org.au
Thu Apr 19 12:38:21 CEST 2007


I am hoping for some advice regarding limiting decimal points to 3. 
'Round' produces the desired results except for the 97.5% confidence interval.
Any advice as to how I modify the code to obtain output to 3 decimal 
points for all ouput is appreciated,

regards

Bob Green


mod.multgran <-multinom(offence ~ grandiose * violent.convictions, 
data = kc,  na.action = na.omit)
summary(mod.multgran, cor=F, Wald=T)
Anova (mod.multgran)
 > round(exp(coef(mod.multgran)),digits = 3)
          (Intercept) grandiosey violent.convictionsy
GBH.UW         0.583      0.147                0.806
homicide       0.333      0.343                0.882
          grandiosey:violent.convictionsy
GBH.UW                             0.001
homicide                           0.764
 > round(exp(confint(mod.multgran)),digits =3)
, , GBH.UW

                                                 2.5 %       97.5 %
(Intercept)                             0.341 9.990000e-01
grandiosey                              0.040 5.370000e-01
violent.convictionsy                    0.297 2.187000e+00
grandiosey:violent.convictionsy 0.000 6.265942e+26

, , homicide

                                          2.5 % 97.5 %
(Intercept)                             0.173  0.641
grandiosey                      0.101  1.165
violent.convictionsy                    0.268  2.905
grandiosey:violent.convictionsy 0.058 10.031



More information about the R-help mailing list