Tengo un resultado con la censura correcta como esta:
y<-c(rep(2.83,3),
     rep(3.17,4),
     rep(3.83,4),
     rep(4.17,5),
     rep(4.83,8),
     rep(5.5,3),
     rep(7.17,5),
     rep(8.17,7),
     rep(8.83,12),
     rep(9.5, 12),
     rep(9.83,17),
     rep(10.17,30),
     rep(10.50,100)) 
donde y=10.5están los valores correctos de censura. Luego, trataría de usar quantreg::crqpara ajustar un modelo de regresión cuantil censurado y comenzar con una variable de intervención binaria:
set.seed(123)
require(quantreg)
yc<-rep(10.5, length(y))
treat<-rbinom(length(y), 1, 0.5)
age<-as.integer(rnorm(length(y), 50, 2))
modelo1
fit1<-crq(Curv(y, yc, "right")~treat, taus=(1:4)/5, , method="Powell")
Error in solve.default(x[h, ]) : 
  Lapack routine dgesv: system is exactly singular: U[2,2] = 0
Error in crq.fit.pow(X, y, cen, tau = taus[i], weights, left = left, ...) : 
  Singular basic solution generated by 'start'
modelo2
fit2<-crq(Curv(y, yc, "right")~treat+age, taus=(1:4)/5)
Error in solve.default(x[h, ]) : 
  Lapack routine dgesv: system is exactly singular: U[2,2] = 0
Error in crq.fit.pow(X, y, cen, tau = taus[i], weights, left = left, ...) : 
  Singular basic solution generated by 'start'
¿Alguien aquí puede saber qué les pasa a las modelos? ¿Es por los lazos en y? ¿Hay una solución?
fuente
