sanon: Non-Parametric Covariable Adjustment for Stratified Rank...

Description Usage Arguments Details Value References Examples

View source: R/sanon.r

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
sanon(outcome, ...)

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

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

## 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

...

further arguments passed to or from other methods.

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.

group

numeric vector of observations of length n for treatment group. The reference group can be specified in ref.

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 matrix for weighted least squares estimation.

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

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.

Value

N

Sample size

Nna

tne number of subjects with missing values

nhik

Sample size in each strata, group, and response

nik

Sample size in each group and response

xi

(multivariate) Mann-Whitney estimate(s) that addresses the comparison between two randomized groups

g

the difference estimates between mean covariable

f

a vector consisting of xi and g

Vf

estimated covariance matrix of f

b

fully adjustmented estimators for all covariables and the strata

Vb

covariance matrix of b

se

standard error of b

Q

test statistics for b

p

p-value for b

outnames

outcome or response names

covarnames

covariable names

advarnames

variable names adjusting in the weighted least squares

bnames

variable names of adjusted in the weighted least squares

reslevels

levels for response variables

grouplevels

levels for the group variable

strtout

resulting (cross-classification) strata

strtlevels

resulting (cross-classification) strata levels

strtnames

resulting (cross-classification) strata names

matP

design matrix used in the weighted least squares

References

Kawaguchi A., Koch, G. G. (2015). sanon: An R Package for Stratified Analysis with Nonparametric Covariable Adjustment. Journal of Statistical Software, 67(9), 1-37. doi:10.18637/jss.v067.i09

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
##### Example 3.1 Randomized Clinical Trial of Chronic Pain #####
data(cpain)
out11 = sanon(response ~ grp(treat, ref="placebo") + strt(center) + strt(diagnosis), data=cpain)
out11
summary(out11)

# R objects are also available
attach(cpain)
out12 = sanon(outcome=response, group=treat, 
strt=cbind(center, diagnosis), ref="placebo")
out12
summary(out12)

##### Example 3.2 Randomized Clinical Trial of Respiratory Disorder #####
data(resp)
out21 = sanon(cbind(baseline, visit1, visit2, visit3, visit4) 
~ grp(treatment, ref="P") + strt(center) + strt(sex) + covar(age), data=resp)
out21
summary(out21)

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

sanon documentation built on July 8, 2020, 6:54 p.m.