Skip to content

Commit

Permalink
UPdated vignette
Browse files Browse the repository at this point in the history
  • Loading branch information
timbeechey committed Mar 15, 2024
1 parent ff1d611 commit a5f9f6b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: clubpro
Type: Package
Title: Classification Using Binary Procrustes Rotation
Version: 0.6.0.004
Version: 0.6.0.006
Authors@R: person("Timothy", "Beechey", email = "tim.beechey@proton.me",
role = c("aut", "cre"), comment = c(ORCID = "0000-0001-8858-946X"))
Description: Implements a classification method described by Grice (2011, ISBN:978-0-12-385194-9) using
Expand Down
2 changes: 1 addition & 1 deletion R/threshold.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ threshold.clubprofit <- function(m) {
#' @export
plot.clubprothreshold <- function(x, ...) {
xyplot(cutpoint_pccs ~ unique_obs, x, ylim = c(0, 100),
xlab = "Category Boundary", y = "PCC", type = "b", lty = 3,
xlab = "Category Boundary", y = "PCC", type = c("p", "l"), lty = 3,
cex = 1, pch = 1, col = palette()[1],
scales = list(x = list(at = x$unique_obs, labels = x$unique_obs)))
}
Expand Down
6 changes: 4 additions & 2 deletions vignettes/clubpro.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ The classification of the observed data can be visualised by plotting the model
plot(mod)
```

Plotting the classification results shows that observed `width` values of 11 mm and smaller are consistently placed into the `Dangar Island` category, while observed `width` values of at least 16.5 mm are all placed into the `Salamader Bay` category. From these results we can see that the boundary between the two categories is somewhere between 11 and 16.5. However, it is not clear from the plot exactly where the most likely boundary falls. Using the `threshold()` function, the PCC that results from each possible boundary location can be computed. The boundary location that produces the highest PCC is the best category boundary.
Plotting the classification results shows that observed `width` values of 11 mm and smaller are consistently placed into the `Dangar Island` category, while observed `width` values of at least 16.5 mm are all placed into the `Salamader Bay` category. From these results we can see that the boundary between the two categories is somewhere between 11 and 16.5. However, it is not clear from the plot exactly where the most likely boundary falls. Grice et. al. (2016) suggest that in the case of binary clasification, the best category boundary can be determined by calculating a PCC for each possible boundary location. This can be achieved using the `threshold()` function.

```{r compute_threshold}
threshold(mod)
```

Plotting the object returned by `threshold()` shows that three adjacent category boundary locations produce equal maximum PCCs. This indicates that the best category boundary occurs between 11 and 13 mm but that there is overlap between the categories within this range of `width`s.

```{r plot_theshold, fig.width=6, fig.height=5}
```{r plot_theshold, fig.width=7, fig.height=5}
plot(threshold(mod))
```

Expand Down Expand Up @@ -121,4 +121,6 @@ plot(pcc_replicates(mod))

Grice, J. W. (2011). Observation oriented modeling: Analysis of cause in the behavioral sciences. Academic Press.

Grice, J. W., Cota, L. D., Barrett, P. T., Wuensch, K. L., & Poteat, G. M. (2016). A Simple and Transparent Alternative to Logistic Regression. Advances in Social Sciences Research Journal, 3(7), 147–165. https://doi.org/10.14738/assrj.37.2125

Hand, D. J., Daly, F., Lunn, A. D., McConway, K. J. and Ostrowski, E. (1994). A Handbook of Small Data Sets. Chapman & Hall.

0 comments on commit a5f9f6b

Please sign in to comment.