useDynLib(chngpt, .registration = TRUE)

export(chngpt.test, plot.chngpt.test, chngptm, chngptm.xy, print.chngptm,  antoch.test, performance.unit.test, plot.chngptm)
export(sim.threephase, sim.twophase.ran.inte, sim.pastor, sim.my, sim.chngpt, lincomb, sim.hinge, hinge.test, double.hinge, plot.double.hinge, threshold.func, predictx, convert.coef) 

importFrom("methods", "hasArg")
importFrom(kyotil, '%.%', rbern, expit, keepWarnings, myprint, concatList, mysapply, "tXDX", "interpolate", "last", getFixedEf, abline.pt.slope, contain, empty.plot, rnorm.ar)
importFrom(parallel, mclapply)
importFrom(MASS, mvrnorm)
importFrom(RhpcBLASctl, blas_get_num_procs, blas_set_num_threads)
importFrom(lme4, nobars, lmer, fixef)
import(survival)
importFrom("graphics", "abline", "plot", "axis", "lines", "par", "points", "hist")
importFrom("utils", "str", "capture.output")
importFrom("boot", "boot.ci", "boot")
importFrom("splines", "ns")
importFrom("stats", "as.formula", "coef", "complete.cases", "cov2cor", "cov",
             "deriv3", "glm", "logLik", "AIC", "median", "model.frame",
             "model.matrix", "na.pass", "optim", "pchisq", "pnorm",
             "predict", "pt", "qt", "quantile", "rbeta", "rgamma",
             "rnorm", "runif", "update", "density", "dnorm", "qchisq", "qnorm",
             "smooth.spline", "vcov", "sigma", "resid", "lm.fit", "rbinom", "residuals","fitted","deviance")
importFrom("grDevices", "col2rgb", "rgb")
importFrom("graphics", "title")
importFrom("stats", "ar", "arima.sim", "na.exclude")
importFrom("RhpcBLASctl", "blas_get_num_procs", "blas_set_num_threads")



S3method(AIC, chngptm)
S3method(logLik, chngptm)
S3method(coef, chngptm)
S3method(residuals,chngptm)
S3method(vcov, chngptm)
S3method(vcov, double.hinge)
S3method(summary,chngptm)
S3method(summary,double.hinge)
S3method(fitted,double.hinge)
S3method(residuals,double.hinge)
S3method(print,double.hinge)
S3method(print,chngptm)
S3method(print,summary.chngptm)
S3method(print,summary.double.hinge)
S3method(predict,chngptm)
S3method(getFixedEf,chngptm)
S3method(model.frame,chngptm)

S3method(plot,chngpt.test)
S3method(plot,chngptm)
S3method(plot,double.hinge)
