Dear professor Harrell, I probably have the same problem as Haleh Ghaem Maralani.
I am using the rms package and the rcspline.plot function to assess the relation of a continuous predictor to the log hazard function. I would like to use the "adj" statement, for example using this test dataset: http://r.789695.n4.nabble.com/file/n3058505/file.csv test <-read.csv("file.csv",header=TRUE) rcspline.plot(test$factor, test$Time,model="cox", adj=cbind(test$adj1, test$adj2), xrange=c(0,3),ylim=c(-1,2),event=test$event,nk=4,knots=c(0.8,1.0,1.5,2.0),showknots=TRUE,plotcl=FALSE,statloc="none",subset=test$SEX=="2",lty=2) Then I get the following Error. x -0.7860188 3.4871734 -4.6087226 -0.6761077 -0.9358280 [1] -3686.955 -3646.681 Error in pchisq(q, df, lower.tail, log.p) : Non-numeric argument to mathematical function Could you please help us understanding how to use the adj statement? Bart Ferket, MD, dept. Epidemiology, ErasmusMC Rotterdam -- View this message in context: http://r.789695.n4.nabble.com/rcspline-problem-tp3501627p4637039.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.