I'm trying to impute missing values in my dataset using MICE. I have a dataset consisting of 116 obs. of 134 variables. My dataset contains numerical, categorical and binary data. All variables with more than 50% missing data have been dropped. I used the quickpred function to select the predictors. However, I keep getting an error:
Error in solve.default(xtx + diag(pen)):
system is computationally singular: reciprocal condition number = 1.77279e-16
This is the code I use
inlist <- c("r_age", "r_sex")
exlist <- c("studysubjectid", "studyid")
pred_matrix <- quickpred(dataset, minpuc = 0.5, include = inlist, exclude = exlist)
imputed_data <- mice(dataset, m = 20, maxit = 20, pred = pred_matrix, printFlag = FALSE, seed=1234)
I have tried using different values for mincor and minpuc, however the results do not change. How can I solve this?