0
$\begingroup$

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.

Any suggestion?

Update: I have found an answer to a similar question here

https://www.develop-bugs.com/article/13497762/Calculating+logLik+by+hand+from+a+logistic+regression

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.