AFSC-Shellfish-Assessment-Program / boreal-opie

0 stars 0 forks source link

Add "partial residuals" to Fig 1e #20

Open mikelitzow opened 7 months ago

mikelitzow commented 7 months ago

https://github.com/AFSC-Shellfish-Assessment-Program/boreal-opie/blob/53453d4f165b36eb04149469df1afa7b69af426a/Scripts/Figs.R#L154

Can you help with adding partial residuals to this plot - i.e., the residuals for the borealization effects when other covariates are accounted for? I'm looking for something like this (from the mgcv version of the model):

image

szuwalski commented 7 months ago

Try this:

plot(your_mod,pages=1,resid=T,cex=3)

edit: oh wait, you want it not from mgcv...nvm!

mikelitzow commented 7 months ago

Appreciate the try!

michaelmalick commented 7 months ago

As an alternative to partial residuals (which are not really possible for our current plot), we could add points for the raw data and predicted values with the borealization index term removed. I have implemented this in the part-resid branch.