Description Usage Arguments Details Value Author(s) See Also Examples
Randomly assign each element into treatment group A or B.
1 | assign.grp(matches, seed = 68, ...)
|
matches |
A data.frame or nonbimatch object. Contains information on how to match the covariate data set. |
seed |
Seed provided for random-number generation. Default value of 68. |
... |
Additional arguments, not used at the moment. |
This function takes the matched pairs generated by nonbimatch and randomly assigns each element to a group.
original data.frame with treatment group column
Cole Beck
1 2 3 4 5 6 | df <- data.frame(id=LETTERS[1:25], val1=rnorm(25), val2=rnorm(25))
df.dist <- gendistance(df, idcol=1)
df.mdm <- distancematrix(df.dist)
df.match <- nonbimatch(df.mdm)
assign.grp(df.match)
assign.grp(df.match$matches)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.