useDynLib("midasml", .registration = TRUE)

import("Matrix")
#import("doSNOW")
importFrom("doRNG","%dorng%")
importFrom("foreach","%do%")
importFrom("foreach","%dopar%")
importFrom("doParallel","registerDoParallel")
importFrom("foreach","foreach")
importFrom("graphics", "segments")
importFrom("stats", "approx", "coef", "glm", "nlm")
importFrom("utils", "capture.output")
importFrom("methods", "new")
importFrom("Matrix", "Diagonal")
importFrom("randtoolbox", "sobol", "torus", "SFMT")
importFrom(snow, makeCluster)
importFrom(snow, clusterExport)
importFrom(snow, stopCluster)
importFrom(snow, parSapply)
importFrom(snow, parRapply)
importFrom("stats", "median", "nlminb", "optim", "coefficients", "lm")
importFrom("utils", "setTxtProgressBar", "txtProgressBar")

export(fa.sglfit)
export(thetafit)
export(tscv.sglfit)
export(cv.sglfit)
export(cv.panel.sglfit)
export(ic.sglfit) 
export(ic.panel.sglfit)
export(reg.sgl) 
export(reg.panel.sgl) 
export(sglfit)
export(midas.ardl)
export(lb)
export(gb) 
export(mixed_freq_data)
export(mixed_freq_data_single) 
export(monthBegin) 
export(monthEnd) 
export(dateMatch)


S3method("predict","sglpath")
S3method("predict","cv.sglfit")
S3method("predict","cv.panel.sglfit")
S3method("predict","ic.sglfit")
S3method("predict","ic.panel.sglfit")
S3method("predict","fa.sglfit")
