WT: Williams Transformation

Description Usage Arguments Value References Examples

View source: R/WT.R

Description

WT returns a matrix after implementing the Williams transformation

Usage

1
WT(X, baseline = 1)

Arguments

X

A matrix object. In general, X stands for the design matrix, e.g. an LHD or a GLP design.

baseline

A integer, which defines the minimum value for each column of the matrix. The default is set to be 1.

Value

If all inputs are logical, then the output will be a matrix whose sizes are the same as input matrix.

References

Williams, E. J. (1949) Experimental designs balanced for the estimation of residual effects of treatments. Australian Journal of Chemistry, 2, 149-168.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#create a toy LHD with 5 rows and 3 columns
toy=rLHD(n=5,k=3);toy
toy2=toy-1;toy2  #make elements of "toy" become 0,1,2,3,4

#Implementing Williams transformation on both toy and toy2:
#The result shows that "WT" function is able to detect the
#elements of input matrix and make adjustments.
WT(toy)
WT(toy2)

#Change the baseline
WT(toy,baseline=5)
WT(toy,baseline=10)

LHD documentation built on Aug. 1, 2021, 1:06 a.m.