[R] why summary() does not work here???

Gavin Simpson gavin.simpson at ucl.ac.uk
Sun Aug 16 21:34:12 CEST 2009


On Sun, 2009-08-16 at 10:48 -0700, Hongwei Dong wrote:
> I'm quite sure the VGAM package has been installed because I used it to
> estimate the model before I use summary(). One reason I can guess is that
> the default method for summary() is S3, but here it is S4. But I'm not sure
> and don't know what to do with that. Here is an example you can reproduce:
> 
> counts = c(18,17,15,20,10,20,25,13,12)
> outcome = gl(3,1,9)
> treatment = gl(3,3)
> print(d.AD <- data.frame(treatment, outcome, counts))
> vglm.D93 = vglm(counts ~ outcome + treatment, family=poissonff)
> summary(vglm.D93)

Works for me with:

> packageDescription("VGAM")$Version
[1] "0.7-9"
> sessionInfo()
R version 2.9.1 Patched (2009-08-07 r49107) 
i686-pc-linux-gnu 

locale:
LC_CTYPE=en_GB.UTF-8;LC_NUMERIC=C;LC_TIME=en_GB.UTF-8;LC_COLLATE=en_GB.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_GB.UTF-8;LC_PAPER=en_GB.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_GB.UTF-8;LC_IDENTIFICATION=C

attached base packages:
[1] stats4    splines   stats     graphics  grDevices utils    
[7] datasets  methods   base     

other attached packages:
[1] VGAM_0.7-9

loaded via a namespace (and not attached):
[1] tools_2.9.1

Are you using an older R or version of VGAM? Is this in a clean session?

G

> 
> With this, I got:
> 
> > summary(vglm.D93)
> Length  Class   Mode
>      1   vglm     S4
> 
> If I just type "vglm.D93", I got:
> 
> Call:
> vglm(formula = counts ~ outcome + treatment, family = poissonff)
> 
> Coefficients:
>   (Intercept)      outcome2      outcome3    treatment2    treatment3
>  3.044522e+00 -4.542553e-01 -2.929871e-01  7.766813e-16  3.009745e-16
> 
> Degrees of Freedom: 9 Total; 4 Residual
> Residual Deviance: 5.129141
> Log-likelihood: -23.38066
> 
> 
> Looking forward to see more advices. Thanks.
> 
> Harry
> 
> 
> 
> 
> On Sat, Aug 15, 2009 at 8:18 PM, Ronggui Huang <ronggui.huang at gmail.com>wrote:
> 
> > I cannot reproduce what you mentioned. One possible is that you use
> > summary() without loading VGAM package.
> >
> >
> > 2009/8/16 Hongwei Dong <pdxdong at gmail.com>:
> > > Hi, R users,
> > >  I'm using the function "vglm" to estimate a multinomial logit model.
> > Every
> > > time I use "summary()" to ask for the coefficients and std error, I got
> > > this:
> > >
> > > Length  Class   Mode
> > >     1   vglm     S4
> > >
> > > Anyone know what's wrong here? Thanks.
> > >
> > > Harry
> > >
> > >        [[alternative HTML version deleted]]
> > >
> > > ______________________________________________
> > > R-help at r-project.org mailing list
> > > https://stat.ethz.ch/mailman/listinfo/r-help
> > > PLEASE do read the posting guide
> > http://www.R-project.org/posting-guide.html
> > > and provide commented, minimal, self-contained, reproducible code.
> > >
> >
> >
> >
> > --
> > HUANG Ronggui, Wincent
> > PhD Candidate
> > Dept of Public and Social Administration
> > City University of Hong Kong
> > Home page: http://asrr.r-forge.r-project.org/rghuang.html
> >
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%




More information about the R-help mailing list