-
-
Notifications
You must be signed in to change notification settings - Fork 40
Closed
Labels
Bug 🐛Something isn't workingSomething isn't working
Description
library(caper)
#> Loading required package: ape
#> Loading required package: MASS
#> Loading required package: mvtnorm
library(phylolm)
library(MuMIn)
#> Registered S3 methods overwritten by 'MuMIn':
#> method from
#> nobs.pgls caper
#> nobs.phylolm phylolm
#> logLik.phylolm phylolm
set.seed(123456)
tre = rcoal(60)
taxa = sort(tre$tip.label)
b0=0; b1=1;
x <- rTrait(n=1, phy=tre,model="BM",
parameters=list(ancestral.state=0,sigma2=10))
y <- b0 + b1*x +
rTrait(n=1,phy=tre,model="lambda",parameters=list(
ancestral.state=0,sigma2=1,lambda=0.5))
dat <- data.frame(trait=y[taxa],pred=x[taxa])
mod <- phylolm(trait~pred,data=dat,phy=tre,model="lambda")
## Model average
options(na.action = "na.fail")
mod.d <- MuMIn::dredge(mod, rank = "AICc")
#> Fixed term is "(Intercept)"
mod.avg.fit <- MuMIn::model.avg(mod.d, revised.var = TRUE, fit = TRUE)
parameters::model_parameters(mod.avg.fit)
#> Error in s[, 5]: subscript out of boundsCreated on 2024-11-26 with reprex v2.1.1
Metadata
Metadata
Assignees
Labels
Bug 🐛Something isn't workingSomething isn't working