Munjal Patel
2016-Jun-07 16:08 UTC
[R] Power Calculation: Binomial Proportions (2 sided exact test for equivalence)
Dear R-Sig-teaching users, I am an intermediate level R user. I am performing the power calculations for the Binomial proportions (2 sided). I want to find the Power using the Exact test for the Equivalence of Binomial proportions. I do have the SAS code which is generating the Power for me but i am unable to find the Similar code in R. I need help for finding the similar computation in R. My SAS code. proc power; onesamplefreq test = equiv_exact alpha = 0.05 proportion = 0.30 lower = 0.2 upper = 0.4 ntotal = 500 power = .; run; Can somebody helkp me by providing the R code for the similar calculation ? Thank you. MJ [[alternative HTML version deleted]]
Leonardo Ferreira Fontenelle
2016-Jun-07 18:44 UTC
[R] Power Calculation: Binomial Proportions (2 sided exact test for equivalence)
Em Ter 7 jun. 2016, ?s 13:08, Munjal Patel escreveu:> Dear R-Sig-teaching users, > I am an intermediate level R user.You posted both emails to the same mailing list. Please remember that "cross-posting is considered to be impolite" and that "you should configure your e-mail software in such a way as to send only plain text": https://www.r-project.org/mail.html Best regards, Leonardo Ferreira Fontenelle, MD, MPH PhD candidate, Federal University of Pelotas Professor of Medicine, Vila Velha University Legislative consultant, Municipal Chamber of Vit?ria
BONACHE Adrien
2016-Jun-08 06:54 UTC
[R] Power Calculation: Binomial Proportions (2 sided exact test for equivalence)
Dear Munjal, You should use the pwr package with the following code :library(pwr) # lower pwr.2p.test(h =ES.h(0.3, 0.2), n = 500, sig.level = 0.05, power = NULL, alternative = c("two.sided"))#upperpwr.2p.test(h =ES.h(0.3, 0.4), n = 500, sig.level = 0.05, power = NULL, alternative = c("two.sided")) Maybe you could use G*power :Lower case 1-beta = 0.9557076Upper one 1-beta= 0.9134817 Hope this help, Adrien Bonache. De?: Munjal Patel <munjalpatel85 at gmail.com> ??: r-help at r-project.org Envoy? le : Mardi 7 juin 2016 18h08 Objet?: [R] Power Calculation: Binomial Proportions (2 sided exact test for equivalence) Dear R-Sig-teaching users, I am an intermediate level R user. I am performing the power calculations for the Binomial proportions (2 sided). I want to find the Power using the Exact test for the Equivalence of Binomial proportions. I do have the SAS code which is generating the Power for me but i am unable to find the Similar code in R. I need help for finding the similar computation in R. My SAS code. proc power; onesamplefreq test = equiv_exact alpha = 0.05 proportion = 0.30 lower = 0.2 upper = 0.4 ntotal = 500 power = .; run; Can somebody helkp me by providing the R code for the similar calculation ? Thank you. MJ ??? [[alternative HTML version deleted]] ______________________________________________ R-help at r-project.org 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. [[alternative HTML version deleted]]