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,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,
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, 1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 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, 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,
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
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$