Hi Jo, Thanks for the e-mail, always good to see statistical modelling questions on this list!
In the mvabund package, you can fit trait models using different methods of estimation, method=”manyglm” will fit a GLM, “glm1path” will fit a GLM with a LASSO penalty (chosen using BIC by default but there are other options). The way we coded LASSO negative binomial regression was to update estimates of the overdispersion parameter as the slope parameters update. Because the LASSO fit gives different slope parameters, it will also have a different overdispersion parameter. It probably has a larger overdispersion parameter, because the LASSO pushes slope parameters away from the best (in-sample) fit hence there is more unexplained variation in the LASSO model. All the best David Professor David Warton School of Mathematics and Statistics, Evolution & Ecology Research Centre, Centre for Ecosystem Science UNSW Sydney NSW 2052 AUSTRALIA phone +61(2) 9385 7031 fax +61(2) 9385 7123 http://www.eco-stats.unsw.edu.au<http://www.eco-stats.unsw.edu.au/> From: Joanne Potts <joa...@theanalyticaledge.com> Sent: Friday, 30 November 2018 1:51 AM To: r-sig-ecology@r-project.org Cc: David Warton <david.war...@unsw.edu.au> Subject: mvabund: difference between 'glm1path' and 'manyglm' Hi David and list, Can someone please help me understand why, when changing the 'method=manyglm' argument to 'method=glm1path' under default settings (negative binomial) the estimates of theta change in the 'trait.glm' function? I have provided example code below us the antTraits data set. And you should see the plots for ft and ft3 are similar, yet ft2 is quite different, so I think I am missing something (no doubt, probably very obvious!). Advice appreciated, thank you. Jo data(antTraits) ft=traitglm(antTraits$abund,antTraits$env,antTraits$traits,method="manyglm") ft$phi ft$theta qqnorm(residuals(ft)); abline(c(0,1),col="red") ft2=traitglm(antTraits$abund,antTraits$env,antTraits$traits,method="glm1path") mean(ft2$phis) qqnorm(residuals(ft2)); abline(c(0,1),col="red") ft3=traitglm(antTraits$abund,antTraits$env,antTraits$traits,method="glm1path", negative.binomial(theta=1.641763)) 1/mean(ft3$phis) qqnorm(residuals(ft3)); abline(c(0,1),col="red") -- Kind regards, Joanne Potts ___________________ Statistical Consultant theanalyticaledge.com<http://theanalyticaledge.com> [[alternative HTML version deleted]] _______________________________________________ R-sig-ecology mailing list R-sig-ecology@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-ecology