wp.effect.MRT2arm: Effect size calculatator based on raw data for Multisite...

Description Usage Arguments Value References Examples

View source: R/webpower.R

Description

This function is for effect size calculation for Multisite randomized trials (MRT) with 2 arms based on empirical data. MRTs are a type of multilevel design for the situation when the entire cluster is randomly assigned to either a treatment arm or a contral arm (Liu, 2013). The data from MRT can be analyzed in a two-level hierachical linear model, where the indicator variable for treatment assignment is included in first level. If a study contains multiple treatments, then mutiple indicators will be used. Three types of tests are considered in the function: (1) The "main" type tests treatment main effect; (2) The "site" type tests the variance of cluster/site means; and (3) The "variance" type tests variance of treatment effects. Details leading to power calculation can be found in Raudenbush (1997) and Liu (2013). This function is used to calculate the effect size with a input data set.

Usage

1

Arguments

file

The input data set. The first column of the data is the ID variable, the second column represents cluster, the third column is the outcome variable, and the fourth column is the condition variable (0 for control, 1 for condition).

Value

A list including effect size f.

References

Liu, X. S. (2013). Statistical power analysis for the social and behavioral sciences: basic and advanced techniques. Routledge.

Raudenbush, S. W. (1997). Statistical analysis and optimal design for cluster randomized trials. Psychological Methods, 2(2), 173.

Examples

1
2
3
4
5
6
7
8
9
#To calculate the effect size based on empirical data
wp.effect.MRT2arm (MRT2)
#  Effect size for MRT2arm
#  
#  f
#  -0.2986755
#  
#  NOTE: f is the effect size.
#  URL: http://psychstat.org/mrt2arm

WebPower documentation built on May 1, 2019, 8:19 p.m.