Closed nath2801 closed 1 year ago
I don't understand what you're asking. Gas and Brand are variables in the data set "freMTPL2freq". VehGas and VehBrand are not. You can't fit models on variables that don't exist, let alone plot them.
If there are extra steps you're not showing where these variables are created, no one can help you unless you supply a reproducible example.
Closing this issue since I never heard back from you.
Hi,
I have a little problem! I want to use the dataset "freMTPL2fre" from the package CASdatasets and I want to run this code...
m1 <- glm(ClaimNb ~ (offset(log(Exposure)))+ VehGas + VehBrand , data = freMTPLfre,family=poisson(link = log)) visreg(m1,"VehGas", type="contrast", scale="response", gg=TRUE, rug=FALSE, partial=FALSE) + theme_bw()
I have an error:
Erreur dans parse(text = c("cond=c(cond, list(", names(f)[j], "=factor(mode, levels=levels(f[, names(f)[j]]))))")) :