Computes uscores or the ranks of uscores of censored data in the indicator format. Multiple DLs allowed.

uscores(dat.frame, paired = TRUE, rnk = TRUE)

Arguments

dat.frame

A data frame. Default format is paired = TRUE, where for 3 chemical parameters the input format is C1 I1 C2 I2 C3 I3, a concentration column followed by its corresponding indicator column.

paired

When paired = FALSE, the input format is C1 C2 C3 I1 I2 I3 where the C columns contain concentrations or a detection limit, and the I columns are their associated indicators, in the same order as the concentration columns.

rnk

A logical TRUE/FALSE variable on whether to compute the multivariate pattern on the uscores, or the ranks of the uscores. Default is rnk=TRUE, use the ranks. rnk = FALSE returns the uscores.

Value

A matrix of uscores or ranks of uscores, one column for each chemical parameter. If there is only one chemical parameter a vector of uscores or ranks of uscores is returned.

Examples

data(PbHeron)

uscores(PbHeron[,4:15])
#>       usc.Liver usc.Bone usc.Brain usc.Feather usc.Blood usc.Kidney
#>  [1,]        20      7.0        11         3.0        10          5
#>  [2,]        13      1.5        15         1.5        10          4
#>  [3,]         4      1.5        20        15.0        10          2
#>  [4,]        10      3.0         7         7.0        10          6
#>  [5,]         4      4.0         2        11.0        10          8
#>  [6,]         8     10.0         5         5.0        19          3
#>  [7,]         7      5.0         2         4.0        10          1
#>  [8,]        14     14.0        12        10.0        10         15
#>  [9,]        21      8.0        26         1.5        10          9
#> [10,]        12     17.0        23        16.0        22         13
#> [11,]        18      9.0        18         6.0        10          7
#> [12,]         4      6.0         9        13.0        10         10
#> [13,]         4     13.0        10         8.0        10         11
#> [14,]         4     12.0         4         9.0        10         12
#> [15,]        24     24.0        25        25.0        24         25
#> [16,]        26     23.0        27        20.0        25         26
#> [17,]         1     11.0         2        17.0        10         18
#> [18,]        15     18.0        17        26.0        20         23
#> [19,]        11     16.0         8        14.0         1         14
#> [20,]        25     26.0        16        22.0        27         24
#> [21,]        23     21.0        21        23.0        23         21
#> [22,]        19     20.0        19        19.0        18         17
#> [23,]        16     22.0        14        18.0        10         19
#> [24,]        17     19.0        13        21.0        21         20
#> [25,]        22     25.0        24        24.0        10         22
#> [26,]        27     27.0        22        27.0        26         27
#> [27,]         9     15.0         6        12.0         2         16