import statsmodels.formula.api as smf


class StateModels:
    # Functions
    def __init__(self, data_frame=None, x=None, y=None):
        """
            Initialize class object
        """

    # Static Methods
    # --------------------------------
    @staticmethod
    def generate_summary(data_frame, x, y):
        x_data = '+'.join(x)
        if y == '' or len(x) == 0:
            return 'Something missing!!!'
        else:
            formula = f'{y} ~ {x_data}'
            linear = smf.ols(formula=formula, data=data_frame).fit()
            return linear.summary()
