Hi,
I want to perform a survival analysis and see how human capital affects the unemployment duration that is already calculated in the variable stime. The thing is I can't declare my data to be survival-time data because when I check the box saying "Multiple-record ID variable" they return with the error "weight not constant within id".
The code I am using is:
stset stime [pweight = wt], id(id) failure(died==1)
And here is how the data is structured:
wt id stime died
492.8779 1 8 0
567.14383 1 9 0
543.88678 1 10 0
202.29983 2 2 0
211.68756 2 4 0
154.00905 2 5 0
192.70173 3 4 0
384.57381 4 . 0
402.35655 4 . 0
447.8705 4 . 0
557.93722 4 10 0
What should I do?
Thanks
I want to perform a survival analysis and see how human capital affects the unemployment duration that is already calculated in the variable stime. The thing is I can't declare my data to be survival-time data because when I check the box saying "Multiple-record ID variable" they return with the error "weight not constant within id".
The code I am using is:
stset stime [pweight = wt], id(id) failure(died==1)
And here is how the data is structured:
wt id stime died
492.8779 1 8 0
567.14383 1 9 0
543.88678 1 10 0
202.29983 2 2 0
211.68756 2 4 0
154.00905 2 5 0
192.70173 3 4 0
384.57381 4 . 0
402.35655 4 . 0
447.8705 4 . 0
557.93722 4 10 0
What should I do?
Thanks
Comment