hollow: If TRUE, uses hollow circles on the plot to indicate data not fitting the model.
xlab: The label for the x-axis.
ylab: The label for the y-axis.
trend: "postive" if the trend of y vs. x is generally positive. "negative" if negative.
clx: Indicates which of the listed critical x values should be chosen as the critical x value for the final model.
cly: Indicates which of the listed critical y values should be chosen as the critical y value for the final model.
xthreshold: Indicates the proportion of potential critical x values to display in the output. A value of 1 would display all of them.
ythreshold: Indicates the proportion of potential critical y values to display in the output. A value of 1 would display all of them.
progress: If TRUE, prints an indicator of progress as for loops progress.
verbose: If FALSE, suppresses printed output of tables.
listout: If TRUE, outputs a list of data frames instead of a a single data frame. This allows a data frame of critical values and associated statistics to be extracted, for example if one would want to sort by Cramer's V.
Returns
A data frame of statistics from the analysis: number of observations, critical level for x, sum of squares, critical value for y, the number of observations in each of the quadrants (I, II, III, IV), the number of observations that conform with the model, the proportion of observations that conform with the model, the number of observations that do not conform to the model, the proportion of observations that do not conform to the model, a p-value for the Fisher exact test for the data divided into the groups indicated by the model, and Cramer's V for the data divided into the groups indicated by the model.
Output also includes printed lists of critical values, explanation of the values in the data frame, and plots: y vs. x; sum of squares vs. critical x value; the number of observations that do not conform to the model vs. critical y value; and y vs. x with the critical values shown as lines on the plot, and the quadrants labeled.
Details
Cate-Nelson analysis divides bivariate data into two groups. For data with a positive trend, one group has a large x value associated with a large y value, and the other group has a small x value associated with a small y value. For a negative trend, a small x is associated with a large y, and so on.
The analysis is useful for bivariate data which don't conform well to linear, curvilinear, or plateau models.
This function will fail if either of the largest two or smallest two x values are identical.
Note
The method in this function follows Cate, R. B., & Nelson, L.A. (1971). A simple statistical procedure forpartitioning soil test correlation data into two classes. Soil ScienceSociety of America Proceedings 35, 658-660.
An earlier version of this function was published in Mangiafico, S.S. 2013. Cate-Nelson Analysis for Bivariate Data UsingR-project. J.of Extension 51:5, 5TOT1.
Examples
data(Nurseries)cateNelson(x = Nurseries$Size, y = Nurseries$Proportion, plotit =TRUE, hollow =TRUE, xlab ="Nursery size in hectares", ylab ="Proportion of good practices adopted", trend ="positive", clx =1, xthreshold =0.10, ythreshold =0.15)
Cate, R. B., & Nelson, L.A. (1971). A simple statistical procedure for partitioning soil test correlation data into two classes. Soil Science Society of America Proceedings 35, 658–660.