Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

offsets and weights don't work in v6.0-dev for glmSLMA (and therefore for the lmerSLMA functions too) #42

Open
tombisho opened this issue Feb 6, 2020 · 2 comments
Milestone

Comments

@tombisho
Copy link
Contributor

tombisho commented Feb 6, 2020

In v5.1 offsets and weights work as expected for glmSLMA

In v6.0-dev, the error is returned:

invalid type (closure) for variable '(offset)'

I believe this is related to the modification of line 167 onwards:

	if(!(is.null(offset)))
		{
		cbindtext.offset <- paste0("cbind(", offset,")")
		offset <- eval(parse(text=cbindtext.offset))
		}

where in v6.0 we have the addition of env = parent.frame()

I will attempt to figure out what is going on, because I don't have a good understanding of the workings of R environments with DSI. But I guess that the offset vector is in the 'wrong' environment to be accessed by the glm model...

@tombisho
Copy link
Contributor Author

tombisho commented Feb 6, 2020

An update. I actually think the problem is with having a variable called offset, which is actually a function in R. So R thinks you are trying to pass a function called offset, not a variable called offset. I think this will be fixed by changing the name of the variable (and probably do the same for weights too)

@StuartWheater
Copy link
Member

@tombisho, it this still an issue? If it is does it require addressing before release of v6.0?

@StuartWheater StuartWheater added this to the v6.4 milestone Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants