analysis_functions | R Documentation |
These minimal methods test for cross-site variation in a multi-site randomized trial using multilevel models. They assume a passed dataframe with specifically named columns.
In particular, Yobs is the outcome column, Z is the treatment column, W is a site-level covariate column, and sid is the site ID column (categorical).
analysis_idio(df)
analysis_combination(df)
analysis_systematic(df)
analysis_systematic_RTx(df)
df |
Dataframe to analyze. Columns of |
P-value from the test.
analysis_idio()
: The idiosyncratic version tests for cross site variation using a likelihood
ratio test vs. a model with no random slope (but random intercept). This is
the RIRC version of such a test.
analysis_combination()
: This is a combination test: it uses a liklihood ratio test on a
model with both systematic and idiosyncratic variation (i.e., it
has an interaction of the covariate and outcome, and also
includes a random effect for treatment), comparing to a model
which has neither.
analysis_systematic()
: Test for cross site variation by testing for a covariate
predictive of variation. This version does not allow for random
tx variation (random slope).
analysis_systematic_RTx()
: Systematic test with the random idiosyncratic variation. This
tests for systematic variation, ignoring any explicitly modeled
random (idiosyncratic) treatment variation.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.