I have a multivariable negative binomial model in R for which I want to combine two variables:
- var1: binary variable (no/yes)
- var2: continuous variable (0-3)
I want to calculate confidence intervals for the combinations of:
- var1 + var2
- var1 + 2*var2
- var1 + 3*var2
I’ve read somewhere that the variance for the first combination can be calculated as variance(var1) + variance(var2) + 2*covariance(var1, var2).
Does anyone know whether this is correct and how to obtain the variances (and confidence intervals) for the other combinations? Thank you in advance!
femkev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.