I'd used GAM to address spatial auto correlation and considered a smooth function only for location. I would like to know how I can calculate marginal effect of the smooth term
Asked
Active
Viewed 770 times
1
-
1Which package was used to fit the GAM? What do you mean by marginal effect? – Gavin Simpson Apr 14 '20 at 13:53
-
1Hi I am using "mgcv" package. Marginal effect is a measure of the instantaneous effect that a change in a particular explanatory variable has on the predicted probability of , when the other covariates are kept fixed. Since we can not infer from coefficient of the model, we use this to see how is the effect of each explanatory variable on independent variable. – Aryan Hosseinzadeh Apr 15 '20 at 03:02
-
1OK, and you want that marginal effect on the link scale or the response scale? `plot.gam()` will show you one form of the marginal effect on the link scale, and centred about the model constant term. `vis.gam()` will allow you to get the marginal effect for a variable holding others constant at some values, but on the response scale. If these are Gaussian models, you can also use the `shift` argument to `plot.gam()` to add on the model constant term (the intercept), to get things on the response scale. – Gavin Simpson Apr 17 '20 at 15:13