# 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
example <- pervasive_tric(formula = formula, data = spi_sc_vars)
#From the results, it appears we would be rather unlikely to meet individuals
#with the patterns of personality traits suggested for old and young people
#by a linear regression when data is trichotomized.
example
Run the code above in your browser using DataLab