Evaluates the fitted inflation probability/probabilities and continuous
mean of a bic_fit() object with the treatment variable set to a fixed
counterfactual value a for every row of newdata, using the fitted
coefficients and the model's own design matrices directly (not
predict.gamlss(..., newdata=), which re-resolves its stored data
argument by name in the calling frame and silently returns the wrong
frame when the fit was produced inside a function; see Ospina (2026),
Section 4).
Arguments
- fit
A fitted model from
bic_fit().- treat
Character, the name of the treatment variable in
newdata.- newdata
A data frame with
treatand all other covariates used byfit.- a
The counterfactual value to substitute for
treat(0or1).
