Open jkropko opened 3 years ago
Hi, jkropko, a couple of months ago, I got the same problem, and I had reviewed the source code to locate where the problem was. Please refer to the first issue, I hope the author to provide some possible soulution. Thanks a lot.
Dear Mr. Harden, dear Mr. Kropko
I am working with your command sim.survdata( ) from the coxed package in R. I have just encountered a strange error involving the command mutate( ). You could find my code and the error message below.
It seems that sim.survdata does not work when I want to consider only one regressor with time-varying coefficients.
Do you have an idea how to fix this?
In any case, thank you for writing the command, it helps a lot.
R Code
simdata <- sim.survdata(N=100, T=100, type="tvbeta", xvars=1, beta=as.matrix(rnorm(50,0,1)), num.data.frames=1)
Error Message
Error: Problem with
mutate()
inputy
. x Inputy
can't be recycled to size 100. i Inputy
islifetimes
. i Inputy
must be size 100 or 1, not 5000. Runrlang::last_error()
to see where the error occurred.