Skip to content

Conversation

@sarahlotspeich
Copy link

No description provided.

@andrewraim
Copy link
Collaborator

It looks like vignette fails to build. (I am using the latest code on the master branch from https://github.com/sarahlotspeich/COMPoissonReg). I think the issue is related to the following snippet.

library(COMPoissonReg)
data(freight)

y = freight$broken
X = model.matrix(~ transfers, data = freight)
S = model.matrix(~ 1, data = freight)
offs = get.offset(x = rep(13, nrow(freight)), s = rep(1, nrow(freight)))
cmp.raw.out = glm.cmp.raw(y, X, S, offset = offs)

The output is:

Error in fit.zicmp.reg(y, X, S, W, init, offset, weights, fixed, control) :
  n == length(weights) is not TRUE

It looks like the default weights don't get set if the functions glm.cmp.raw and glm.zicmp.raw get called directly by the user.

You should be able to reproduce the error by running the snippet without building the vignette. But you want to try to build the vignette yourself, you can use the following command.

devtools::build_vignettes()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants