[R] P values for vglm(zibinomial) function in VGAM

suuz suuz_beck at hotmail.com
Tue Aug 23 16:04:17 CEST 2011


Hi ,

I know this question has been asked twice in the past but to my knowldege,
it still hasn't been solved.

I am doing a zero inflated binomial model using the VGAM package, I need to
obtain p values for my Tvalues in the vglm output. code is as follows

> mod2=vglm(dmat~Season+Diel+Tidal.phase+Tidal.cycle,zibinomial, data=mp1)
> summary(mod2)

Call:
vglm(formula = dmat ~ Season + Diel + Tidal.phase + Tidal.cycle, 
    family = zibinomial, data = mp1)

Pearson Residuals:
               Min        1Q    Median        3Q     Max
logit(phi) -3.6496  0.273679  0.285619  0.296763  1.0974
logit(mu)  -6.3631 -0.029027 -0.020786 -0.011719 80.6051

Coefficients:
                  Value Std. Error   t value
(Intercept):1  2.365835   0.029142  81.18334
(Intercept):2 -3.182376   0.050054 -63.57944
SeasonSpring  -0.080840   0.054201  -1.49147
SeasonSummer   0.204781   0.049936   4.10083
SeasonWinter   0.385078   0.043874   8.77692
DielE         -0.079190   0.079859  -0.99163
DielM          0.071607   0.074620   0.95963
DielN          0.132377   0.036419   3.63488
Tidal.phaseNT -0.252715   0.054053  -4.67536
Tidal.phaseST  0.145777   0.045554   3.20010
Tidal.cycleF   0.114808   0.044897   2.55713
Tidal.cycleH  -0.074224   0.048063  -1.54428
Tidal.cycleL  -0.049681   0.047717  -1.04116

Number of linear predictors:  2 

Names of linear predictors: logit(phi), logit(mu)

Dispersion Parameter for zibinomial family:   1

Log-likelihood: -7831.693 on 30569 degrees of freedom

Number of Iterations: 13 

I have tried the suggestions 
pt(coef(summary(mod2)), 30569, lower.tail = TRUE, log.p = FALSE)

Value Std. Error      t value
(Intercept):1 0.9910021735  0.5116242 1.000000e+00
(Intercept):2 0.0007310901  0.5199600 0.000000e+00
SeasonSpring  0.4677849543  0.5216125 6.792427e-02
SeasonSummer  0.5811276264  0.5199133 9.999794e-01
SeasonWinter  0.6499089525  0.5174974 1.000000e+00
DielE         0.4684409796  0.5318250 1.606939e-01
DielM         0.5285424555  0.5297410 8.313752e-01
DielN         0.5526565030  0.5145256 9.998607e-01
Tidal.phaseNT 0.4002451101  0.5215532 1.473475e-06
Tidal.phaseST 0.5579507181  0.5181669 9.993124e-01
Tidal.cycleF  0.5457011061  0.5179053 9.947207e-01
Tidal.cycleH  0.4704164848  0.5191670 6.126507e-02
Tidal.cycleL  0.4801883607  0.5190291 1.489050e-01

pt(coef(mod2), 30569)

(Intercept):1 (Intercept):2  SeasonSpring  SeasonSummer  SeasonWinter 
 0.9910021735  0.0007310901  0.4677849543  0.5811276264  0.6499089525 
        DielE         DielM         DielN Tidal.phaseNT Tidal.phaseST 
 0.4684409796  0.5285424555  0.5526565030  0.4002451101  0.5579507181 
 Tidal.cycleF  Tidal.cycleH  Tidal.cycleL 
 0.5457011061  0.4704164848  0.4801883607


But these seem to be giving strange results, those which are clearly more
different to the basline levels (Autumn, D, bl and E) are coming up as least
significant. Perhaps it is my interpretation.

I couldnt follow
2*min(pt(coef(summary(mod2)), 30569), 1-pt(coef(summary(mod2)), 30569)) 
??

Does anyone know what I might be doing wrong or how to go about the last
code? 

I have read as much as I can find on VGAM and zib but have ran out of ideas.
I apologise if this appears to be a beginners question.

many thanks in advance

--
View this message in context: http://r.789695.n4.nabble.com/P-values-for-vglm-zibinomial-function-in-VGAM-tp3762858p3762858.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list