library(mkatr)
### simulate outcomes
X = matrix(rnorm(10000), 5000,2)
D = rbinom(5000,1,0.5)
G = matrix(rbinom(100000,2,0.01), 5000,10)
### SKATL and SKATOL tests
SKATL(KAT.null(D,X), G, c(1.5,25.5))
SKATOL(KAT.null(D,X), G, c(1.5,25.5))
### compared to SKAT package
## library(SKAT)
## SKAT(G, SKAT_Null_Model(D ~ X, out_type="D"))$p.value
## SKAT(G, SKAT_Null_Model(D ~ X, out_type="D"), method="optimal.adj")$p.value
r
library(mkatr)
R = cor(matrix(rnorm(500),100,5)*sqrt(0.8)+rnorm(100)*sqrt(0.2))
Z0 = rnorm(5)
sats(Z0,R)
Z = Z0 + c(2,3,-1,2,-3)
sats(Z,R)
Z = Z0 + c(2,3,4,2,3)
sats(Z,R)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.