# Example using the spi dataset from the psychTools package
sc <- psych::scoreVeryFast(psychTools::spi.keys, psychTools::spi)
spi_sc <- cbind(psychTools::spi, sc)
spi_sc_vars <- spi_sc |>
dplyr::select(age, Agree, Consc, Neuro, Extra, Open)
formula <- age ~ Agree + Consc + Neuro + Extra + Open
OPCP(formula = formula, data = spi_sc_vars)
Run the code above in your browser using DataLab