Discussion:
[R-sig-ME] spline representation
dani jones
2018-09-29 00:21:58 UTC
Permalink
Hello everyone,

I am working with a GAM model and I am trying to represent graphically the splines from my model.

I would like to be able to somehow highlight the portions of the splines in areas in which the confidence bands do not include the value of 0. Any help would be much appreciated.

Thanks! best regards,
Dani

[[alternative HTML version deleted]]
Jeff Newmiller
2018-09-29 04:32:46 UTC
Permalink
The general method (entirely independent of how you are doing the modeling, as long as you have figured out how to obtain the confidence intervals you wish to test) is to generate a grid of input points (e.g. expand.grid) and compute your predicted fit and corresponding lwr and upr limits. If you plot your fit points and use a vector of colors created by testing the lwr and upr values then the desired highlighting can be accomplished.

It is not clear how this actually relates to ME... posting your plotting code so far for a toy example in R-help might get you a more thorough response.

One complexity of ME is that it often has more than one dependent variable, so the details of how you are breaking those down into a plot even without the highlighting need to be clarified.
Post by dani jones
Hello everyone,
I am working with a GAM model and I am trying to represent graphically
the splines from my model.
I would like to be able to somehow highlight the portions of the
splines in areas in which the confidence bands do not include the value
of 0. Any help would be much appreciated.
Thanks! best regards,
Dani
[[alternative HTML version deleted]]
_______________________________________________
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
--
Sent from my phone. Please excuse my brevity.
Loading...