irf_minvar: use irf.nanmean instead of mean because time series can have NaNs