I have used glmmkin function from GMMAT package to fit a logistic mixed model with the binary phenotype 'disease', one fixed variable 'PRS' and one kinship matrix 'GRM' to model the covariance structure of the random effects exactly like in this example:
glmmkin(disease ~ PRS, data = pheno, kins = GRM, id = "id", family = binomial(link = "logit"))
Now I would like to calculate a Nagelkerke pseudo r2 (with and without PRS for full and null model) to get the variance explained by the PRS. Most (if all) of the R packages for calculating pseudo r2 or log likelihood do not take a glmmkin object as input.
Update: I have found an answer to a similar question here
It is working for a standard glm model, but when I apply to my glmmkin it keeps on giving me NAs for deviance and -Inf for likelihood.