I want to build a saturated model in R for my logistic regression. I already tried the following code obtained from another question posted here (Logistic Regression : How to obtain a saturated model):
y = c(1,1,1,0,0,0)
a <- factor(1:length(y))
fit <- glm(y~a,family=binomial)
summary(fit)
But there is an error probably caused by the length of the y variable; it is too long to process in the above code and causes R to crash with the following error displayed "Error: cannot allocate vector of size 3.4 Gb".
Is there is any other way to build a saturated logistic regression model?
I want to build the saturated model to compare it latter with my model using a Wald Chi-square test as a goodness of fit test. I already have the Wald Chi-square test for the null versus my model.
Thank you