Skip to content
Prev 31568 / 63424 Next

length 1 offset in glm (& lm)

Hi

Quoting Prof Brian Ripley <ripley at stats.ox.ac.uk>:
It occurs for both

c1 <- structure(list(Contr = c(0.028, 0.043, 0.064, 0.097, 0.146, 0.219
), Correct = c(34L, 57L, 94L, 152L, 160L, 160L), Incorrect = c(126L,
103L, 66L, 8L, 0L, 0L)), .Names = c("Contr", "Correct", "Incorrect"
), row.names = c(NA, 6L), class = "data.frame")

glm(cbind(Correct, Incorrect) ~ Contr + offset(qlogis(0.25)) - 1, binomial,
	data = c1)
Error in model.frame.default(formula = cbind(Correct, Incorrect) ~ Contr +  :
   variable lengths differ (found for 'offset(qlogis(0.25))')
+

Thanks for looking into this when time permits.

Ken

--- remaining deleted