Initialize repository
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
Exercise: Analysis and power simulation for baseline/follow-up
|
||||
measurements
|
||||
================
|
||||
|
||||
## Shoulder pain and acupuncture
|
||||
|
||||
1. Reanalyze the original data
|
||||
- Re-estimate the ANCOVA model for the Kleinhenz et al. (1999)
|
||||
[data](../data/kleinhenz.txt)
|
||||
2. Run a power simulation for a replication study
|
||||
1. Draw plausible pre-CMS values
|
||||
2. Specify the minimum relevant average treatment effect (ATE)
|
||||
3. Set the remaining parameters to plausible values
|
||||
4. What is the sample size required for the test to detect the
|
||||
effect with 80% power?
|
||||
5. How robust is the power simulation when you repeat it with a new
|
||||
set of pre-CMS values? Try it!
|
||||
6. Recover the parameters of the ANCOVA model
|
||||
|
||||
### References
|
||||
|
||||
<div id="refs" class="references csl-bib-body hanging-indent">
|
||||
|
||||
<div id="ref-KleinhenzStreitberger99" class="csl-entry">
|
||||
|
||||
Kleinhenz, J., K. Streitberger, J. Windeler, A. Güßbacher, G. Mavridis,
|
||||
and E. Martin. 1999. “Randomised Clinical Trial Comparing the Effects of
|
||||
Acupuncture and a Newly Designed Placebo Needle in Rotator Cuff
|
||||
Tendinitis.” *Pain* 83 (2): 235–41.
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,45 @@
|
||||
Exercise: Analysis and power simulation for baseline/follow-up
|
||||
measurements
|
||||
================
|
||||
|
||||
## MASS anorexia data
|
||||
|
||||
1. Analyze the original data:
|
||||
- In R, see ?MASS::anorexia
|
||||
- Data preparation
|
||||
|
||||
``` r
|
||||
data(anorexia, package = "MASS")
|
||||
dat <-
|
||||
subset(anorexia, Treat != "Cont") |> # exclude control group
|
||||
droplevels() # drop empty factor levels
|
||||
lbs2kg <- 0.4535924
|
||||
dat$Prewt <- lbs2kg * dat$Prewt # to kg
|
||||
dat$Postwt <- lbs2kg * dat$Postwt
|
||||
lattice::xyplot(Postwt ~ Prewt, dat, groups = Treat,
|
||||
type = c("g", "r", "p"), auto.key = TRUE)
|
||||
```
|
||||
|
||||
- Estimate the average treatment effect (ATE) for FT relative to CBT.
|
||||
- What is the 95% CI for the ATE?
|
||||
- What are the pre- and post-weight means for the two groups?
|
||||
- What are the baseline-adjusted means for the two groups?
|
||||
|
||||
2. Run a power simulation for a replication study:
|
||||
- Draw plausible pre-weights.
|
||||
- Specify the minimum relevant effect.
|
||||
- Set the remaining parameters to plausible values.
|
||||
- What is the sample size required for the test to detect the effect
|
||||
with 80% power?
|
||||
- How robust is the power simulation when you repeat it with a new
|
||||
set of pre-weights? Try it!
|
||||
- Recover the parameters of the ANCOVA model.
|
||||
3. Create a renderable R script or an R Markdown file that includes
|
||||
- a header with title, author, date
|
||||
- at least one section head line
|
||||
- the homework questions and your answers
|
||||
- the R code, output, and plots (if any)
|
||||
|
||||
Render the R or Rmd file to HTML.
|
||||
|
||||
### Reference
|
||||
Binary file not shown.
Reference in New Issue
Block a user