library(mgcv)
perf_no_size <-
gamm(performance ~ s(temp, bs = 'cs'),
random = list(id = ~ 1),
data = TtorquatusPerformance)
perf_size <-
gamm(performance ~ s(temp, bs = 'cs') + size,
random = list(id = ~ 1),
data = TtorquatusPerformance)
perf_functions <- get_predict(list(perf_s = perf_size,
perf_ns = perf_no_size),
type = "response")
perf_nsFUN <- perf_functions$perf_ns
perf_sFUN <- perf_functions$perf_s
perf_nsFUN(temp = 30)
perf_sFUN(temp = 30, size = 70)
perf_nsFUN(temp = 30:35)
perf_sFUN(temp = 30, size = 70:75)
perf_sFUN(temp = 30:35, size = 70:75)
Run the code above in your browser using DataLab