Thank you for providing an excellent package. When doing some simulations, I come across a problem.
The function stpm2 fails if there are no censored samples.
This is due to the lines
event <- eval(eventExpr, data)event <- event > min(event)
If the status variable is equal to 1 for all samples, all values of 'events' will be FALSE.
I think you have to check the class of the status variable (logical or numeric) and then create 'event' according to this.
Dear Mark
Thank you for providing an excellent package. When doing some simulations, I come across a problem. The function stpm2 fails if there are no censored samples.
This is due to the lines
event <- eval(eventExpr, data)
event <- event > min(event)
If the status variable is equal to 1 for all samples, all values of 'events' will be FALSE. I think you have to check the class of the status variable (logical or numeric) and then create 'event' according to this.Best, Lasse