[R] CORRECTION: Re: Multicollinearity with brglm?

woodbomb jsr1950 at gmail.com
Thu Apr 2 13:43:37 CEST 2009


Ioannis,

Here's an illustrative example. Note that: glm also objects to X4; X1,..,X4
are defined as factors.

I've looked (albeit in a crude way) at various examples using the perturb
package and it seems to confirm that X4 is the source of multicollinearity.
As I say, I think the constant row-sum condition is the source of the
problem, but I'm not sure why or how to deal with it. 

Thanks for your interest (and for the finite parameter estimates brglm
provides)!


>attributes(x)

$names
[1] "X1" "X2" "X3" "X4"

$row.names
[1] "2" "3" "4" "5"

$class
[1] "data.frame"

>x
  X1 X2 X3 X4
2  0  1  0  1
3  0  1  1  0
4  1  0  0  1
5  1  0  1  0

>attributes(y)

$dim
[1] 4 2

$dimnames
$dimnames[[1]]
NULL


$dimnames[[2]]
[1] "s" "f"

>y
     s f
[1,] 3 7
[2,] 2 8
[3,] 5 5
[4,] 3 7

>summary(mod.simple)
Call:
brglm(formula = cbind(s, f) ~ X1 + X2 + X3 + X4, family = binomial, 
    data = data)


Coefficients: (1 not defined because of singularities)

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 4.5797  on 5  degrees of freedom
Residual deviance: 3.6469  on 2  degrees of freedom
Penalized deviance: -1.79616 
AIC:  26.793 


>summary(mod.simple.brglm)
Call:
glm(formula = cbind(s, f) ~ X1 + X2 + X3 + X4, family = binomial, 
    data = data)

Deviance Residuals: 
      1        2        3        4        5        6  
 0.7103  -1.0256   0.3445   0.3760  -1.1876   0.6072  

Coefficients: (1 not defined because of singularities)
              Estimate Std. Error  z value Pr(>|z|)
(Intercept) -1.356e+00  9.219e-01   -1.471    0.141
X11          2.445e-01  7.003e-01    0.349    0.727
X21          7.264e-01  7.048e-01    1.031    0.303
X31          6.316e-14  6.959e-01 9.08e-14    1.000
X41                 NA         NA       NA       NA

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 5.0363  on 5  degrees of freedom
Residual deviance: 3.5957  on 2  degrees of freedom
AIC: 26.742

Number of Fisher Scoring iterations: 4


-- 
View this message in context: http://www.nabble.com/Multicollinearity-with-brglm--tp22814696p22845978.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list