2
Como incluir um termo de interação no GAM?
O código a seguir avalia a semelhança entre duas séries temporais: set.seed(10) RandData <- rnorm(8760*2) America <- rep(c('NewYork','Miami'),each=8760) Date = seq(from=as.POSIXct("1991-01-01 00:00"), to=as.POSIXct("1991-12-31 23:00"), length=8760) DatNew <- data.frame(Loc = America, Doy = as.numeric(format(Date,format = "%j")), Tod = as.numeric(format(Date,format = "%H")), Temp = RandData, DecTime = rep(seq(1, length(RandData)/2) / (length(RandData)/2), 2)) …