Hi everyone, I have been trying to use the "lrm command" from the "rms package" to do logistic regression with clustered robust standard errors and report the results in APA format using the apa.reg.table command. But I get this error message: "Error in 2:last_model_number_predictors : argument of length 0". Can someone help me with diagnosing it?
Code in R Markdown:
fit1 <- lrm(recall ~ Population+NoComplaintsReported+NoInjuryIncidentsReported+NoCrashesFiresReported+NoInjuriesReported,x=TRUE, y=TRUE, data=df_clean)
Model1 <- robcov(fit1, cluster=df_clean$label)
My code creates both the fit1 and Model1 objects, and I get the error when during the apa.reg.table command. I installed the library(apaTables) today.