cateNelson | R Documentation |
Produces critical-x and critical-y values for bivariate data according to a Cate-Nelson analysis.
cateNelson(
x,
y,
plotit = TRUE,
hollow = TRUE,
xlab = "X",
ylab = "Y",
trend = "positive",
clx = 1,
cly = 1,
xthreshold = 0.1,
ythreshold = 0.1,
progress = TRUE,
verbose = TRUE,
listout = FALSE
)
x |
A vector of values for the x variable. |
y |
A vector of values for the y variable. |
plotit |
If |
hollow |
If |
xlab |
The label for the x-axis. |
ylab |
The label for the y-axis. |
trend |
|
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 |
ythreshold |
Indicates the proportion of potential critical y values
to display in the output. A value of |
progress |
If |
verbose |
If |
listout |
If |
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.
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.
The method in this function follows 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.
An earlier version of this function was published in Mangiafico, S.S. 2013. Cate-Nelson Analysis for Bivariate Data Using R-project. J.of Extension 51:5, 5TOT1.
Salvatore Mangiafico, mangiafico@njaes.rutgers.edu
https://rcompanion.org/rcompanion/h_02.html
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.
cateNelsonFixedY
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.