[R] Power test binominal GLM model
davide cortellino
davidecortellino at gmail.com
Tue Oct 10 18:09:12 CEST 2017
Dear All
I have run the following GLM binominal model on a dataset composed by the
following variables:
TRAN_DURING_CAMP_FLG enviados bono_recibido
0 1 benchmark
0 1 benchmark
0 1 benchmark
0 1 benchmark
0 1 benchmark
0 1 benchmark
- tran_during_flag= redemption yes/no (1/0)
- enviados= counter variables, all 1's
- bono_recibido= benchmark(control group) or test groups (two type of
test groups)
The model used has been
glm(TRAN_DURING_CAMP_FLG~bono_recibido,exp2,family="binomial")
Estimate Std. Error z value
Pr(>|z|)(Intercept) -1.4924117 0.01372190 -108.761315
0.000000e+00
bono_recibidoBONO3EUROS -0.8727739 0.09931119 -8.788274 1.518758e-18
bono_recibidoBONO6EUROS 0.1069435 0.02043840 5.232480 1.672507e-07
The scope for this model was to test if there was significative difference
in the redemption rate between control group and test groups. Now, applying
the post hoc test:
> Treat.comp<-glht(mod.binposthoc,mcp(bono_recibido='Tukey'))> summary(Treat.comp) # el modelo se encuentra en log odds aqui
Simultaneous Tests for General Linear Hypotheses
Multiple Comparisons of Means: Tukey Contrasts
Fit: glm(formula = TRAN_DURING_CAMP_FLG ~ bono_recibido, family = "binomial",
data = exp2)
Linear Hypotheses:
Estimate Std. Error z value Pr(>|z|)
BONO3EUROS - benchmark == 0 -0.87277 0.09931 -8.788 < 1e-09 ***
BONO6EUROS - benchmark == 0 0.10694 0.02044 5.232 3.34e-07 ***
BONO6EUROS - BONO3EUROS == 0 0.97972 0.09952 9.845 < 1e-09
***---Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’
1(Adjusted p values reported -- single-step method)
It confirm that the differences are significatively differents, however, I
would check the power of the model in assessing these differences. I have
checked several time both on cross validates and on the web but it seems
there is no pre-made function which enable the user to compute the power of
glm models. Is it the case? Does anyone know of available packages or
methodologies to achive a power test in a glm binominal model?
Bests
[[alternative HTML version deleted]]
More information about the R-help
mailing list