Error: coef/vcov not consistent with basis matrix. See help(crosspred) in interaction analysis in DLNM package
I am trying to do an interaction analysis using gnm in Distributed Lag Non-Linear Model (dlnm) library. My script works fine in its simple form with effect and crossbasis of exposure as well as with confounders, but when I try to factor in a new variable for an interaction analysis, it is showing : Error in crosspred(cb_pm25, model_pm25) :
coef/vcov not consistent with basis matrix. See help(crosspred).