I measured air temperature in each hour of a day bellow the canopy of 10 trees and in 10 open areas close to the trees. Therefore, I have two regressions between hours of a day (predictor) and temperature (response). These relationships are not linear and resemble curves in the bell form. Now, I want to compare the slopes of both regressions. Can I use an ANCOVA to evaluate polynomial regressions and select the best model (p<0.05 and higher R²)? Like:
ancova_null_model = lm(response~1*category, data) ancova1 = lm(response~predictor*category, data) ancova2 = lm(response~poly(predictor, 2)*category, data) ancova3 = lm(response~poly(predictor, 3)*category, data) anova(ancova_null_model, ancova1, ancova2, ancova3) summary(ancova1)$r.squared summary(ancova2)$r.squared summary(ancova3)$r.squared
Or should I conduct two regressions and compare both slopes in another analysis? In this case, how can I compare both slopes of polynomial regressions in an analysis?