I would like to perform a CLAD regression with
I already found out that I need to use CRQ in the library QUANTREG, but I couldn't figure out the specifics so far. My questions are:
This is the code I tried but I keep getting the notification "Event times can not exceed ctimes for right censoring", because for patients with a utility score >0 and <1 the score is higher than the 0/1 yc variable which I created.
daten <- read.table ("P:/XXX.csv", header=TRUE, sep=";")
attach(daten)
x=cbind(factor(qlq) , AGE , SEX)
daten$c <- 1
daten$d <- ifelse (daten$UTILITY<1,0,1)
yc <- daten$d
y <- daten$UTILITY
clad <- crq (Curv(UTILITY, d, "right") ~ x, tau=0.5, method="Powell", data=daten)
Thank you in advance!
If anyone ever comes across the same obstacle: for every y, yc needs to be the value at which y is censored, not a 0/1 censoring indicator.
In my case (y=utility score of the EQ-5D-5L) yc needs to be 1.
The following command does the trick: daten$d <- rep(1.000,377) (because I have 377 observations)