API
FamaMacBeth.adjr2 — Method.adjr2(m::FMBModel) -> Float64The adjusted R2.
FamaMacBeth.fmb — Method.fmb(X, y, g) -> FMBModel()Short-hand for fit(FMBModel(X,y,g))
FamaMacBeth.group — Method.group(m::FMBResp)
group(m::FMBModel)Returns the group labels used.
FamaMacBeth.nobs — Method.nobs(m::FMBModel) -> Vector{Int}Returns the number of observations, per group as identified by g. See also group(m::FMBResp).
FamaMacBeth.predict — Method.predict(m::FMBModel) -> Vector
predict(m::FMBModel, X) -> VectorPredicts the outcome using the estimated coefficients and provided independent variables. If independent variables are not provided, uses those from the model.
FamaMacBeth.r2 — Method.r2(m::FMBModel) -> Float64The un-adjusted R2.
FamaMacBeth.residuals — Method.residuals(m::FMBModel) -> VectorFamaMacBeth.tstat — Method.tstat(m::FMBModel) -> Vector
tstat(m::FMBModel) -> VectorThe t-statistic per coefficient whether the coefficient equals zero or not.
StatsBase.coef — Method.coef(m::FMBResp) -> Vector
coef(m::FMBModel) -> VectorThe estimated coefficients.
StatsBase.stderror — Method.stderror(m::FMBResp) -> Vector
stderror(m::FMBModel) -> VectorThe standard error around the estimated coefficients.
FamaMacBeth.FMBModel — Type.FMBModel(X,y,g,resp::FMBResp) <: StatsBase.RegressionModelFamaMacBeth.FMBModel — Method.FMBModel(X,y,g) -> FMBModel()FamaMacBeth.fit — Method.fit(m::FMBModel) -> FMBModel()Runs a Fama-MacBeth (1973) panel regression by first conducting OLS of y on X per group indicated by g, and subsequently computes the mean and standard error using the resulting coefficients. An intercept is not added to X.
FamaMacBeth.vcov — Method.vcov(m::FMBResp) -> Matrix
vcov(m::FMBModel) -> MatrixVariance-covariance matrix of the estimated coefficients.