JenniNiku / gllvm

Generalized Linear Latent Variable Models
https://jenniniku.github.io/gllvm/
48 stars 19 forks source link

getFourthCorner function does not respect functions in formula #152

Closed BertvanderVeen closed 4 months ago

BertvanderVeen commented 4 months ago

The getFourthCorner function does not properly respect transformations or functions of covariates in the formula. For example:

library(gllvm)
data(spider)
model <- gllvm(spider$abund, X= spider$x, TR = spider$trait, formula = ~I(soil.dry^2)+I(soil.dry^2):marks, family = "poisson")
gllvm:::getFourthCorner(model)

returns an empty matrix of fourth corner coefficients.