data(trees, package = "datasets")
model <- glm(Volume ~ ., trees, family = Gamma(log))
# The output of stats::predict() might not be in the scale of the response variable
predict(model, trees[1:5, ])
# get.yhat() returns a numeric vector in the original scale of the response variable
get.yhat(model, trees[1:5, ])
predict(model, trees[1:5, ], type = "response")
Run the code above in your browser using DataLab