I have the following example (which is in similar format to my data):
set.seed(1)
RandData <- runif(8760*2)
Locations <- rep(c('UK','France'),each=8760)
Date = seq(from=as.POSIXct("1991-01-01 00:00"),
to=as.POSIXct("1991-12-31 23:00"), length=8760)
Final <- data.frame(Loc = Locations,
Doy = as.numeric(format(Date,format = "%j")),
Tod = as.numeric(format(Date,format = "%H")),
Temp = RandData)
require(mgcv)
mod1 <- gam(Temp ~ Loc + s(Doy) + s(Doy,by = Loc) +
s(Tod) + s(Tod,by = Loc),data = Final)
plot(mod1,pages = 1, scale = 0)
From this model, the outcome which is plotted firstly shows the mean temperature variation as a function of day of year and then the amount that the temperature at each location varies from this mean. The the same is shown for the Time of day.
The problem with this is that the yaxis do not show the correct range of values i.e. the first plot does not show the mean temperature for these locations. How can the plots be altered to show (1) the mean temperature for both locations and (2) the temperature at each location compared to the mean instead of some arbitrary number.
If I haven't been clear in expressing my intentions let me know and I will try to provide a better example.