5
$\begingroup$

I use a GLM to find the best fit for my included explanatory variables. I'm asked to estimate the effect size for this GLM and I can't find exactly what's about. I founnd this R code:

    #Recent version of R used (3.5)
    library('pwr')
    library('lmSupport')
    modelEffectSizes(model1)  
    modelPower(u=1, v=1284, alpha=0.05, peta2=0.03)

How can I apply this for my dataset? In particular, I am unclear on what peta2 and u stand for. I suppose v refers to the sample size.

Here is my dataset :

     res=structure(list(Motif = structure(c(2L, 1L, 1L, 2L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 
        1L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 2L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 
        2L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        2L, 1L, 2L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 
        1L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L), .Label = c("Home", 
        "Other"), class = "factor"), Type = structure(c(1L, 2L, 2L, 1L, 
        2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
        1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 
        2L, 1L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
        2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
        2L, 1L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 
        2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 
        2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 1L, 2L, 1L, 2L, 2L, 2L, 2L, 
        2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 1L, 
        2L, 1L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 
        2L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
        2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 1L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 
        1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
        2L, 2L, 2L, 2L, 1L, 2L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 
        1L, 2L, 2L, 2L, 2L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 
        2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
        2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 1L, 2L, 1L, 2L, 2L, 
        2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 1L, 2L, 2L, 2L, 2L, 
        2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 
        2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 
        2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
        2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
        1L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 
        2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
        1L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
        2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
        2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 
        2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
        2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
        2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
        2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
        2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 
        2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 
        2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
        2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L), .Label = c("Irregular", 
        "Regular"), class = "factor"), Times = c(9L, 4L, 25L, 23L, 50L, 
        9L, 4L, 20L, 36L, 25L, 28L, 32L, 28L, 26L, 26L, 26L, 26L, 4L, 
        16L, 9L, 25L, 26L, 28L, 32L, 4L, 6L, 6L, 6L, 6L, 6L, 4L, 44L, 
        15L, 9L, 4L, 4L, 9L, 6L, 26L, 33L, 44L, 44L, 4L, 36L, 14L, 4L, 
        4L, 36L, 9L, 32L, 32L, 4L, 44L, 26L, 9L, 6L, 4L, 33L, 26L, 26L, 
        26L, 23L, 26L, 9L, 14L, 36L, 44L, 4L, 35L, 32L, 28L, 28L, 9L, 
        36L, 6L, 4L, 14L, 36L, 26L, 9L, 9L, 9L, 4L, 4L, 14L, 33L, 15L, 
        4L, 4L, 58L, 26L, 4L, 33L, 9L, 4L, 4L, 4L, 39L, 26L, 9L, 6L, 
        33L, 28L, 33L, 20L, 33L, 6L, 14L, 20L, 50L, 58L, 17L, 36L, 28L, 
        51L, 33L, 50L, 16L, 26L, 4L, 33L, 50L, 9L, 26L, 28L, 4L, 58L, 
        9L, 17L, 6L, 14L, 58L, 28L, 9L, 6L, 50L, 9L, 9L, 9L, 4L, 26L, 
        9L, 9L, 14L, 36L, 44L, 20L, 26L, 50L, 6L, 6L, 9L, 16L, 14L, 11L, 
        44L, 9L, 58L, 9L, 14L, 9L, 36L, 28L, 17L, 28L, 23L, 11L, 33L, 
        6L, 14L, 36L, 9L, 9L, 11L, 17L, 17L, 20L, 9L, 14L, 11L, 20L, 
        6L, 4L, 9L, 14L, 11L, 4L, 6L, 14L, 23L, 36L, 23L, 20L, 11L, 9L, 
        9L, 14L, 26L, 9L, 6L, 16L, 18L, 23L, 43L, 23L, 6L, 6L, 9L, 28L, 
        20L, 58L, 36L, 11L, 51L, 20L, 26L, 33L, 9L, 6L, 9L, 17L, 14L, 
        58L, 11L, 20L, 6L, 17L, 14L, 28L, 16L, 6L, 6L, 28L, 6L, 6L, 9L, 
        28L, 9L, 22L, 14L, 6L, 6L, 14L, 17L, 36L, 37L, 20L, 20L, 35L, 
        23L, 9L, 25L, 25L, 23L, 23L, 33L, 18L, 51L, 6L, 9L, 6L, 6L, 9L, 
        17L, 9L, 29L, 28L, 20L, 28L, 14L, 50L, 14L, 17L, 6L, 11L, 11L, 
        28L, 20L, 28L, 20L, 6L, 6L, 9L, 9L, 47L, 36L, 36L, 9L, 9L, 11L, 
        17L, 23L, 23L, 44L, 20L, 36L, 52L, 17L, 17L, 44L, 28L, 11L, 14L, 
        28L, 23L, 9L, 9L, 17L, 18L, 22L, 28L, 9L, 14L, 14L, 14L, 23L, 
        23L, 52L, 17L, 28L, 14L, 28L, 9L, 6L, 6L, 28L, 23L, 23L, 4L, 
        37L, 51L, 51L, 14L, 23L, 6L, 28L, 20L, 17L, 26L, 11L, 35L, 15L, 
        14L, 20L, 18L, 4L, 29L, 6L, 30L, 51L, 23L, 11L, 9L, 23L, 14L, 
        23L, 14L, 15L, 36L, 9L, 37L, 29L, 28L, 30L, 23L, 51L, 51L, 17L, 
        17L, 30L, 18L, 23L, 28L, 15L, 14L, 9L, 28L, 33L, 14L, 23L, 9L, 
        14L, 26L, 9L, 23L, 14L, 9L, 44L, 43L, 15L, 4L, 14L, 14L, 23L, 
        52L, 23L, 14L, 32L, 17L, 17L, 44L, 20L, 30L, 28L, 43L, 33L, 23L, 
        9L, 44L, 33L, 23L, 18L, 26L, 26L, 26L, 9L, 6L, 11L, 6L, 18L, 
        30L, 17L, 51L, 44L, 23L, 43L, 30L, 23L, 17L, 44L, 43L, 23L, 15L, 
        28L, 17L, 18L, 23L, 26L, 14L, 9L, 28L, 15L, 16L, 9L, 17L, 30L, 
        15L, 20L, 6L, 23L, 28L, 18L, 32L, 30L, 18L, 17L, 23L, 18L, 18L, 
        6L, 17L, 30L, 51L, 44L, 23L, 28L, 18L, 15L, 18L, 28L, 26L, 44L, 
        23L, 23L, 17L, 28L, 30L, 17L, 44L, 43L, 30L, 38L, 17L, 28L, 26L, 
        17L, 17L, 18L, 23L, 28L, 6L, 30L, 17L, 9L, 28L, 28L, 28L, 11L, 
        17L, 17L, 20L, 9L, 30L, 18L, 47L, 30L, 23L, 33L, 18L, 30L, 17L, 
        36L, 30L, 23L, 17L, 30L, 33L, 14L, 18L, 15L, 32L, 23L, 23L, 30L, 
        23L, 30L, 30L, 43L, 30L, 30L, 17L, 36L, 17L, 17L, 51L, 30L, 17L, 
        15L, 50L, 11L, 11L, 4L, 32L, 26L, 17L), Genre = structure(c(2L, 
        1L, 2L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 2L, 1L, 2L, 2L, 1L, 2L, 2L, 
        2L, 1L, 1L, 1L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 
        2L, 1L, 1L, 2L, 2L, 1L, 2L, 1L, 2L, 1L, 2L, 2L, 2L, 2L, 1L, 1L, 
        2L, 1L, 2L, 2L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 2L, 1L, 1L, 
        2L, 2L, 1L, 1L, 1L, 2L, 2L, 1L, 1L, 1L, 2L, 1L, 2L, 1L, 1L, 2L, 
        2L, 2L, 1L, 2L, 1L, 1L, 1L, 1L, 2L, 2L, 1L, 1L, 2L, 2L, 2L, 2L, 
        1L, 1L, 1L, 2L, 1L, 1L, 2L, 1L, 1L, 2L, 2L, 1L, 2L, 1L, 1L, 2L, 
        2L, 2L, 1L, 1L, 1L, 1L, 2L, 1L, 2L, 1L, 1L, 2L, 2L, 2L, 1L, 2L, 
        1L, 2L, 1L, 2L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 2L, 2L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 1L, 1L, 
        2L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 1L, 2L, 1L, 2L, 1L, 
        2L, 2L, 2L, 2L, 1L, 2L, 2L, 1L, 1L, 1L, 1L, 2L, 1L, 2L, 2L, 2L, 
        2L, 1L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 1L, 2L, 2L, 1L, 2L, 2L, 2L, 
        1L, 1L, 1L, 2L, 2L, 2L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 2L, 1L, 1L, 
        2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 1L, 
        1L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 2L, 2L, 2L, 1L, 1L, 2L, 1L, 1L, 
        2L, 2L, 1L, 1L, 2L, 2L, 2L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 
        1L, 1L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 1L, 1L, 2L, 1L, 2L, 1L, 1L, 
        1L, 2L, 2L, 2L, 1L, 1L, 1L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 2L, 2L, 1L, 2L, 1L, 1L, 1L, 2L, 
        2L, 1L, 2L, 1L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 1L, 2L, 
        2L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 
        1L, 2L, 2L, 1L, 2L, 1L, 1L, 1L, 2L, 1L, 1L, 1L, 1L, 2L, 1L, 2L, 
        2L, 2L, 2L, 2L, 1L, 2L, 1L, 1L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 1L, 
        1L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 1L, 2L, 1L, 
        2L, 1L, 2L, 1L, 2L, 2L, 2L, 1L, 1L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 
        2L, 1L, 1L, 1L, 2L, 1L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 2L, 2L, 
        1L, 1L, 1L, 2L, 1L, 2L, 1L, 2L, 1L, 1L, 2L, 1L, 1L, 2L, 1L, 2L, 
        2L, 1L, 2L, 1L, 1L, 2L, 2L, 1L, 1L, 1L, 2L, 1L, 2L, 2L, 1L, 2L, 
        1L, 2L, 1L, 2L, 1L, 1L, 1L, 2L, 2L, 2L, 1L, 1L, 1L, 2L, 1L, 1L, 
        1L, 2L, 1L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 1L, 2L, 2L, 1L, 1L, 
        2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 
        1L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 2L, 2L, 1L, 2L, 1L, 1L, 2L, 
        2L, 2L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 1L, 2L, 2L, 2L
        ), .Label = c("Female", "Male"), class = "factor"), Age = c(27L, 
        18L, 38L, 16L, 50L, 30L, 26L, 65L, 28L, 25L, 57L, 26L, 28L, 53L, 
        26L, 21L, 21L, 25L, 55L, 16L, 59L, 22L, 45L, 19L, 40L, 10L, 54L, 
        51L, 30L, 20L, 22L, 22L, 37L, 39L, 50L, 35L, 20L, 44L, 26L, 32L, 
        20L, 26L, 56L, 36L, 31L, 30L, 38L, 58L, 40L, 58L, 53L, 34L, 48L, 
        55L, 27L, 48L, 47L, 16L, 29L, 45L, 19L, 49L, 48L, 34L, 26L, 52L, 
        39L, 30L, 39L, 21L, 19L, 34L, 39L, 62L, 63L, 21L, 50L, 43L, 50L, 
        25L, 54L, 55L, 42L, 43L, 29L, 26L, 43L, 37L, 25L, 31L, 21L, 23L, 
        30L, 30L, 55L, 18L, 45L, 28L, 51L, 43L, 15L, 18L, 39L, 52L, 52L, 
        36L, 20L, 52L, 64L, 52L, 42L, 45L, 17L, 19L, 29L, 60L, 55L, 48L, 
        43L, 67L, 58L, 26L, 34L, 56L, 62L, 36L, 32L, 51L, 30L, 54L, 56L, 
        60L, 49L, 50L, 40L, 51L, 28L, 59L, 35L, 20L, 53L, 35L, 54L, 27L, 
        22L, 46L, 33L, 33L, 41L, 34L, 42L, 39L, 46L, 58L, 25L, 58L, 33L, 
        28L, 39L, 22L, 25L, 59L, 49L, 50L, 46L, 54L, 37L, 20L, 50L, 22L, 
        32L, 30L, 25L, 25L, 60L, 26L, 55L, 44L, 53L, 19L, 29L, 36L, 28L, 
        54L, 56L, 48L, 35L, 39L, 28L, 37L, 41L, 22L, 54L, 50L, 57L, 56L, 
        40L, 22L, 34L, 21L, 14L, 35L, 65L, 54L, 42L, 38L, 14L, 28L, 55L, 
        64L, 46L, 37L, 39L, 45L, 42L, 20L, 20L, 35L, 17L, 46L, 20L, 19L, 
        45L, 55L, 28L, 33L, 45L, 52L, 42L, 30L, 37L, 33L, 18L, 56L, 36L, 
        60L, 50L, 47L, 27L, 22L, 25L, 19L, 51L, 24L, 55L, 32L, 60L, 19L, 
        50L, 44L, 41L, 45L, 46L, 28L, 56L, 25L, 51L, 30L, 46L, 32L, 19L, 
        37L, 39L, 60L, 18L, 28L, 45L, 58L, 29L, 22L, 50L, 17L, 33L, 26L, 
        28L, 31L, 23L, 49L, 52L, 22L, 30L, 37L, 33L, 32L, 33L, 45L, 29L, 
        22L, 27L, 37L, 17L, 24L, 30L, 40L, 18L, 54L, 49L, 41L, 47L, 44L, 
        53L, 48L, 40L, 20L, 21L, 54L, 23L, 22L, 31L, 41L, 47L, 36L, 22L, 
        51L, 27L, 30L, 50L, 56L, 44L, 38L, 43L, 54L, 52L, 42L, 59L, 43L, 
        38L, 57L, 20L, 50L, 25L, 25L, 25L, 30L, 39L, 33L, 50L, 39L, 49L, 
        53L, 57L, 74L, 48L, 35L, 51L, 53L, 41L, 27L, 18L, 28L, 30L, 27L, 
        33L, 59L, 25L, 39L, 37L, 52L, 47L, 56L, 30L, 53L, 64L, 47L, 55L, 
        50L, 55L, 47L, 45L, 56L, 26L, 27L, 31L, 28L, 39L, 61L, 50L, 54L, 
        22L, 54L, 40L, 40L, 44L, 40L, 31L, 55L, 38L, 51L, 28L, 35L, 33L, 
        25L, 41L, 35L, 53L, 29L, 27L, 33L, 35L, 39L, 47L, 42L, 20L, 34L, 
        56L, 41L, 55L, 53L, 53L, 25L, 56L, 57L, 53L, 18L, 57L, 58L, 57L, 
        38L, 44L, 22L, 50L, 32L, 59L, 47L, 50L, 44L, 50L, 43L, 24L, 45L, 
        53L, 52L, 18L, 45L, 27L, 30L, 55L, 31L, 39L, 50L, 45L, 45L, 50L, 
        43L, 39L, 48L, 22L, 39L, 41L, 34L, 39L, 52L, 53L, 53L, 31L, 35L, 
        62L, 53L, 60L, 41L, 30L, 23L, 42L, 56L, 43L, 35L, 56L, 34L, 56L, 
        38L, 41L, 52L, 62L, 30L, 51L, 44L, 54L, 24L, 53L, 47L, 42L, 43L, 
        57L, 18L, 62L, 40L, 37L, 36L, 52L, 41L, 42L, 48L, 41L, 33L, 26L, 
        43L, 37L, 33L, 26L, 32L, 42L, 31L, 18L, 26L, 20L, 43L, 35L, 33L, 
        38L, 50L, 37L, 42L, 35L, 52L, 43L, 35L, 50L, 37L, 30L, 49L, 46L, 
        54L, 29L, 38L, 54L, 27L, 57L, 52L, 26L, 23L, 36L, 56L, 38L, 50L, 
        59L, 19L, 42L, 18L, 22L, 22L, 22L, 24L, 23L, 37L, 40L), No = c(1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 0L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 0L, 0L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        0L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        0L, 0L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 0L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 0L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 0L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 0L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 0L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 0L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 0L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 0L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
        1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L
        ), Yes = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 0L, 0L, 1L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 1L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 
        0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
        0L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 1L, 0L, 0L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
        0L, 1L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 
        0L, 0L, 0L, 0L)), .Names = c("Motif", "Type", "Times", 
        "Genre", "Age", "No", "Yes"), row.names = c(NA, -545L), class = "data.frame")

        attach(res)
        model1=glm(Yes ~ Genre + Times + Type + Age, family=binomial)
        summary(model1)

Edit 1 : Trial with effects package

    library('effects')
    attach(res)
    mod.result <- glm(Yes ~ Genre + Times + Type + Age, family=binomial)
    eff.result <-  allEffects(mod.result)
 model: Yes ~ Genre + Times + Type + Age

 Genre effect
Genre
     Female        Male 
0.008722749 0.033663636 

 Times effect
Times
          4          20          30          40          60 
0.009104951 0.016592264 0.024073564 0.034808715 0.071569287 

 Type effect
Type
 Irregular    Regular 
0.03155922 0.01651422 

 Age effect
Age
         10          30          40          60          70 
0.008163294 0.013830801 0.017978450 0.030252450 0.039129305 

Is this the correct way to calculate effect size? Effects seems very low while I get a significant p-value for Genre and Times. Why is that?

EDIT 2 : This is my last trial before losing hope on this

library(lmSupport)  
attach(res)
binom.mod2=  glm(Yes ~ Genre + Times + Type + Age, family=binomial)
anova(binom.mod2)
modelEffectSizes(binom.mod2) 
modelPower(pc=4, pa=5, N=540, alpha=0.05, peta2=0.04)
Results from Power Analysis

pEta2 = 0.040
pa =     5 
pc =     4 
alpha = 0.050 
N = 540.000 

What I understood is that I should take the lowest peta value from the ANOVA, that pc represent the number of predictors and pa the number of predictors together with the effect of interest.

source: http://r-video-tutorial.blogspot.fr/2017/07/power-analysis-and-sample-size.html

$\endgroup$
7
  • 1
    $\begingroup$ In the help files you could look up what modelPower is doing, and then you could improve this question by describing it more general (not in terms of a specific R function which not everyone may know) in terms of the underlying theory/model as described in those help files. $\endgroup$ Commented May 10, 2018 at 9:36
  • $\begingroup$ Also pois.mod2 is not well explained except that it hints at a GLM used as Poisson regression. $\endgroup$ Commented May 10, 2018 at 9:39
  • 2
    $\begingroup$ The 'effect size' (or in French with a reversed word order 'taille d'effet') is a very general term that can be expressed in many different ways. Currently you are referring to a few lines of code in R which is more asking about how that software works (which is off-topic here) and not like how the statistics works. An improvement of your question would be when you look into the R help files for the functions that you are using and write down the underlying statistics and rephrase the question in terms of that (and this step, reading the manual, may already answer your problem/question) $\endgroup$ Commented May 11, 2018 at 7:31
  • 1
    $\begingroup$ echoing @MartijnWeterings: we need more detail/context about what you mean by "effect size" in order to understand what you want ... $\endgroup$
    – Ben Bolker
    Commented May 14, 2018 at 11:42
  • 2
    $\begingroup$ I apologize if my question is not clear. Maybe on myself I misunderstood reviewer request : I'm asked to report participants number (n=545 here) , and why I choose this quantity and if I think that it is enough to make conclusions. Is there any measure for that except that I think that N is correct amount of survey and the greater N is the best is? I was suggested to size effect or real power of my approach (GLM) in this case. $\endgroup$
    – ranell
    Commented May 14, 2018 at 11:58

1 Answer 1

5
+50
$\begingroup$

Power analysis for F-test

The R functions calculate the power of a certain effect size for an F-test (in English it is is not 'size effect' like the French 'taille d'effet', but it is 'effect size' instead). The used method is explained with large detail in chapters 8 and 9 of Statistical power analysis for behavioral sciences by Jacob Cohen.

When the F-test is used for comparison of nested linear models than the effect size can be expressed by the ratio:

$$f = \frac{PV_S}{PV_E}$$

with $PV_S$ the model variance (source) and $PV_E$ the residual variance (error).

There are several alternative different ways to express this $f$ for instance:

  • in regression: by change in the correlation coefficient or $R^2$ value: $$f^2 = \frac{dR^2}{1-R_{\text{full model}}^2} $$
  • in anova: (comparison of means) by a term $\eta = \frac{\sigma_{means}}{\sigma_{means}+\sigma_{within}}$ for the proportion of the total variance made up by the variance of the means (partial $\eta$ is used in mixed designs when variances due to other interactions have been 'canceled') $$f^2 = \frac{\eta^2}{1-\eta^2}$$

  • in (oneway) anova: by relative spread of the means $d = \frac{m_{max}-m_{min}}{\sigma}$, which together with the way that the groups are spread allows to calculate $f$.

The power is calculated by using the non-central F-distribution.

  • under the null hypothesis the sampling distribution for the F-score would be described by the central-F-distribution,

  • under the alternative hypothesis, with the specified effect size (and model design), the sampling distribution of the F-score is described by the non-central-F-distribution (with non-centrality parameter $f^2v$ where $v$ is the degrees of freedom of the error term).

compare for instance with a more manual/backend calculation (both give power = 0.997)

> # using the modelPower function
> modelPower(pc=4, pa=5, N = 545, alpha=0.05, peta2=0.04)
Results from Power Analysis

pEta2 = 0.040
pa =     5 
pc =     4 
alpha = 0.050 

N = 545.000 
power = 0.997

> # using directly the F-distribution (central and non-central) 
> 1 - pf( qf(0.95, 1, 540) , 1, 540, ncp = 540*0.04/(1-0.04) )
[1] 0.9972399

(a small difference exist because the R function pwr.f2.test calculates the non-centrality parameter differently: not the F-test for regression models but the F-test for comparison of means. The wrapper function modelPower did not take this into account)

How is this done in R lmSupport?

The R function modelPower which is a wrapper for pwr.f2.test allows you to specify:

  • $f^2$ by the parameter f2
  • $\eta^2_{partial}$ by the parameter peta2
  • $dR^2$ and $R^2_{\text{full model}}$ by the parameters dR2 and R2

The parameters pc pa N (for the function modelPower) specifying the model are calculated into the degrees of freedom that are used in the F-test. These are the parameters u and v for the function pwr.f2.test. This has been mixed up in your question.

Related to your data

I don't think that testing your Bernouilli/binomial model is doing well with an F-test. Your data has certain small numbers, with very few observations outside the group of 'Regular'+'Home' and very few observations of 'Yes'. You can not really express a deviation as Gaussian distributed error terms for such a model, and also a power calculation for such test would be wrong.

You might be better of to compute the power manually by using simulations (it is the dumbest way, but maybe someone else has a smarter and more elegant method): Simulate thousands of outcomes with your covariates and a model with the desired effect size (difference in log odds) and see how often you fail to reject the null hypothesis.

Below is a table of your data that may help you to get an intuitive impression of your data (the small amount of observations for several cells) and that a different way of power analysis (different than power for the f-test) would be more suitable.

$$\tiny\begin{array}{lllllll}&\\ Gender \qquad & Times \qquad & Age \qquad & Type \qquad & Motif \qquad & Yes \qquad & No \qquad \\ Male & t<=14 & a<=39 & Regular & Home & 0 & 47 \\ Male & t<=14 & a>39 & Regular & Home & 3 & 33 \\ Male & t<=14 & a<=39 & Regular & Other & 1 & 1 \\ Male & t<=14 & a>39 & Regular & Other & 0 & 0 \\ Male & t<=14 & a<=39 & Irregular & Home & 0 & 3 \\ Male & t<=14 & a>39 & Irregular & Home & 0 & 4 \\ Male & t<=14 & a<=39 & Irregular & Other & 0 & 6 \\ Male & t<=14 & a>39 & Irregular & Other & 0 & 0 \\ \\ Male & 14<t<=26 & a<=39 & Regular & Home & 0 & 46 \\ Male & 14<t<=26 & a>39 & Regular & Home & 0 & 42 \\ Male & 14<t<=26 & a<=39 & Regular & Other & 1 & 1 \\ Male & 14<t<=26 & a>39 & Regular & Other & 0 & 0 \\ Male & 14<t<=26 & a<=39 & Irregular & Home & 0 & 3 \\ Male & 14<t<=26 & a>39 & Irregular & Home & 0 & 1 \\ Male & 14<t<=26 & a<=39 & Irregular & Other & 0 & 0 \\ Male & 14<t<=26 & a>39 & Irregular & Other & 0 & 2 \\ \\ Male & 26<t & a<=39 & Regular & Home & 1 & 35 \\ Male & 26<t & a>39 & Regular & Home & 2 & 41 \\ Male & 26<t & a<=39 & Regular & Other & 1 & 1 \\ Male & 26<t & a>39 & Regular & Other & 1 & 0 \\ Male & 26<t & a<=39 & Irregular & Home & 0 & 3 \\ Male & 26<t & a>39 & Irregular & Home & 1 & 1 \\ Male & 26<t & a<=39 & Irregular & Other & 0 & 1 \\ Male & 26<t & a>39 & Irregular & Other & 0 & 0 \\ \\ Female & t<=14 & a<=39 & Regular & Home & 0 & 48 \\ Female & t<=14 & a>39 & Regular & Home & 0 & 30 \\ Female & t<=14 & a<=39 & Regular & Other & 0 & 2 \\ Female & t<=14 & a>39 & Regular & Other & 0 & 0 \\ Female & t<=14 & a<=39 & Irregular & Home & 0 & 8 \\ Female & t<=14 & a>39 & Irregular & Home & 0 & 3 \\ Female & t<=14 & a<=39 & Irregular & Other & 0 & 1 \\ Female & t<=14 & a>39 & Irregular & Other & 0 & 3 \\ \\ Female & 14<t<=26 & a<=39 & Regular & Home & 0 & 33 \\ Female & 14<t<=26 & a>39 & Regular & Home & 1 & 40 \\ Female & 14<t<=26 & a<=39 & Regular & Other & 0 & 0 \\ Female & 14<t<=26 & a>39 & Regular & Other & 0 & 0 \\ Female & 14<t<=26 & a<=39 & Irregular & Home & 1 & 0 \\ Female & 14<t<=26 & a>39 & Irregular & Home & 0 & 3 \\ Female & 14<t<=26 & a<=39 & Irregular & Other & 0 & 2 \\ Female & 14<t<=26 & a>39 & Irregular & Other & 0 & 2 \\ \\ Female & 26<t & a<=39 & Regular & Home & 0 & 30 \\ Female & 26<t & a>39 & Regular & Home & 1 & 51 \\ Female & 26<t & a<=39 & Regular & Other & 0 & 0 \\ Female & 26<t & a>39 & Regular & Other & 0 & 0 \\ Female & 26<t & a<=39 & Irregular & Home & 0 & 0 \\ Female & 26<t & a>39 & Irregular & Home & 0 & 1 \\ Female & 26<t & a<=39 & Irregular & Other & 0 & 2 \\ Female & 26<t & a>39 & Irregular & Other & 0 & 1 \\ \\ \end{array}$$

a simpler table ignoring all the multiple levels and just looking at Regular vs Irregular:

$$\begin{array}\\ &yes&no&total\\ Regular & 12 & 481 & 493\\ Irregular & 2 & 50 & 52\\ Total & 14 & 531 & 545 \\ \end{array}$$

Giving probabilites for 'yes' as $p_{\text{R}} = 0.0243$ and $p_{\text{I}} = 0.0385$, for regular and irregular.

But these results (what one might consider as big enough difference/effect in probability or odds) are not significant. This is not due to a low number of $n_{total}=545$ but due to the small marginal group sizes of $n_{yes}=14$ and $n_{Irregular}=52$.

$\endgroup$
2
  • $\begingroup$ Thanks a lot for this extended response! just to be sure, PC (parameter of compact model = intercept + explanatory param) and PA (parameter of augmented model is always PC + 1 (Dependant variable )? $\endgroup$
    – ranell
    Commented May 16, 2018 at 19:58
  • 1
    $\begingroup$ You could have more than a difference 1. For instance when the added parameter has multiple levels (in which case it is multiple parameters in disguise). Also you could compare models that have other larger differences, e.g. simply with more than one augmented variables (although I do not know a practical purpose). $\endgroup$ Commented May 16, 2018 at 20:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.