Description Usage Arguments Details Value Functions Examples
Get the mean and SD of a covariate
1 2 3 | mk_cov_rv(X, cName, across, by)
mk_cov_rv_pow(X, cName, across, by, pow = 2)
|
X |
data.table |
cName |
name of covariate |
across |
RV is computed across this dimension |
by |
RV is computed separately for each of these dimensions |
pow |
Raise to this power. Default is 2. |
Adds columns for the covarate, it's power, and both their sd's. Columns for SD's are named by appending "_sd", column for power is named by appending the numeric value of pow
.
NULL is retured, but the data.table is modified, with appropriate columns. Original covariate column will be modified.
mk_cov_rv_pow
: Get the mean and SD of a covariate, and the same for the covariate^pow
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.