Dear community,
I have a dataset with 38 participants that I want to prepare for survival analysis. My code is:
Yesterday it worked just fine, but today the code does not generate all necessary values. On the contrary, today I see this:
When browsing my data, I only see entrydatetime for 17 out of 38 missing participants, for all other participants the value displayed is ".", and exitdatetime10qPCR is "." for all 38 participants. This leads to all event times missing in stset and no observations in sts list.
How can I fix this?
Thank You,
Dorothea
I have a dataset with 38 participants that I want to prepare for survival analysis. My code is:
Code:
*** format entry and exit dates and times adequately gen double entrydatetime= Clock(entrydate+" "+entrytime, "DMYhm") gen double exitdatetime10qPCR= Clock(exitdate10qPCR+" "+exittime10qPCR, "DMYhm") format entrydatetime %tcDD/NN/CCYY_HH:MM format exitdatetime10qPCR %tcDD/NN/CCYY_HH:MM destring censored10qPCR, replace *** prepare data for suvival analysis stset exitdatetime10qPCR, enter(entrydatetime) origin(entrydatetime) failure(censored10qPCR) gen diff=exitdatetime10qPCR-entrydatetime sts list
Code:
. gen double entrydatetime= Clock(entrydate+" "+entrytime, "DMYhm") (21 missing values generated) . . gen double exitdatetime10qPCR= Clock(exitdate10qPCR+" "+exittime10qPCR, "DMYhm") (38 missing values generated)
How can I fix this?
Thank You,
Dorothea

Comment