0

I am using the following code to model how a one-inflated response correlates with treatment (categorical). I would like to get a post-hoc pairwise comparison of the treatments. There is a "contrasts" call in the gamlss model function, but I have no clue what is supposed to go there and cannot find any examples.

propfertmodel <- gamlss(propfert~Trx, data = only_eggs, family = BEINF)

In the gamlss model, I did try contrasts = "Trx". I received this error, "Error in model.matrix.default(mu.terms, mu.frame, contrasts) : object 'Trx' not found"

I also tried contrasts = "pairwise". I got this error, Warning messages: 1: In model.matrix.default(mu.terms, mu.frame, contrasts) : non-list contrasts argument ignored 2: In model.matrix.default(sigma.terms, sigma.frame, contrasts) : non-list contrasts argument ignored 3: In model.matrix.default(form.nu, nu.frame, contrasts) : non-list contrasts argument ignored 4: In model.matrix.default(form.tau, tau.frame, contrasts) : non-list contrasts argument ignored

Finally, I tried contrasts = c("C", "H", "L", "T") and got this error: Warning messages: 1: In model.matrix.default(mu.terms, mu.frame, contrasts) : non-list contrasts argument ignored 2: In model.matrix.default(sigma.terms, sigma.frame, contrasts) : non-list contrasts argument ignored 3: In model.matrix.default(form.nu, nu.frame, contrasts) : non-list contrasts argument ignored 4: In model.matrix.default(form.tau, tau.frame, contrasts) : non-list contrasts argument ignored

Jenn
  • 11
  • 1

0 Answers0