Hello Statalist
I get an error when trying to run the command stcrprep. I attached the log-file with the trace set on. The initial stset code is also included. Unfortunately the data exist on an external server, thus it is not possible to attach the entire dataset.
My code is:
. stset a_timevar, failure(event==1,2) id(id) enter(a_entrydate)
id: id
failure event: event == 1 2
obs. time interval: (a_timevar[_n-1], a_timevar]
enter on or after: time a_entrydate
exit on or before: failure
------------------------------------------------------------------------------
1,122,929 total observations
0 exclusions
------------------------------------------------------------------------------
1,122,929 observations remaining, representing
1,122,929 subjects
173,850 failures in single-failure-per-subject data
3,286,722 total analysis time at risk and under observation
at risk from t = 0
earliest observed entry t = 1.333333
last observed exit t = 5
. set trace on
. stcrprep, events(event) trans(1)
And the error message is the following:
- mata H_to_t()
H_to_t(): 3301 subscript invalid
<istmt>: - function returned error
Does anyone know a way to prevent this error from occurring? It is not obvious to me why a subscript (row or column) would be out of bounds.
Thank you in advance
Respectfully,
Andreas Jensen
I get an error when trying to run the command stcrprep. I attached the log-file with the trace set on. The initial stset code is also included. Unfortunately the data exist on an external server, thus it is not possible to attach the entire dataset.
My code is:
. stset a_timevar, failure(event==1,2) id(id) enter(a_entrydate)
id: id
failure event: event == 1 2
obs. time interval: (a_timevar[_n-1], a_timevar]
enter on or after: time a_entrydate
exit on or before: failure
------------------------------------------------------------------------------
1,122,929 total observations
0 exclusions
------------------------------------------------------------------------------
1,122,929 observations remaining, representing
1,122,929 subjects
173,850 failures in single-failure-per-subject data
3,286,722 total analysis time at risk and under observation
at risk from t = 0
earliest observed entry t = 1.333333
last observed exit t = 5
. set trace on
. stcrprep, events(event) trans(1)
And the error message is the following:
- mata H_to_t()
H_to_t(): 3301 subscript invalid
<istmt>: - function returned error
Does anyone know a way to prevent this error from occurring? It is not obvious to me why a subscript (row or column) would be out of bounds.
Thank you in advance
Respectfully,
Andreas Jensen
Comment