Error message: Application of the irf function to a SVAR-model (time series analysis)

I estimated a structural autoregressive model with the following R commands:

#estimate VAR-model
var=VAR(dat, p=2)
#define A and B matrix
#estimate SVAR-model
svar=SVAR(x, Amat = A, Bmat = B)

When I try to calculate the impulse response functions with the R command:
the following error message appears:

Error in diag<-(*tmp*, value = 1) :
only matrix diagonals can be replaced

Can someone explain the error message to me?
How do I apply the irf function to a svar model?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.