Skip to content

Is coef() method return the best estimated beta? #27

@TigerZhao007

Description

@TigerZhao007

First, thank you for the package! :)

In the Vignette, it is said that:
A formatted dataframe of the coefficient matrix of the final iteration of forecast evaluation can be obtained via the coef
method.

So it is NOT the best estimated beta under the best_lambda ?
To get the best estimated beta under the best_lambda, I have to run another BigVAR.fit() ? As code below:

library(BigVAR)
data(Y)
mod1<-constructModel(Y,p=4,"Basic",gran=c(150,10),h=1,cv="Rolling",verbose=FALSE,IC=TRUE,model.controls=list(intercept=TRUE))
results=cv.BigVAR(mod1)
best_lambda = results@OptimalLambda
coef1 = coef(results) # NOT the best

model2=BigVAR.fit(Y,p=4,"Basic",lambda=best_lambda,intercept=TRUE)
coef2 = model2[,,1] # best estimated beta under the best_lambda

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions