Introduction to use of prcr for carrying a out two-step cluster analysis

Example

In this example using the built-in to prcr dataset pisaUSA15. Specifically, we use composite variables for broad interest, enjoyment, instrumental motivation, and self-efficacy. More information on these and other items can be found at this link.

## ℹ Loading prcr
library(prcr)
df <- pisaUSA15
m3 <- create_profiles_cluster(df, broad_interest, enjoyment, instrumental_mot, self_efficacy, n_profiles = 3)
## Prepared data: Removed 354 incomplete cases
## Hierarchical clustering carried out on: 5358 cases
## K-means algorithm converged: 5 iterations
## Clustered data: Using a 3 cluster solution
## Warning: `gather_()` was deprecated in tidyr 1.2.0.
## ℹ Please use `gather()` instead.
## ℹ The deprecated feature was likely used in the prcr package.
##   Please report the issue at <https://github.com/jrosen48/prcr/issues>.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
## Calculated statistics: R-squared = 0.424
plot_profiles(m3, to_center = TRUE)

Other functions include those for carrying out comparing r-squared values and perfomring cross-validation. These are documented in the CRAN release and their versions in the in-development version will be documented prior to the CRAN release.