Class FixedEffectsModel
- java.lang.Object
-
- dev.nm.stat.regression.linear.panel.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:
- Wikipedia: Fixed effects model
- Frees, E. W., Longitudinal and Panel Data: Analysis and Applications in the Social Sciences, 2004
-
-
Constructor Summary
Constructors Constructor Description FixedEffectsModel(PanelData panel, String yHeader, String[] XHeaders)
Constructs a "within" fixed effects model from a panel of data.FixedEffectsModel(PanelData panel, String yHeader, String[] XHeaders, PanelData.Transformation[] transformations)
Constructs a "within" fixed effects model from a panel of data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<Object,Double>
alpha()
Gets the individual/subject specific terms.LinearModel
getLinearModel(Object subject)
Gets the linear model for a particular subject/individual.
-
-
-
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 datayHeader
- the header name of the dependent variables, the regressandsXHeaders
- the header names of the factorstransformations
- 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 datayHeader
- the header name of the dependent variables, the regressandsXHeaders
- 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 interfacePanelRegression
- Parameters:
subject
- the subject- Returns:
- the linear model for the subject
-
-