You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a problem of incompatibility between rms and Rcmdr. When I use rms::lrm without Rcmdr everything is fine.
However, when I loaded Rcmdr I got the following error: Error in X[, mmcolnames, drop = FALSE] : subscript out of bounds.
I use R 4.3.2 and R Studio2023.09.1 Build 494. Reproducible example follows:
Hi Miloš - I was able to take a look at this. The "Rcmdr" package changes some R options which eventually leads to the error (by renaming columns in model.matrix.default).
I found a problem of incompatibility between rms and Rcmdr. When I use rms::lrm without Rcmdr everything is fine.
However, when I loaded Rcmdr I got the following error: Error in X[, mmcolnames, drop = FALSE] : subscript out of bounds.
I use R 4.3.2 and R Studio2023.09.1 Build 494. Reproducible example follows:
library(rms)
n <- 1000 # define sample size
age <- rnorm(n, 50, 10)
blood.pressure <- rnorm(n, 120, 15)
cholesterol <- rnorm(n, 200, 25)
sex <- factor(sample(c('female','male'), n,TRUE))
diseased <- factor(sample(c('Healty','Sick'), n,TRUE))
f <- lrm(diseased ~ age + sex + cholesterol) ##this works
f
library(Rcmdr, warn.conflicts=TRUE, verbose = TRUE)
f <- lrm(diseased ~ age + sex + cholesterol) ##This does not work
f
Thank you
Miloš Žarković
The text was updated successfully, but these errors were encountered: