Hi Mary,
1) It is possible, but you need to read SKAT source code (SKAT_Null_Model and Get_SKAT_Residuals.logistic functions) to figure out the elements in SKAT_Null_Model outcomes.
pi_1 = mu * (1 - mu), where mu is a vector of estimated mean of Y (mu = Prob(Y=1)). In Get_SKAT_Residuals.logistic function you can find
mod = lm(formula, data)
X1 <- model.matrix(formula, data = data)
glmfit = glm(formula, data = data, family = "binomial")
betas = glmfit$coef
mu = glmfit$fitted.values
eta = glmfit$linear.predictors
n.case = sum(glmfit$y)
pi_1 = mu * (1 - mu)
res = glmfit$y - mu
2) Have you checked whether your covariates matrix is singular? X1 is a covariates matrix (with the intercept), and the error shows that X1^T Pi X1 is singular, where
Pi is a diagonal matrix of pi_1.
Thanks,
Shawn