| ProcessData {npclust} | R Documentation |
Process data set.
Description
Sample size and cluster size calculation for the imported data set.
Usage
ProcessData(data, tx, period, subject, resp, indicator=NULL)
Arguments
data |
a data frame in the long format. |
tx |
treatment variable. |
period |
time indicator variable. |
subject |
subject or cluster ID |
resp |
response variable to be analyzed. |
indicator |
an optional vector of characters indicating the order of pre and post intervention period; must match the levels of period argument if specified; if not specified, the pre and post intervention period will be ordered in the alphabet order by default |
Value
a list containing the following components:
trtnumber of treatments
nccomplete cluster sample size within each treatment group
n1incomplete cluster sample size pre intervention within each treatment group
n2incomplete cluster sample size post intervention within each treatment group
m1ccomplete cluster sizes pre-intervention within each treatment group
m2ccomplete cluster size post-intervention within each treatment group
m1iincomplete cluster sizes pre-intervention within each treatment group
m2iincomplete cluster sizes post-intervention within each treatment group
x1ccomplete data pre-intervention within each treatment group
x2ccomplete data post-intervention within each treatment group
x1iincomplete data pre-intervention within each treatment group
x2iincomplete data post-intervention within each treatment group
Examples
ARTIS_result <- ProcessData(ARTIS, tx, intervention, homeid, symptoms_pqol,
c("0","1"))
names(ARTIS_result)
skin_result <- ProcessData(skin, tx, intervention, subject, score,
c("control","treatment"))
skin_result$nc
skin_result$n1
skin_result$n2