I am looking at the relationship of "outcome" and "variable", both of which are continuous. I have the following GLM model with a gamma distribution and a log link:
The graph of adjusted predictions is great, but I would also like to estimate a) values of outcome at various values of variable and b) the slope of the graph between knots. Essentially, is there a way to reproduce the code below, but with my splines?
Appreciate the help.
Code:
mkspline2 variable_knots= variable, cubic nknots(3) display glm outcome c.variable_knots* adjustrcspline
Code:
margins, at(variable=(0(0.1)2)) margins, dydx(variable)
Comment