def ttest(self, **kwargs: dict) -> 'SASresults': """ Python method to call the PHREG procedure For more information on the statements see the Documentation link. ``required_set = {}`` ``legal_set = {'by', 'cls', 'freq', 'paired', 'var', 'weight', 'procopts'}`` cls is an alias for the class statement Documentation link: http://go.documentation.sas.com/?docsetId=statug&docsetVersion=14.2&docsetTarget=statug_ttest_overview.htm&locale=en :param kwargs: dict :return: SAS result object """ required_set = {} legal_set = { 'by', 'cls', 'freq', 'paired', 'var', 'weight', 'procopts' } logging.debug("kwargs type: " + str(type(kwargs))) kwargs['ODSGraphics'] = True return SASProcCommons._run_proc(self, "TTEST", required_set, legal_set, **kwargs)
def reg(self, **kwargs: dict) -> 'SASresults': """ Python method to call the REG procedure For more information on the statements see the Documentation link. ``required_set={'model'}`` ``legal_set= {'add', 'by', 'code', 'id', 'var', 'lsmeans', 'model', 'random', 'repeated', 'slice', 'test', 'weight', 'out'}`` Documentation link: http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_reg_syntax.htm :param kwargs: dict :return: SAS result object """ required_set = {'model'} legal_set = { 'add', 'by', 'code', 'id', 'var', 'lsmeans', 'model', 'random', 'repeated', 'slice', 'test', 'weight', 'out', 'procopts' } logging.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "REG", required_set, legal_set, **kwargs)
def factor(self, **kwargs: dict) -> 'SASresults': """ Python method to call the PHREG procedure For more information on the statements see the Documentation link. ``required_set = {}`` ``legal_set = {'by', 'cls', 'freq', 'paired', 'var', 'weight', 'procopts'}`` Documentation link: http://go.documentation.sas.com/?docsetId=statug&docsetVersion=14.2&docsetTarget=statug_factor_overview.htm&locale=en :param kwargs: dict :return: SAS result object """ required_set = set() legal_set = { 'by', 'freq', 'priors', 'pathdiagram', 'partial', 'var', 'weight', 'procopts' } self.logger.debug("kwargs type: " + str(type(kwargs))) kwargs['ODSGraphics'] = True return SASProcCommons._run_proc(self, "FACTOR", required_set, legal_set, **kwargs)
def glm(self, **kwargs: dict) -> 'SASresults': """ Python method to call the GLM procedure For more information on the statements see the Documentation link. ``required_set={'model'}`` ``legal_set= {'absorb', 'by', 'cls', 'contrast', 'estimate', 'freq', 'id', 'lsmeans', 'manova', 'means', 'model', 'out', 'random', 'repeated', 'test', 'weight'}`` cls is an alias for the class statement Documentation link: http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_glm_toc.htm :param kwargs: dict :return: SAS result object """ required_set = {'model'} legal_set = {'absorb', 'by', 'cls', 'contrast', 'estimate', 'freq', 'id', 'lsmeans', 'manova', 'means', 'model', 'out', 'random', 'repeated', 'test', 'weight', 'procopts'} logging.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "GLM", required_set, legal_set, **kwargs)
def hpreg(self, **kwargs: dict) -> 'SASresults': """ Python method to call the HPREG procedure For more information on the statements see the Documentation link. ``required_set={'model'}`` ``legal_set = {'by', 'cls', 'code', 'freq', 'id', 'model', 'out', 'partition', 'performance', 'score', 'selection', 'weight'}`` cls is an alias for the class statement Documentation link: https://support.sas.com/documentation/onlinedoc/stat/141/hpreg.pdf :param kwargs: dict :return: SAS result object """ required_set = {'model'} legal_set = {'by', 'cls', 'code', 'freq', 'id', 'model', 'out', 'partition', 'performance', 'score', 'selection', 'weight'} logging.debug("kwargs type: " + str(type(kwargs))) kwargs['ODSGraphics']=False return SASProcCommons._run_proc(self, "HPREG", required_set, legal_set, **kwargs)
def tpspline(self, **kwargs: dict) -> 'SASresults': """ Python method to call the TPSPLINE procedure For more information on the statements see the Documentation link. ``required_set = {'model'}`` ``legal_set = {'by', 'freq', 'id', 'model', 'output', 'score', 'procopts'}`` cls is an alias for the class statement Documentation link: http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_tpspline_toc.htm :param kwargs: dict :return: SAS result object """ required_set = {'model'} legal_set = { 'by', 'freq', 'id', 'model', 'output', 'score', 'procopts' } logging.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "TPSPLINE", required_set, legal_set, **kwargs)
def logistic(self, **kwargs: dict) -> 'SASresults': """ Python method to call the LOGISTIC procedure For more information on the statements see the Documentation link. ``required_set={'model'}`` ``legal_set= {'by', 'cls', 'contrast', 'effect', 'effectplot', 'estimate', 'exact', 'freq', 'lsmeans', 'oddsratio', 'out', 'roc', 'score', 'slice', 'store', 'strata', 'units', 'weight'}`` cls is an alias for the class statement Documentation link: http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_logistic_toc.htm The PROC LOGISTIC and MODEL statements are required. The CLASS and EFFECT statements (if specified) must precede the MODEL statement, and the CONTRAST, EXACT, and ROC statements (if specified) must follow the MODEL statement. :param kwargs: dict :return: SAS result object """ required_set = {'model'} legal_set = {'by', 'cls', 'contrast', 'effect', 'effectplot', 'estimate', 'exact', 'freq', 'lsmeans', 'oddsratio', 'out', 'roc', 'score', 'slice', 'store', 'strata', 'units', 'weight', 'procopts'} self.logger.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "LOGISTIC", required_set, legal_set, **kwargs)
def glm(self, **kwargs: dict) -> 'SASresults': """ Python method to call the GLM procedure For more information on the statements see the Documentation link. ``required_set={'model'}`` ``legal_set= {'absorb', 'by', 'cls', 'contrast', 'estimate', 'freq', 'id', 'lsmeans', 'manova', 'means', 'model', 'out', 'random', 'repeated', 'test', 'weight'}`` cls is an alias for the class statement Documentation link: http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_glm_toc.htm :param kwargs: dict :return: SAS result object """ required_set = {'model'} legal_set = {'absorb', 'by', 'cls', 'contrast', 'estimate', 'freq', 'id', 'lsmeans', 'manova', 'means', 'model', 'out', 'random', 'repeated', 'test', 'weight', 'procopts'} self.logger.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "GLM", required_set, legal_set, **kwargs)
def hpreg(self, **kwargs: dict) -> 'SASresults': """ Python method to call the HPREG procedure For more information on the statements see the Documentation link. ``required_set={'model'}`` ``legal_set = {'by', 'cls', 'code', 'freq', 'id', 'model', 'out', 'partition', 'performance', 'score', 'selection', 'weight'}`` cls is an alias for the class statement Documentation link: https://support.sas.com/documentation/onlinedoc/stat/141/hpreg.pdf :param kwargs: dict :return: SAS result object """ required_set = {'model'} legal_set = {'by', 'cls', 'code', 'freq', 'id', 'model', 'out', 'partition', 'performance', 'score', 'selection', 'weight'} self.logger.debug("kwargs type: " + str(type(kwargs))) kwargs['ODSGraphics']=False return SASProcCommons._run_proc(self, "HPREG", required_set, legal_set, **kwargs)
def phreg(self, **kwargs: dict) -> 'SASresults': """ Python method to call the PHREG procedure For more information on the statements see the Documentation link. ``required_set = {'model'}`` ``legal_set = {'assess', 'bayes', 'by', 'cls', 'contrast', 'freq', 'effect', 'estimate', 'hazardratio', 'id', 'lsmeans', 'lsmestimate', 'model', 'out', 'roc', 'random', 'slice', 'store', 'strata', 'test', 'weight', 'procopts'}`` cls is an alias for the class statement Documentation link: http://go.documentation.sas.com/?docsetId=statug&docsetTarget=statug_phreg_toc.htm&docsetVersion=14.2&locale=en :param kwargs: dict :return: SAS result object """ required_set = {'model'} legal_set = {'assess', 'bayes', 'by', 'cls', 'contrast', 'freq', 'effect', 'estimate', 'hazardratio', 'id', 'lsmeans', 'lsmestimate', 'model', 'out', 'roc', 'random', 'slice', 'store', 'strata', 'test', 'weight', 'procopts'} self.logger.debug("kwargs type: " + str(type(kwargs))) kwargs['ODSGraphics']=True return SASProcCommons._run_proc(self, "PHREG", required_set, legal_set, **kwargs)
def hplogistic(self, **kwargs: dict) -> 'SASresults': """ Python method to call the HPLOGISTIC procedure For more information on the statements see the Documentation link. ``required_set={'model'}`` ``legal_set= {'by', 'cls', 'code', 'freq', 'id', 'model', 'out', 'partition', 'score', 'selection', 'weight'}`` cls is an alias for the class statement Documentation link: https://support.sas.com/documentation/onlinedoc/stat/141/hplogistic.pdf :param kwargs: dict :return: SAS result object """ required_set = {'model'} legal_set = { 'by', 'cls', 'code', 'freq', 'id', 'model', 'out', 'partition', 'score', 'selection', 'weight' } logging.debug("kwargs type: " + str(type(kwargs))) # ODS graphics are created by default for STAT this stops them form generation kwargs['ODSGraphics'] = False return SASProcCommons._run_proc(self, "HPLOGISTIC", required_set, legal_set, **kwargs)
def logistic(self, **kwargs: dict) -> 'SASresults': """ Python method to call the LOGISTIC procedure For more information on the statements see the Documentation link. ``required_set={'model'}`` ``legal_set= {'by', 'cls', 'contrast', 'effect', 'effectplot', 'estimate', 'exact', 'freq', 'lsmeans', 'oddsratio', 'out', 'roc', 'score', 'slice', 'store', 'strata', 'units', 'weight'}`` cls is an alias for the class statement Documentation link: http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_logistic_toc.htm The PROC LOGISTIC and MODEL statements are required. The CLASS and EFFECT statements (if specified) must precede the MODEL statement, and the CONTRAST, EXACT, and ROC statements (if specified) must follow the MODEL statement. :param kwargs: dict :return: SAS result object """ required_set = {'model'} legal_set = {'by', 'cls', 'contrast', 'effect', 'effectplot', 'estimate', 'exact', 'freq', 'lsmeans', 'oddsratio', 'out', 'roc', 'score', 'slice', 'store', 'strata', 'units', 'weight', 'procopts'} logging.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "LOGISTIC", required_set, legal_set, **kwargs)
def shewhart(self, **kwargs: dict) -> 'SASresults': """ Python method to call the SHEWHART procedure Documentation link: http://support.sas.com/documentation/cdl/en/qcug/68161/HTML/default/viewer.htm#qcug_shewhart_toc.htm """ required_set = {} legal_set = {'procopts'} self.logger.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "SHEWHART", required_set, legal_set, **kwargs)
def shewhart(self, **kwargs: dict) -> 'SASresults': """ Python method to call the SHEWHART procedure Documentation link: http://support.sas.com/documentation/cdl/en/qcug/68161/HTML/default/viewer.htm#qcug_shewhart_toc.htm """ required_set = {} legal_set = {'procopts'} logger.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "SHEWHART", required_set, legal_set, **kwargs)
def macontrol(self, **kwargs: dict) -> 'SASresults': """ Python method to call the MACONTROL procedure ``required_set = {}`` Documentation link: http://support.sas.com/documentation/cdl/en/qcug/68161/HTML/default/viewer.htm#qcug_macontrol_toc.htm """ required_set = {} legal_set = {'procopts'} logger.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "MACONTROL", required_set, legal_set, **kwargs)
def macontrol(self, **kwargs: dict) -> 'SASresults': """ Python method to call the MACONTROL procedure ``required_set = {}`` Documentation link: http://support.sas.com/documentation/cdl/en/qcug/68161/HTML/default/viewer.htm#qcug_macontrol_toc.htm """ required_set = {} legal_set = {'procopts'} self.logger.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "MACONTROL", required_set, legal_set, **kwargs)
def timeid(self, **kwargs: dict) -> 'SASresults': """ Python method to call the TIMEID procedure ``required_set = {}`` ``legal_set = { 'by', 'id', 'out'}`` Documentation link: http://support.sas.com/documentation/cdl//en/etsug/68148/HTML/default/viewer.htm#etsug_timeid_syntax.htm """ required_set = {} legal_set = {'by', 'id', 'out', 'procopts'} return SASProcCommons._run_proc(self, "TIMEID", required_set, legal_set, **kwargs)
def inner(self, *args, **kwargs): proc = func.__name__.lower() inner.proc_decorator = kwargs self.logger.debug("processing proc:{}".format(func.__name__)) self.logger.debug(req_set) self.logger.debug("kwargs type: " + str(type(kwargs))) if proc in ['hplogistic', 'hpreg']: kwargs['ODSGraphics'] = kwargs.get('ODSGraphics', False) if proc == 'hpcluster': proc = 'hpclus' legal_set = set(kwargs.keys()) self.logger.debug(legal_set) return SASProcCommons._run_proc(self, proc, req_set, legal_set, **kwargs)
def arima(self, **kwargs: dict) -> 'SASresults': """ Python method to call the ARIMA procedure ``required_set={'identify'}`` ``legal_set={ 'by', 'identify', 'estimate', 'outlier', 'forecast', 'out'}`` Documentation link: http://support.sas.com/documentation/cdl//en/etsug/68148/HTML/default/viewer.htm#etsug_arima_syntax.htm """ required_set = {'identify'} legal_set = {'by', 'identify', 'estimate', 'outlier', 'forecast', 'out', 'procopts'} return SASProcCommons._run_proc(self, "ARIMA", required_set, legal_set, **kwargs)
def cusum(self, **kwargs: dict) -> 'SASresults': """ Python method to call the CUSUM procedure ``required_set = {}`` ``legal_set = {'by','xchart'}`` Documentation link: http://support.sas.com/documentation/cdl/en/qcug/68161/HTML/default/viewer.htm#qcug_cusum_sect001.htm """ required_set = {} legal_set = {'by', 'xchart', 'procopts'} logger.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "CUSUM", required_set, legal_set, **kwargs)
def timeseries(self, **kwargs: dict) -> 'SASresults': """ Python method to call the TIMESERIES procedure ``required_set={'id'}`` ``legal_set={ 'by', 'corr', 'crosscorr', 'decomp', 'id', 'season', 'trend', 'var', 'crossvar', 'out'}`` Documentation link: http://support.sas.com/documentation/cdl//en/etsug/68148/HTML/default/viewer.htm#etsug_timeseries_syntax.htm """ required_set = {'id'} legal_set = {'by', 'corr', 'crosscorr', 'decomp', 'id', 'season', 'trend', 'var', 'crossvar', 'out', 'procopts'} self.logger.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "TIMESERIES", required_set, legal_set, **kwargs)
def cusum(self, **kwargs: dict) -> 'SASresults': """ Python method to call the CUSUM procedure ``required_set = {}`` ``legal_set = {'by','xchart'}`` Documentation link: http://support.sas.com/documentation/cdl/en/qcug/68161/HTML/default/viewer.htm#qcug_cusum_sect001.htm """ required_set = {} legal_set = {'by', 'xchart', 'procopts'} self.logger.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "CUSUM", required_set, legal_set, **kwargs)
def capability(self, **kwargs: dict) -> 'SASresults': """ Python method to call the CUSUM procedure ``required_set = {}`` ``legal_set = {'cdfplot', 'comphist', 'histogram', 'inset', 'intervals', 'output', 'ppplot', 'probplot', 'qqplot', 'freq', 'weight', 'id', 'by', 'spec'}`` Documentation link: http://support.sas.com/documentation/cdl/en/qcug/68161/HTML/default/viewer.htm#qcug_capability_sect001.htm """ required_set = {} legal_set = {'cdfplot', 'comphist', 'histogram', 'inset', 'intervals', 'output', 'ppplot', 'probplot', 'qqplot', 'freq', 'weight', 'id', 'by', 'spec', 'out', 'procopts'} logger.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "CAPABILITY", required_set, legal_set, **kwargs)
def gradboost(self, **kwargs: dict) -> object: """ Python method to call the HPCLUS procedure required_set = {'input'} legal_set= {'freq', 'input', 'id', 'score'} Documentation link: https://support.sas.com/documentation/solutions/miner/emhp/14.1/emhpprcref.pdf :param kwargs: dict :return: SAS result object """ required_set = {'input'} legal_set = {'freq', 'input', 'id', 'score', 'procopts'} self.logger.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "HPCLUS", required_set, legal_set, **kwargs)
def gradboost(self, **kwargs: dict) -> object: """ Python method to call the HPCLUS procedure required_set = {'input'} legal_set= {'freq', 'input', 'id', 'score'} Documentation link: https://support.sas.com/documentation/solutions/miner/emhp/14.1/emhpprcref.pdf :param kwargs: dict :return: SAS result object """ required_set = {'input'} legal_set = {'freq', 'input', 'id', 'score', 'procopts'} logging.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc("HPCLUS", required_set, legal_set, **kwargs)
def capability(self, **kwargs: dict) -> 'SASresults': """ Python method to call the CUSUM procedure ``required_set = {}`` ``legal_set = {'cdfplot', 'comphist', 'histogram', 'inset', 'intervals', 'output', 'ppplot', 'probplot', 'qqplot', 'freq', 'weight', 'id', 'by', 'spec'}`` Documentation link: http://support.sas.com/documentation/cdl/en/qcug/68161/HTML/default/viewer.htm#qcug_capability_sect001.htm """ required_set = {} legal_set = {'cdfplot', 'comphist', 'histogram', 'inset', 'intervals', 'output', 'ppplot', 'probplot', 'qqplot', 'freq', 'weight', 'id', 'by', 'spec', 'out', 'procopts'} self.logger.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "CAPABILITY", required_set, legal_set, **kwargs)
def nnet(self, **kwargs: dict) -> object: """ Python method to call the HPNEURAL procedure required_set = {'input', 'target', 'train'} legal_set= {'freq', 'input', 'id', 'target', 'save', 'score', 'architecture', 'weight', 'hidden', 'partition', 'train'} Documentation link: https://support.sas.com/documentation/solutions/miner/emhp/14.1/emhpprcref.pdf :param kwargs: dict :return: SAS result object """ required_set = {'input', 'target', 'train'} legal_set = {'freq', 'input', 'id', 'target', 'save', 'score', 'architecture', 'weight', 'hidden', 'partition', 'train', 'procopts'} self.logger.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "HPNEURAL", required_set, legal_set, **kwargs)
def nnet(self, **kwargs: dict) -> object: """ Python method to call the HPNEURAL procedure required_set = {'input', 'target', 'train'} legal_set= {'freq', 'input', 'id', 'target', 'save', 'score', 'architecture', 'weight', 'hidden', 'partition', 'train'} Documentation link: https://support.sas.com/documentation/solutions/miner/emhp/14.1/emhpprcref.pdf :param kwargs: dict :return: SAS result object """ required_set = {'input', 'target', 'train'} legal_set = {'freq', 'input', 'id', 'target', 'save', 'score', 'architecture', 'weight', 'hidden', 'partition', 'train', 'procopts'} logging.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc("HPNEURAL", required_set, legal_set, **kwargs)
def hp4score(self, **kwargs: dict) -> 'SASresults': """ Python method to call the HP4SCORE procedure ``required_set = {}`` ``legal_set = {'id', 'importance', 'performance', 'score', 'procopts'}`` Documentation link: https://support.sas.com/documentation/solutions/miner/emhp/14.1/emhpprcref.pdf :param kwargs: dict :return: SAS result object """ required_set = {} legal_set = {'id', 'importance', 'performance', 'score', 'procopts'} logging.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "HP4SCORE", required_set, legal_set, **kwargs)
def hp4score(self, **kwargs: dict) -> 'SASresults': """ Python method to call the HP4SCORE procedure ``required_set = {}`` ``legal_set = {'id', 'importance', 'performance', 'score', 'procopts'}`` Documentation link: https://support.sas.com/documentation/solutions/miner/emhp/14.1/emhpprcref.pdf :param kwargs: dict :return: SAS result object """ required_set = {} legal_set = {'id', 'importance', 'performance', 'score', 'procopts'} self.logger.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "HP4SCORE", required_set, legal_set, **kwargs)
def arima(self, **kwargs: dict) -> 'SASresults': """ Python method to call the ARIMA procedure ``required_set={'identify'}`` ``legal_set={ 'by', 'identify', 'estimate', 'outlier', 'forecast', 'out'}`` Documentation link: http://support.sas.com/documentation/cdl//en/etsug/68148/HTML/default/viewer.htm#etsug_arima_syntax.htm """ required_set = {'identify'} legal_set = { 'by', 'identify', 'estimate', 'outlier', 'forecast', 'out', 'procopts' } return SASProcCommons._run_proc(self, "ARIMA", required_set, legal_set, **kwargs)
def timedata(self, **kwargs: dict) -> 'SASresults': """ Python method to call the TIMEDATA procedure ``required_set = {}`` ``legal_set = {'by', 'id', 'fcmport', 'out', 'outarrays', 'outscalars', 'var', 'prog_stmts'}`` Documentation link: http://support.sas.com/documentation/cdl//en/etsug/68148/HTML/default/viewer.htm#etsug_timedata_syntax.htm """ required_set = set() legal_set = { 'by', 'id', 'fcmport', 'out', 'outarrays', 'outscalars', 'var', 'prog_stmts', 'procopts' } return SASProcCommons._run_proc(self, "TIMEDATA", required_set, legal_set, **kwargs)
def hpbnet(self, **kwargs: dict) -> 'SASresults': """ Python method to call the HPBNET procedure ``required_set = {'input', 'target'}`` ``legal_set = {'id', 'code', 'freq', 'partition', 'input', 'performance', 'target', 'output', 'procopts'}`` Documentation link: http://go.documentation.sas.com/?docsetId=emhpprcref&docsetVersion=14.2&docsetTarget=emhpprcref_hpbnet_toc.htm&locale=en :param kwargs: dict :return: SAS result object """ required_set = {'input', 'target'} legal_set = {'id', 'code', 'freq', 'partition', 'input', 'performance', 'target', 'output', 'procopts'} self.logger.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "HPBNET", required_set, legal_set, **kwargs)
def hpbnet(self, **kwargs: dict) -> 'SASresults': """ Python method to call the HPBNET procedure ``required_set = {'input', 'target'}`` ``legal_set = {'id', 'code', 'freq', 'partition', 'input', 'performance', 'target', 'output', 'procopts'}`` Documentation link: http://go.documentation.sas.com/?docsetId=emhpprcref&docsetVersion=14.2&docsetTarget=emhpprcref_hpbnet_toc.htm&locale=en :param kwargs: dict :return: SAS result object """ required_set = {'input', 'target'} legal_set = {'id', 'code', 'freq', 'partition', 'input', 'performance', 'target', 'output', 'procopts'} logging.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "HPBNET", required_set, legal_set, **kwargs)
def timeseries(self, **kwargs: dict) -> 'SASresults': """ Python method to call the TIMESERIES procedure ``required_set={'id'}`` ``legal_set={ 'by', 'corr', 'crosscorr', 'decomp', 'id', 'season', 'trend', 'var', 'crossvar', 'out'}`` Documentation link: http://support.sas.com/documentation/cdl//en/etsug/68148/HTML/default/viewer.htm#etsug_timeseries_syntax.htm """ required_set = {'id'} legal_set = { 'by', 'corr', 'crosscorr', 'decomp', 'id', 'season', 'trend', 'var', 'crossvar', 'out', 'procopts' } self.logger.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "TIMESERIES", required_set, legal_set, **kwargs)
def ucm(self, **kwargs: dict) -> 'SASresults': """ Python method to call the UCM procedure ``required_set={'model'}`` ``legal_set= {'autoreg', 'blockseason', 'by', 'cycle', 'deplag', 'estimate', 'forecast', 'id', 'irregular', 'level', 'model', 'nloptions', 'performance', 'out', 'outlier', 'randomreg', 'season', 'slope', 'splinereg', 'splineseason'}`` Documentation link: http://support.sas.com/documentation/cdl//en/etsug/68148/HTML/default/viewer.htm#etsug_ucm_syntax.htm """ required_set = {'model'} legal_set = {'autoreg', 'blockseason', 'by', 'cycle', 'deplag', 'estimate', 'forecast', 'id', 'irregular' 'level', 'model', 'nloptions', 'performance', 'out', 'outlier', 'randomreg', 'season', 'slope' 'splinereg', 'splineseason', 'procopts'} return SASProcCommons._run_proc(self, "UCM", required_set, legal_set, **kwargs)
def hpbin(self, **kwargs: dict) -> 'SASresults': """ Python method to call the HPBIN procedure ``required_set = {}`` ``legal_set= {'cls', 'code', 'grow', 'id', 'model', 'out', 'partition', 'performance', 'prune', 'rules'}`` cls is an alias for the class statement For more information on the statements see the Documentation link. Documentation link: http://support.sas.com/documentation/cdl/en/stathpug/68163/HTML/default/viewer.htm#stathpug_hpsplit_syntax.htm :param kwargs: dict :return: SAS result object """ required_set = set() legal_set = {'code', 'id', 'performance', 'target', 'input', 'procopts'} self.logger.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "HPBIN", required_set, legal_set, **kwargs)
def hpimpute(self, **kwargs: dict) -> 'SASresults': """ Python method to call the HPIMPUTE procedure ``required_set = {'impute'}`` ``legal_set = {'input', 'impute', 'performance', 'id', 'freq', 'code', 'procopts'}`` For more information on the statements see the Documentation link. Documentation link: http://support.sas.com/documentation/cdl/en/stathpug/68163/HTML/default/viewer.htm#stathpug_hpsplit_syntax.htm :param kwargs: dict :return: SAS result object """ required_set = {'impute'} legal_set = {'input', 'impute', 'performance', 'id', 'freq', 'code', 'procopts'} self.logger.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "HPIMPUTE", required_set, legal_set, **kwargs)
def hpbin(self, **kwargs: dict) -> 'SASresults': """ Python method to call the HPBIN procedure ``required_set = {}`` ``legal_set= {'cls', 'code', 'grow', 'id', 'model', 'out', 'partition', 'performance', 'prune', 'rules'}`` cls is an alias for the class statement For more information on the statements see the Documentation link. Documentation link: http://support.sas.com/documentation/cdl/en/stathpug/68163/HTML/default/viewer.htm#stathpug_hpsplit_syntax.htm :param kwargs: dict :return: SAS result object """ required_set = {} legal_set = {'code', 'id', 'performance', 'target', 'input', 'procopts'} logging.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "HPBIN", required_set, legal_set, **kwargs)
def factmac(self, **kwargs: dict) -> object: """ Python method to call the HPFOREST procedure required_set = {'input', 'target'} legal_set= {'freq', 'input', 'id', 'target', 'save', 'score'} Documentation link: https://support.sas.com/documentation/solutions/miner/emhp/14.1/emhpprcref.pdf :param kwargs: dict :return: SAS result object """ required_set = {'input', 'target'} legal_set = { 'freq', 'input', 'id', 'target', 'save', 'score', 'procopts' } # print ("I am HERE") logging.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc("HPFOREST", required_set, legal_set, **kwargs)
def treeboost(self, **kwargs: dict) -> 'SASresults': """ Python method to call the TREEBOOST procedure ``required_set = {'input', 'target'}`` ``legal_set = {'assess', 'code', 'freq', 'importance', 'input', 'performance', 'target', 'save', 'score', 'subseries', 'procopts'}`` Documentation link: https://support.sas.com/documentation/solutions/miner/emhp/14.1/emhpprcref.pdf :param kwargs: dict :return: SAS result object """ required_set = {'input', 'target'} legal_set = {'assess', 'code', 'freq', 'importance', 'input', 'performance', 'target', 'save', 'score', 'subseries', 'procopts'} self.logger.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "TREEBOOST", required_set, legal_set, **kwargs)
def hpimpute(self, **kwargs: dict) -> 'SASresults': """ Python method to call the HPIMPUTE procedure ``required_set = {'impute'}`` ``legal_set = {'input', 'impute', 'performance', 'id', 'freq', 'code', 'procopts'}`` For more information on the statements see the Documentation link. Documentation link: http://support.sas.com/documentation/cdl/en/stathpug/68163/HTML/default/viewer.htm#stathpug_hpsplit_syntax.htm :param kwargs: dict :return: SAS result object """ required_set = {'impute'} legal_set = {'input', 'impute', 'performance', 'id', 'freq', 'code', 'procopts'} logging.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "HPIMPUTE", required_set, legal_set, **kwargs)
def treeboost(self, **kwargs: dict) -> 'SASresults': """ Python method to call the TREEBOOST procedure ``required_set = {'input', 'target'}`` ``legal_set = {'assess', 'code', 'freq', 'importance', 'input', 'performance', 'target', 'save', 'score', 'subseries', 'procopts'}`` Documentation link: https://support.sas.com/documentation/solutions/miner/emhp/14.1/emhpprcref.pdf :param kwargs: dict :return: SAS result object """ required_set = {'input', 'target'} legal_set = {'assess', 'code', 'freq', 'importance', 'input', 'performance', 'target', 'save', 'score', 'subseries', 'procopts'} logging.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "TREEBOOST", required_set, legal_set, **kwargs)
def tpspline(self, **kwargs: dict) -> 'SASresults': """ Python method to call the TPSPLINE procedure For more information on the statements see the Documentation link. ``required_set = {'model'}`` ``legal_set = {'by', 'freq', 'id', 'model', 'output', 'score', 'procopts'}`` cls is an alias for the class statement Documentation link: http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_tpspline_toc.htm :param kwargs: dict :return: SAS result object """ required_set = {'model'} legal_set = {'by', 'freq', 'id', 'model', 'output', 'score', 'procopts'} logging.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "TPSPLINE", required_set, legal_set, **kwargs)
def ucm(self, **kwargs: dict) -> 'SASresults': """ Python method to call the UCM procedure ``required_set={'model'}`` ``legal_set= {'autoreg', 'blockseason', 'by', 'cycle', 'deplag', 'estimate', 'forecast', 'id', 'irregular', 'level', 'model', 'nloptions', 'performance', 'out', 'outlier', 'randomreg', 'season', 'slope', 'splinereg', 'splineseason'}`` Documentation link: http://support.sas.com/documentation/cdl//en/etsug/68148/HTML/default/viewer.htm#etsug_ucm_syntax.htm """ required_set = {'model'} legal_set = { 'autoreg', 'blockseason', 'by', 'cycle', 'deplag', 'estimate', 'forecast', 'id', 'irregular' 'level', 'model', 'nloptions', 'performance', 'out', 'outlier', 'randomreg', 'season', 'slope' 'splinereg', 'splineseason', 'procopts' } return SASProcCommons._run_proc(self, "UCM", required_set, legal_set, **kwargs)
def reg(self, **kwargs: dict) -> 'SASresults': """ Python method to call the REG procedure For more information on the statements see the Documentation link. ``required_set={'model'}`` ``legal_set= {'add', 'by', 'code', 'id', 'var', 'lsmeans', 'model', 'random', 'repeated', 'slice', 'test', 'weight', 'out'}`` Documentation link: http://support.sas.com/documentation/cdl/en/statug/68162/HTML/default/viewer.htm#statug_reg_syntax.htm :param kwargs: dict :return: SAS result object """ required_set = {'model'} legal_set = {'add', 'by', 'code', 'id', 'var', 'lsmeans', 'model', 'random', 'repeated', 'slice', 'test', 'weight', 'out', 'procopts'} logging.debug("kwargs type: " + str(type(kwargs))) return SASProcCommons._run_proc(self, "REG", required_set, legal_set, **kwargs)
def execute_table(self, _output_type, **kwargs: dict) -> 'SASresults': """ executes a PROC TABULATE statement You must specify an output type to use this method, of 'HTML', 'text', or 'Pandas'. There are three convenience functions for generating specific output; see: .text_table() .table() .to_dataframe() :param _output_type: style of output to use :param left: the query for the left side of the table :param top: the query for the top of the table :return: """ left = kwargs.pop('left', None) top = kwargs.pop('top', None) sets = dict(classes=set(), vars=set()) left._gather(sets) if top: top._gather(sets) table = top \ and '%s, %s' % (str(left), str(top)) \ or str(left) proc_kwargs = dict(cls=' '.join(sets['classes']), var=' '.join(sets['vars']), table=table) # permit additional valid options if passed; for now, just 'where' proc_kwargs.update(kwargs) # we can't easily use the SASProcCommons approach for submiting, # since this is merely an output / display proc for us; # but we can at least use it to check valid options in the canonical saspy way required_options = {'cls', 'var', 'table'} allowed_options = {'cls', 'var', 'table', 'where'} verifiedKwargs = SASProcCommons._stmt_check(self, required_options, allowed_options, proc_kwargs) if (_output_type == 'Pandas'): # for pandas, use the out= directive code = "proc tabulate data=%s.%s %s out=temptab;\n" % ( self.data.libref, self.data.table, self.data._dsopts()) else: code = "proc tabulate data=%s.%s %s;\n" % ( self.data.libref, self.data.table, self.data._dsopts()) # build the code for arg, value in verifiedKwargs.items(): code += " %s %s;\n" % (arg == 'cls' and 'class' or arg, value) code += "run;" # teach_me_SAS if self.sas.nosub: print(code) return # submit the code ll = self.data._is_valid() if _output_type == 'HTML': if not ll: html = self.data.HTML self.data.HTML = 1 ll = self.sas._io.submit(code) self.data.HTML = html if not self.sas.batch: DISPLAY(HTML(ll['LST'])) check, errorMsg = self.data._checkLogForError(ll['LOG']) if not check: raise ValueError("Internal code execution failed: " + errorMsg) else: return ll elif _output_type == 'text': if not ll: html = self.data.HTML self.data.HTML = 1 ll = self.sas._io.submit(code, 'text') self.data.HTML = html print(ll['LST']) return elif _output_type == 'Pandas': return self.to_nested_dataframe(code)