# Power test binominal GLM model

3 messages
Open this post in threaded view
|

## Power test binominal GLM model

 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]] ______________________________________________ [hidden email] mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|

## Re: Power test binominal GLM model

 > On Oct 10, 2017, at 9:09 AM, davide cortellino <[hidden email]> wrote: > > 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? What's the point? The time to do power tests is before the experiment is performed. There's really no value in doing post hoc power testing, and this is especially true when you have highly significant results. > Bests > > [[alternative HTML version deleted]] > > ______________________________________________ > [hidden email] mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code. David Winsemius Alameda, CA, USA 'Any technology distinguishable from magic is insufficiently advanced.'   -Gehm's Corollary to Clarke's Third Law ______________________________________________ [hidden email] mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|

## Re: Power test binominal GLM model

 In reply to this post by davide cortellino You may find the answers to this question on Cross Validated (along with the discussion) to be useful: https://stats.stackexchange.com/questions/35940/simulation-of-logistic-regression-power-analysis-designed-experimentsOn Tue, Oct 10, 2017 at 10:09 AM, davide cortellino <[hidden email]> wrote: > 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]] > > ______________________________________________ > [hidden email] mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code. -- Gregory (Greg) L. Snow Ph.D. [hidden email] ______________________________________________ [hidden email] mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.