Log transformation in GLM and model fit For a negative binomial GLM, are we allowed to write the log transformation in the following way?
library(MASS)
nb.fit <- glm.nb(y~log(X1)+log(X2)+X3+X4+log(X5),maxit=1000, data=df)
chisq.p.value <- pchisq(deviance(nb.fit ), df.residual(nb.fit), lower = F)
chisq.p.value

Here X3 and X4 have pretty low values compared to X1, X2, and X5. Y is a count response with extremely high variance with no zero responses. How can I check that my model fits the data well?
Since chisq.p.value = 0.22078 (p> 0.05), can we say our model fits the data well?
 A: Your initial question is ambiguous.  I think you are asking if using the log within the model formula replicates the link function.  If so, the answer is no.  The link function (which in this case is the log) is a transformation of the predicted mean, not of your covariates.  Although written in a different context, it may be helpful to read my answer to: Difference between logit and probit models.  You might also be asking if it is allowed to use transformations, or logarithmic transformations specifically, of predictor variables.  If so, the answer is yes, there is no problem with using logs of X's.  Regarding their interpretations, you may want to read: Interpretation of log transformed predictor and/or response.  Lastly, if you are asking if R allows you to use the log() function within the formula argument to a standard model function, the answer is also yes (after all, you just did it and it worked).
You cannot compare the raw values of the estimated coefficients for untransformed and log transformed variables.  They don't mean the same thing (see link above).  In addition, you shouldn't generally compare coefficients for different variables, as they are usually in incommensurate units.
Finally, the test you conduct manually at the end is not a test of goodness of fit in the sense you are thinking.  Instead, it is a test of the model as a whole (see: Test GLM model using null and model deviances).  The fact that it isn't significant implies your model doesn't have much information about the response.  (That doesn't mean it's a bad fit, though!)  To test goodness of fit, you need to compare the fitted model to the saturated model (cf., Test logistic regression model using residual deviance and degrees of freedom).  But in general, I think the best way to assess fit is to plot your data with the model and a LOWESS fit overlaid, and see how they compare.
