# Data set: pss (for description run ?pss)
barplot(table(pss$difference), xlab = "PSS index difference", ylab = "Frequency")
boxplot(pss$difference ~ pss$group, xlab = "Group", ylab = "PSS index difference")
# Fit with a model only for the mean with xi = 0 (default)
fit0 <- sdlrm(difference ~ group, data = pss)
# Choosing the mode on the grid {-10, -9, ..., 0, ..., 9, 10}
fit <- choose_mode(fit0, grid = -10:10)
# Class
class(fit)
# It is possible to recovery the plot:
plot(fit)
# and the trace:
fit
# Fit with xi = 1
fit[[1]]
Run the code above in your browser using DataLab