greetings i have some issues with my code, it gives me no output, am trying to run for each additional variable an ordinal regression and get the AIC but I have no value, thanks in advance for your help
library(MASS)
library(AICcmodavg)
AIC = numeric()
model_selection = function(matrix_baseline,matrix_selection){
matrix_selection = na.omit(matrix_selection)
matrix_baseline = na.omit(matrix_baseline)
for(i in 1:23){
#col_name <- matrix_selection[,i]
model <- polr(HV270 ~ HV10601 + HV115 + HV024 + HV025 + HV009 + HV220 + matrix_selection[,i] , weights = wt, data = matrix_baseline)
AIC[i] <- AICc(model)
}
return(AIC)
}