Closed MarcRieraDominguez closed 9 months ago
Some software packages don't count the variance as a parameter, because it's present in all models. Here, could the BM variance be the parameter counted by phylolm
but not caper
? You didn't include the number of parameters output by each package; that would be useful.
Possibly! In their book on information theoretic methods, Brunham&Anderson (2002, p.63), state that in an ordinary least squares regresion, the variance must be counted in the number of estimated paramaters (together with intercept, slopes, etc). I don't know whether the same should apply to gls. As for the number of parameters per package, the lines of code are:
#but different number of estimated parameters
gls.list$caper$k
gls.list$phylolm$p
The correct number of parameters is 3 (intercept, slope, and variance). I think caper doesn't count variance.
I see, thank you! :)
Hello! I need some help interpreting the number of parameters fitted by phylolm().
In the example below, I have fitted a phylogenetic regression with Brownian motion, and a single continuous predictor. I would expect the number of parametrs to be two: intercept and slope. This is indeed the result I get with caper::pgls(). Instead, phylolm() estimates3 parameters. While the two packages yield models with the same coefficients (and same log-likelihood), they differ in number of estimated parameters, and therefore they differ in AIC and AICc.
Which parametrs is phylolm estimating? Why does it estimate an "extra" parameter compared to pgls::caper?
Thank you!