freq.less {Trendtwosub} | R Documentation |
List of functions freq.less function
Description
This function finds the sum of counts that the x-sample observations is greater than or less than the ones from the y-sample.
Usage
freq.less(x, y)
Arguments
x , y |
x and y are numerical vectors of different subsamples. The length of the two vectors can vary. |
Details
When there is a tie between any pair of observations, 0.5 is added to the count. Missing value is allowed. Missing value is only added to the calculation when it is compared with another missing value from the other subsample.
Value
Two values are returned: less.count and more.count. The first one is the total count that the observations in x-sample is less than the ones from the y-sample, and the second output is the total count that the observations in x-sample is more than the ones from the y-sample. When there is a tie, 0.5 is added to the count, instead of 1 or 0.
Examples
freq.less(x=c(1,2,4,9,0,0,NA),y=c(1,4,9,NA))