Hi. I'm analysing some fish biological traits with a gam in mgcv. After several tries, I got this model log(tle) = sexcolor + s(doy, bs = "cc", by = sexcolor) +log(tl)
sexcolor is a factor with 4 levels doy is "day of year", which is modeled as a smoother tl is "total length of the fish" The summary of this models is (only parametric coefficientes): Parametric coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -1.34237 0.42340 -3.170 0.001733 ** sexcolorSpotted males -0.04405 0.12568 -0.350 0.726309 sexcolorPlain females 0.30812 0.08191 3.762 0.000215 *** sexcolorSpotted females 0.18642 0.08018 2.325 0.020948 * log(tl) 3.42331 0.11608 29.490 < 2e-16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Is there any way to do post hoc test for categorical variables in the parametric part of the model? I mean, levels for sexcolor are being compared with the reference level ("Plain males"), so I see that "Spotted males", for example, are not different from "Plain males", whereas females (both Plain and Spotted) are significantly different from "Plain males". Now, I'd like to make multiple comparisons between other combination of levels, i.e., "Plain females" vs. "Spotted males", for example. Any suggestion? Thanks, David -- View this message in context: http://r.789695.n4.nabble.com/Post-hoc-tests-in-gam-mgcv-tp4648456.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.