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