API

API

FamaMacBeth.adjr2Method.
adjr2(m::FMBModel) -> Float64

The adjusted R2.

source
FamaMacBeth.fmbMethod.
fmb(X, y, g) -> FMBModel()

Short-hand for fit(FMBModel(X,y,g))

source
FamaMacBeth.groupMethod.
group(m::FMBResp)
group(m::FMBModel)

Returns the group labels used.

source
FamaMacBeth.nobsMethod.
nobs(m::FMBModel) -> Vector{Int}

Returns the number of observations, per group as identified by g. See also group(m::FMBResp).

source
predict(m::FMBModel) -> Vector
predict(m::FMBModel, X) -> Vector

Predicts the outcome using the estimated coefficients and provided independent variables. If independent variables are not provided, uses those from the model.

source
FamaMacBeth.r2Method.
r2(m::FMBModel) -> Float64

The un-adjusted R2.

source
residuals(m::FMBModel) -> Vector
source
FamaMacBeth.tstatMethod.
tstat(m::FMBModel) -> Vector
tstat(m::FMBModel) -> Vector

The t-statistic per coefficient whether the coefficient equals zero or not.

source
StatsBase.coefMethod.
coef(m::FMBResp) -> Vector
coef(m::FMBModel) -> Vector

The estimated coefficients.

source
StatsBase.stderrorMethod.
stderror(m::FMBResp) -> Vector
stderror(m::FMBModel) -> Vector

The standard error around the estimated coefficients.

source
FMBModel(X,y,g,resp::FMBResp) <: StatsBase.RegressionModel
source
FMBModel(X,y,g) -> FMBModel()
source
FamaMacBeth.fitMethod.
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.

source
FamaMacBeth.vcovMethod.
vcov(m::FMBResp) -> Matrix
vcov(m::FMBModel) -> Matrix

Variance-covariance matrix of the estimated coefficients.

source