Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

survmean: uninformative error #129

Open
WetRobot opened this issue Mar 9, 2017 · 0 comments
Open

survmean: uninformative error #129

WetRobot opened this issue Mar 9, 2017 · 0 comments
Assignees

Comments

@WetRobot
Copy link
Collaborator

WetRobot commented Mar 9, 2017

When survival curve estimation fails and consequently a test fails within survmean, this is what the user sees:

The total person-time was zero in some survival intervals, when summed to the variable(s) 'sexaGwHW68X5m', 'agegrsBcfXLlUQx' (i.e. over all other variables, if any) _non-consecutively_, i.e. some intervals after an empty interval had person-time in them. Keeping all survival intervals with some estimates as NA for inspection.
Some cumulative surv.obs were zero or NA:
   sexaGwHW68X5m agegrsBcfXLlUQx first.bad.surv.int last.bad.surv.int surv.obs
1:             0          [0,50)                 34               108      NaN
2:             0         [50,60)                 15               108      NaN
3:             0         [60,70)                 68               108      NaN
4:             0        [70,Inf)                 44               108      NaN
5:             1         [50,60)                 23               108      NaN
6:             1         [60,70)                 22               108      NaN
7:             1        [70,Inf)                 75               108      NaN
Error in if (any(mi$surv > 1)) { : missing value where TRUE/FALSE needed

At the very least if (any(mi$surv > 1)) should be robust for NA values. Much more preferably
survmean should either fail when there are NA values (with human-readable error msg) or automatically try to adapt to the situation (remove all unusable estimates, shift extrapolation to start earlier).

@WetRobot WetRobot self-assigned this Mar 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant