Class FixedEffectsModel

  • All Implemented Interfaces:
    PanelRegression

    public class FixedEffectsModel
    extends Object
    implements PanelRegression
    Fits the panel data to this linear model: \[ y_{it} = \alpha_{i}+X_{it}\mathbf{\beta}+u_{it} \] where \(y_{it}\) is the dependent variable observed for individual \(i\) at time \(t\), \(X_{it}\) is the time-variant \(1\times K\) regressor matrix, \(\alpha_{i}\) is the unobservable time-invariant individual effect and \(u_{it}\) is the error term.
    See Also:
    • Constructor Detail

      • FixedEffectsModel

        public FixedEffectsModel​(PanelData panel,
                                 String yHeader,
                                 String[] XHeaders,
                                 PanelData.Transformation[] transformations)
        Constructs a "within" fixed effects model from a panel of data.
        Parameters:
        panel - a panel of data
        yHeader - the header name of the dependent variables, the regressands
        XHeaders - the header names of the factors
        transformations - any transformation that may be applied to the data
      • FixedEffectsModel

        public FixedEffectsModel​(PanelData panel,
                                 String yHeader,
                                 String[] XHeaders)
        Constructs a "within" fixed effects model from a panel of data.
        Parameters:
        panel - a panel of data
        yHeader - the header name of the dependent variables, the regressands
        XHeaders - the header names of the factors
    • Method Detail

      • getLinearModel

        public LinearModel getLinearModel​(Object subject)
        Description copied from interface: PanelRegression
        Gets the linear model for a particular subject/individual.
        Specified by:
        getLinearModel in interface PanelRegression
        Parameters:
        subject - the subject
        Returns:
        the linear model for the subject
      • alpha

        public Map<Object,​Double> alpha()
        Gets the individual/subject specific terms.
        Returns:
        \(\alpha_i\)