Tony cogswell
2006-Nov-20 16:28 UTC
[R] Is there any R package to calcualte "Power" for ANCOVA
Dear list members: I searched the R-help for packages to calculate power for an ANCOVA problem I have. I have found power.t.test, power.anova.test. But it seems that I can not found one with ANCOVA. I have two datasetsets with variables: univariate response(one data with continous response and one with 0 and 1), treatment(two levels), covariates(x1,x2,x3). I would appreciate your help. Tony [[alternative HTML version deleted]]
Greg Snow
2006-Nov-20 22:49 UTC
[R] Is there any R package to calcualte "Power" for ANCOVA
I don't know of any existing packages or functions to compute power for general ancova, but here are 2 approaches using existing tools: 1. If the main focus is on the anova/t-test portion and the covariates are only there to adjust for potential differences in the groups then just use power.anova.test or power.t.test and add an additional subject/unit for each degree of freedom to be used by the covariates. 2. Write a function that simulates data like you expect to see and does the analysis of interest. Run the function a bunch of times to see how often it rejects. Repeat for other sample sizes. Number 2 is how I do most my power calculations these days. Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at intermountainmail.org (801) 408-8111 -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Tony cogswell Sent: Monday, November 20, 2006 9:28 AM To: r-help at stat.math.ethz.ch Subject: [R] Is there any R package to calcualte "Power" for ANCOVA Dear list members: I searched the R-help for packages to calculate power for an ANCOVA problem I have. I have found power.t.test, power.anova.test. But it seems that I can not found one with ANCOVA. I have two datasetsets with variables: univariate response(one data with continous response and one with 0 and 1), treatment(two levels), covariates(x1,x2,x3). I would appreciate your help. Tony [[alternative HTML version deleted]] ______________________________________________ R-help at stat.math.ethz.ch mailing list 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.