Skip to contents

Exam2.B.2 is used to visualize the effect of glm model statement with binomial data with logit and probit links.

References

  1. Stroup, W. W. (2012). Generalized Linear Mixed Models: Modern Concepts, Methods and Applications. CRC Press.

See also

Author

  1. Muhammad Yaseen (myaseen208@gmail.com)

  2. Adeela Munawar (adeela.uaf@gmail.com)

Examples

#-----------------------------------------------------------------------------------
## probitit Model  discussed in Example 2.B.2 using DataExam2.B.2
## Default link is logit
## using fmaily = binomial gives warning message of no-integer successes
#-----------------------------------------------------------------------------------
data(DataExam2.B.2)
Exam2.B.2glm <- glm(formula = y/n~x, family = quasibinomial(link = "probit"), data =  DataExam2.B.2)
summary(Exam2.B.2glm)
#> 
#> Call:
#> glm(formula = y/n ~ x, family = quasibinomial(link = "probit"), 
#>     data = DataExam2.B.2)
#> 
#> Coefficients:
#>             Estimate Std. Error t value Pr(>|t|)    
#> (Intercept) -0.45281    0.18202  -2.488 0.034555 *  
#> x            0.25157    0.03928   6.405 0.000125 ***
#> ---
#> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#> 
#> (Dispersion parameter for quasibinomial family taken to be 0.05522989)
#> 
#>     Null deviance: 3.49679  on 10  degrees of freedom
#> Residual deviance: 0.61969  on  9  degrees of freedom
#> AIC: NA
#> 
#> Number of Fisher Scoring iterations: 5
#> 
library(parameters)
model_parameters(Exam2.B.2glm)
#> Parameter   | Log-Risk |   SE |         95% CI |  t(9) |      p
#> ---------------------------------------------------------------
#> (Intercept) |    -0.45 | 0.18 | [-0.81, -0.10] | -2.49 | 0.013 
#> x           |     0.25 | 0.04 | [ 0.18,  0.33] |  6.40 | < .001
#> 
#> Uncertainty intervals (profile-likelihood) and p-values (two-tailed)
#>   computed using a Wald t-distribution approximation.