# NOT RUN {
data(toydataset)
# Let's fit a mixRHLP model on a dataset containing 2 clusters:
data <- toydataset[1:190,1:21]
x <- data$x
Y <- t(data[,2:ncol(data)])
mixrhlp <- cemMixRHLP(X = x, Y = Y, K = 2, R = 2, p = 1, verbose = TRUE)
# mixrhlp is a ModelMixRHLP object. It contains some methods such as 'summary' and 'plot'
mixrhlp$summary()
mixrhlp$plot()
# mixrhlp has also two fields, stat and param which are reference classes as well
# Log-likelihood:
mixrhlp$stat$loglik
# Parameters of the polynomial regressions:
mixrhlp$param$beta
# }
Run the code above in your browser using DataLab