How to conduct the VAR model considering robust standard error. Give me the formula in…
- User
How to conduct the VAR model considering robust standard error. Give me the formula in STATA. I have 3 time series variables RET_SI RET_OP and RET_ER.
- Assistant
To conduct a Vector Autoregression (VAR) model with robust standard errors in Stata, follow these steps:
First, you need to create lagged variables for your time series data. You can use the "varsoc" command to determine the optimal lag length for your VAR model. Replace "lag" with the appropriate lag length based on your data.
varsoc RET_SI RET_OP RET_ER, maxlag(lag)Once you determine the optimal lag length, create the lagged variables using the "gen" command:
gen RET_SI_l = L(1/1).RET_SI gen RET_OP_l = L(1/1).RET_OP gen RET_ER_l = L(1/1).RET_ERNow you can estimate the VAR model with the "var" command, using the "vce(robust)" option to request robust standard errors:
var RET_SI RET_OP RET_ER, lags(1/1) vce(robust)If you would like to see the results with robust standard errors, use the "estat" command:
estat vceThis will give you the coefficients, standard errors, z-statistics, and p-values for the VAR model with robust standard errors.