[R] coef and vcoc for polr inconsistent??

John Fox jfox at mcmaster.ca
Sun Jun 6 01:15:07 CEST 2004


Dear Bendix,

vcov() is indeed giving you the covariances among the coefficients and
inter-level cutpoints, as you can see by taking the square-roots of the
diagonal entries of the covariance matrix that it reports and comparing
these with the values in the table provided by summary() -- or was your
point that coef() doesn't report the cutpoints?

I hope that this helps,
 John 

> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch 
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of BXC 
> (Bendix Carstensen)
> Sent: Saturday, June 05, 2004 2:51 PM
> To: r-help at stat.math.ethz.ch
> Subject: [R] coef and vcoc for polr inconsistent??
> 
> Is the following an inconsistency, programming glitch or a feature? 
> One would expect that vcov(obj) was the variance-covariance 
> of coef(obj), but apparently this is not the case for polr objects:
> 
> > x <- rnorm( 100 )
> > y <- rnorm( 100 )
> > ff <- factor( sample( 1:4, 100, replace=T ) ) pm <- polr( 
> ff ~ x + y ) 
> > coef( pm )
>          x          y 
> 0.21219010 0.03558506 
> > vcov( pm )
> 
> Re-fitting to get Hessian
> 
>                x            y          1|2          2|3          3|4
> x    0.033462790 -0.002414745 -0.006183451 -0.004164503 -0.001585546
> y   -0.002414745  0.032953020  0.003821232  0.003645342  0.003756031
> 1|2 -0.006183451  0.003821232  0.060134608  0.029651508  0.018105699
> 2|3 -0.004164503  0.003645342  0.029651508  0.041604224  0.025465751
> 3|4 -0.001585546  0.003756031  0.018105699  0.025465751  0.051576286
> 
> But of course you CAN get wat you want:
> 
> > summary( pm )$coef
> 
> Re-fitting to get Hessian
> 
>           Value Std. Error    t value
> x    0.21219010  0.1829284  1.1599628
> y    0.03558506  0.1815297  0.1960289
> 1|2 -1.29481930  0.2452236 -5.2801580
> 2|3 -0.22054056  0.2039711 -1.0812342
> 3|4  0.98703785  0.2271041  4.3461907
> 
> > version
>          _              
> platform i386-pc-mingw32
> arch     i386           
> os       mingw32        
> system   i386, mingw32  
> status                  
> major    1              
> minor    9.0            
> year     2004           
> month    04             
> day      12             
> language R       
>




More information about the R-help mailing list