# NOT RUN {
data(tempanomalies)
x <- tempanomalies$Year
y <- tempanomalies$AnnualAnomaly
snmoe <- emSNMoE(X = x, Y = y, K = 2, p = 1, verbose = TRUE)
# snmoe is a ModelSNMoE object. It contains some methods such as 'summary' and 'plot'
snmoe$summary()
snmoe$plot()
# snmoe has also two fields, stat and param which are reference classes as well
# Log-likelihood:
snmoe$stat$loglik
# Parameters of the polynomial regressions:
snmoe$param$beta
# }
Run the code above in your browser using DataLab