I have tried to run a mixed model in R as such
result < lme(sleep ~ Age + BMI + Family_Type + Bedroom_Darkness + Race + Air_Condition + Bedroom_Sound, random = ~ Date_value | user_id, data = df)
but i get an error
Error in lme.formula(sleep ~ Age + BMI + Family_Type + Bedroom_Darkness + :
nlminb problem, convergence error code = 1
message = iteration limit reached without convergence (10)
So I wish to test for collinearity, so I put my predictor variables in a data frame which looks like (but with hundreds or rows)
Bedroom_Darkness Family_Type Air_Condition Bedroom_Sound Race BMI Age
Medium Dark (without eye mask) Married and No Child Yes Quiet Others 23.80540 41
Medium Dark (without eye mask) Married and No Child Yes Quiet Indian 20.66116 52
Medium Dark (with eye mask) Single No Quiet Chinese 21.35921 31
but when i run the vif function from the usda package
vif(df_predictors)
I get
Variables VIF
1 Bedroom_Darkness NA
2 Family_Type NA
3 Air_Condition NA
4 Bedroom_Sound NA
5 Race NA
6 BMI 1.267998
7 Age 3.170107
So how can i get the VIF for the categorical variables?