I am analyzing survey data that has dependent variable in the form of a binary variable (0 or 1) with 10 predictors and all are ordinal (scale 1 to 5, Strongly disagree-1, Disagree-2, Neither agree nor disagree-3, Agree-4, Strongly agree-5).
My objective is to find relative importance of these predictors in driving the binary dependent variable. I am using R to achieve this.
I have tried using ‘relaimpo’ package provided by R. Using the function
model1_raw <- calc.relimp(data, type ="genizi")
Where I have converted my Dependent variable using
as.factor (data$dependent)
and have used ordered factors for my independent variables using
ordered(data$predictor1, levels=1:5)
But I am getting the following error massage (I do not have any NA value in my dataframe)
Error in cov.wt(y, wt = wt) : 'x' must contain finite values only
Along with following warning massages
Warning messages:
1: In model.response(mf, "numeric") :
using type = "numeric" with a factor response will be ignored
2: In Ops.factor(y, z$residuals) : ‘-’ not meaningful for factors
My question is, Is it possible to get the results using the library ‘relaimpo’. If not what other methods, I can use to get the ‘relative importance of the predictors’