hanchenphd / GMMAT

Generalized linear Mixed Model Association Tests
Other
36 stars 22 forks source link

Relationship matrix #63

Closed RoniHaas closed 1 month ago

RoniHaas commented 1 month ago

Hi, and thank you for the valuable tool.

Could you please provide more details on how to create a Kinn matrix that meets the requirements of the glmmkin function? A simple example would be very helpful. I keep encountering the error:Error in asMethod(object) : the matrix is not triangular, even though I used the upper.tri function to create a triangular matrix.

hanchenphd commented 1 month ago

See Section 4.2 of the user manual.

RoniHaas commented 1 month ago

Thank you for your reply. I’ve reviewed the information, but I believe my matrix still isn't in the correct format.

I used GCTA to obtain a GRM matrix. Should it look like this?

                  Id1       Id2             Id3
Id1               1         0.25           0.01
Id2               0          1               0.1
Id3               0          0                1

2) Should I expect 1s on the diagonal?

3) For the empty half of the matrix, should I fill it with 0s or NA?

To be honest, I’ve tried various options, but my run is still failing.

hanchenphd commented 1 month ago

No, it has to be a symmetric matrix. Quoted from Section 4.2 of the user manual: "All matrices must be positive semi-definite."

RoniHaas commented 1 month ago

Thank you, the error disappeared when I updated my R version. I appreciate your help!