useDynLib(fect, .registration=TRUE)
##exportPattern("^[[:alpha:]]+")
importFrom(Rcpp, evalCpp)
importFrom("stats", "na.omit", "quantile", "sd", "var", "cov", "pchisq", "lm",
"as.formula", "median", "pnorm", "predict", "qnorm", "reshape",
"dnorm", "pf", "rbinom", "loess", "aggregate", "pt", "qt", "setNames", "time")
importFrom("foreach","foreach","%dopar%")
importFrom("parallel", "detectCores", "stopCluster", "makeCluster")
importFrom("doRNG","registerDoRNG")
importFrom("MASS", "ginv")
importFrom("utils", "setTxtProgressBar", "txtProgressBar", "tail")
importFrom("ggplot2", "ggplot_build", "geom_boxplot", "geom_density", "geom_tile",
           "geom_point", "labs", "theme_bw", "scale_fill_manual",
           "geom_hline", "geom_line", "geom_ribbon", "geom_vline", "geom_text",
           "ggplot", "coord_cartesian", "coord_flip", "element_text",
           "element_blank", "scale_x_discrete", "scale_x_continuous", "scale_y_continuous",
           "scale_linetype_manual", "scale_size_manual", "theme", "geom_area",
           "scale_colour_manual", "aes", "aes_string", "annotate", "ggtitle", "geom_rect",
           "scale_color_discrete", "scale_color_manual", "ggplotGrob",
           "guide_legend", "margin", "geom_jitter", "geom_pointrange",
           "guides","xlab","ylab","element_rect","geom_errorbar","geom_linerange",
           "scale_linewidth_manual")
importFrom("abind", "abind")
importFrom("mvtnorm", "rmvnorm")
importFrom("GGally", "ggpairs")
importFrom("graphics", "plot")
importFrom("graphics", "hist")
importFrom("gridExtra", "grid.arrange", "arrangeGrob")
importFrom("grid", "textGrob", "gpar")
importFrom("grDevices", "adjustcolor")
importFrom("fixest", "feols")
importFrom(dplyr, "%>%", "group_by", "mutate")
importFrom("future.apply", "future_lapply")
importFrom("parallelly", "availableCores")
importFrom("reshape2", "melt")
importFrom("rlang", "sym", ".data")
importFrom("scales", "pretty_breaks")

export(esplot)
export(get.cohort)
export(interFE)
export(fect)
export(fect_mspe)
export(effect)
export(plot.fect)
export(did_wrapper)
export(fect_sens)
export(fect_iden)
export(att.cumu)
S3method("fect", "default")
S3method("fect", "formula")
S3method("print", "fect")
S3method("plot", "fect")
S3method("print", "fect_plot_return")
S3method("interFE", "default")
S3method("interFE", "formula")
S3method("print", "interFE")


