-
Notifications
You must be signed in to change notification settings - Fork 10
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
Repeated measurements using relmatGlmer #5
Comments
Hi Melanie, I started to address this issue using data from the Now I remember that I faced this problem in the vignette by running Best, |
Hi Andrey, many thanks for the update. But pleas remember that I also need to include a relatedness/kinship matrix. So, need to work with relmatGlmer. Best, |
Hi Melanie, It should now work. I put some relevant R scripts here https://github.com/variani/lme4qtl/tree/master/misc/issues/05. Best, |
Hi Andrey, yes, it works fine. Thanks a lot! Best, |
Hi,
I am trying to analyse count data with relmatGlmer accounting for relatedness and repeated measurements. When including repeated measurements I get the error “nrow(Ztlist[[i]])%%ncol(Ztlist[[i]]) == 0 is not TRUE”.
When I transform the example data “dat40” into count data (trait1, trait2) relmatGlmer works (but outputs warnings). When I then add repeated measurements to the example data, relmatGlmer doesn’t work and outputs the same error as mentioned above.
Here is the code I run:
##########
library(lme4) # needed for
VarCorr
functionlibrary(lme4qtl)
data(dat40)
data.count <- read.table("data.count.txt", sep="\t")
data.count.repeat <- read.table("data.count.repeat.txt", sep="\t")
No repeated measurements (works):
relmatGlmer(cbind(trait1, trait2) ~ AGE + SEX + (1|FAMID) + (1|ID), data.count, relmat = list(ID = kin2), family = binomial)
relmatGlmer((trait1/(trait1+trait2)) ~ AGE + SEX + (1|FAMID) + (1|ID), data.count, weights=(trait1+trait2), relmat = list(ID = kin2), family = binomial)
Repeated measurements (does not work):
mod <- relmatGlmer(cbind(trait1, trait2) ~ AGE + SEX + (1|FAMID) + (1|ID), data.count.repeat, relmat = list(ID = kin2), family = binomial)
mod <- relmatGlmer((trait1/(trait1+trait2)) ~ AGE + SEX + (1|FAMID) + (1|ID), data.count.repeat, weights=(trait1+trait2), relmat = list(ID = kin2), family = binomial)
##########
Please find the input data attached. Any hint how to model data with relamtGlmer including repeated measurements would help me a lot!
Many thanks and best regards,
Melanie
data.count.repeat.txt
data.count.txt
The text was updated successfully, but these errors were encountered: