Learn R Programming

sanon (version 1.2)

sanon: Non-Parametric Covariable Adjustment for Stratified Rank Measures of Association

Description

This is a function for computing a stratified multivariate Mann-Whitney estimator that addresses the comparison between two randomized groups for a strictly ordinal response variable. Response variables may have some missing completely at random (MCAR) values for some patients. Non-parametric covariable adjustment is considered through the difference estimates between mean covariable and the weighted least squares method. Although such estimators can be computed directly as weighted linear combinations of within-stratum Mann-Whitney estimators, consistent estimation of their covariance matrix is done using methods for multivariate U-statistics.

Usage

sanon(outcome, ...)

  ## S3 method for class 'default':
sanon(outcome, group, strt = NULL,
    covar = NULL, catecovar = NULL, ref = NULL,
    covref = NULL, P = NULL, res.na.action = "default",
    ...)

  ## S3 method for class 'formula':
sanon(formula, data = list(),
    ref = NULL, ...)

  ## S3 method for class 'sanon':
print(x, ...)

Arguments

outcome
vector of observations of length n, or a matrix with n rows for the response (or outcome) variables
group
numeric vector of observations of length n for treatment group. The reference group can be specified in ref.
formula
a formula object, with the response on the left of a ~ operator, and the terms on the right.
data
a data.frame in which to interpret the variables named in the formula.
strt
numeric or factor vector of observations of length n, or a matrix with n rows for strata.
covar
numeric or factor vector of observations of length n, or a matrix with n rows for covariable.
catecovar
numeric or factor vector of observations of length n, or a matrix with n rows for categorical covariable.
ref
character for the reference group for treatment group in group.
covref
character vector for the reference group for categorical covariables in catecovar.
P
a (only) matrix for weighted least square estimator.
res.na.action
character for setting NA actions. "default", "LOCF1", "LOCF2", "replace", and "remove" are available. default is "default". see the details.
x
an object of class "sanon", usually, a result of a call to sanon
...
further arguments passed to or from other methods.

Value

  • NSample size
  • Nnatne number of subjects with missing values
  • nhikSample size in each strata, group, and response
  • nikSample size in each group and response
  • xi(multivariate) Mann-Whitney estimate(s) that addresses the comparison between two randomized groups
  • gthe difference estimates between mean covariable
  • fa vector consisting of xi and g
  • Vfestimated covariance matrix of f
  • bfully adjustmented estimators for all covariables and the strata
  • Vbcovariance matrix of b
  • sestandard error of b
  • Qtest statistics for b
  • pp-value for b
  • outnamesoutcome or response names
  • covarnamescovariable names
  • advarnamesvariable names adjusting in the weighted least squares
  • bnamesvariable names of adjusted in the weighted least squares
  • reslevelslevels for response variables
  • grouplevelslevels for the group variable
  • strtoutresulting (cross-classification) strata
  • strtlevelsresulting (cross-classification) strata levels
  • strtnamesresulting (cross-classification) strata names
  • matPdesign matrix used in the weighted least squares

Details

sanon has two specifications for the input, variable and formula based. In the variable based input, one can specify R objects to outcome, group, and strata variables, and covariable. In the formula based input, the formula consists of variable names in a data.frame. The strata and group variables, and covariable are recognized by functions strt, grp, covar, and catecovar. outcome can be contained missing values, which should be coded by NA. Five options for the management of missing values can be specifed in the argument res.na.action; "default" = the method in Kawaguchi et al. (2011), "LOCF1" and "LOCF2" = last observation carried forward with respect to kernels of U-statistics and observed velues, repsectively, "replace" = missing values are managed as tied with all other values in the same stratum, and "remove" = the complete cases analaysis. For res.na.action = "LOCF1" or "LOCF2", the order in the outcome is considered as the time order in imputing. if the baseline measurement is missing, then the corresponding subject is removed. outcome can be also multiple (repeatly measured). If more than two strata are specified, these are taking a cross-classification. The group variable can be specifies its reference group in the argument ref in the sanon or in the function grp.

References

Kawaguchi, A., Koch, G. G., Wang, X. (2011): Stratified Multivariate Mann-Whitney Estimators for the Comparison of Two Treatments with Randomization Based Covariance Adjustment. Statistics in Biopharmaceutical Research, Vol. 3, No. 2, 217-231.

Examples

Run this code
##### Example 3.1 Randomized Clinical Trial of Chronic Pain #####
data(cpain)
out11 = sanon(outcome=cpain[,"response"], group=cpain[,"treat"],
strt=cpain[,c("center", "diagnosis")], ref="placebo")
out11
summary(out11)

# formula is also available
out12 = sanon(response ~ grp(treat, ref="placebo") + strt(center) + strt(diagnosis), data=cpain)
out12
summary(out12)

##### Example 3.2 Randomized Clinical Trial of Respiratory Disorder #####
data(resp)
out21 = sanon(outcome=resp[,c("baseline", "visit1", "visit2", "visit3", "visit4")],
group=resp[,"treatment"], strt=resp[,c("center", "sex")], covar = resp[,"age"], ref="P")

out21
summary(out21)

# formula is also available
out22 = sanon(cbind(baseline, visit1, visit2, visit3, visit4)
~ grp(treatment, ref="P") + strt(center) + strt(sex) + covar(age), data=resp)
out22
summary(out22)

# the matrix P can be specified
P = rbind(rep(0, 4), diag(4), rep(0, 4))
out23 = sanon(cbind(baseline, visit1, visit2, visit3, visit4)
~ grp(treatment, ref="P") + strt(center) + strt(sex) + covar(age), data=resp, P=P)
out22
summary(out23)

Run the code above in your browser using DataLab