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