correxp | R Documentation |
This function calcualtes standardized mean difference in variable(s) in a matched dataset.
correxp( data, bexp, cexp, exp.status = 1, varinames = NULL, weightname = NULL, method = "Pearson" )
data |
a dataset object. |
bexp |
a character string indicating the name of the binary exposure. Use apostrophe like "VariableName" |
cexp |
a character string indicating the name of the continuous exposure. Use apostrophe like "VariableName" |
exp.status |
a numeric vector indicating the value indicating exposed units. Defalut=1 |
varinames |
a vector of variable names for which you wish to calculate standardized mean difference. List variable names as a vector like c("VariableA","VariableB") |
weightname |
the name of the weight variable. This weight is calculated by cgps.match. See cgps.match function. If NULL, weight is not given (i.e., all observations are equally weighted) |
method |
a character string indicating which correlation coefficient is to be computed. These include "Pearson" (default), "Spearman", "Polychoric", or "Polyserial". For tetrachoric use "Polychoric" and for biserial use "Polyserial". This relies on wCorr::weightedCorr |
correxp(test.dat,"exposure","exp_cons",exp.status=1,varinames=c("X1","X2","X3","U"),weightname="weight",method="Pearson") correxp()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.