Closed jijitoutou closed 3 months ago
The same error occurs when using other models, such as "cph" (cox).
This paper mentioned that they got it through applying another package. http://dx.doi.org/10.21037/atm.2017.07.27. However, I do not know whether it is specifically applicable to competing events using Cox regression. It would be interesting to the results of other's attempt.
This is a version mismatch between rms
and R
; I should have required a newer version of R for the latest rms
on CRAN. Please update R and make sure you have the latest rms
.
Many thanks Professor Harrell for your suggestion.
I never think that I need to do something complicated to use your packages. I am a bit jealous that one can publish by doing just that. I do have a new version of R at my work. At home, I use Chromebook. Sometimes, the R facilities are (or the linux version is) a bit lagging behind. I just feel sad that I cannot use the facility. I am running out of time to follow that paper to get the diagram. Especially, not many people understand it. I just accept imperfection :(.
Sandro
I use the example provided by this pacakge: `n <- 1000 # define sample size set.seed(17) # so can reproduce the results d <- data.frame(age = rnorm(n, 50, 10), blood.pressure = rnorm(n, 120, 15), cholesterol = rnorm(n, 200, 25), sex = factor(sample(c('female','male'), n,TRUE)))
Specify population model for log odds that Y=1
Simulate binary y to have Prob(y=1) = 1/[1+exp(-L)]
d <- upData(d, L = .4(sex=='male') + .045(age-50) + (log(cholesterol - 10)-5.2)(-2(sex=='female') + 2*(sex=='male')), y = ifelse(runif(n) < plogis(L), 1, 0))
ddist <- datadist(d); options(datadist='ddist')
f <- lrm(y ~ lsp(age,50) + sex * rcs(cholesterol, 4) + blood.pressure, data=d) nom <- nomogram(f, fun=function(x)1/(1+exp(-x)), # or fun=plogis fun.at=c(.001,.01,.05,seq(.1,.9,by=.1),.95,.99,.999), funlabel="Risk of Death")`
Error: Here is the translation:
Error in reformulate(attr(termobj, "term.labels")[-dropx], response = if (keep.response) termobj[[2L]], : 'termlabels' must be a byte vector of length at least one.
Could you update this package to solve this issue? Thank you!