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

survtab_ag: uninformative error message with cif.obs #126

Open
mattirantanen opened this issue Dec 23, 2016 · 0 comments
Open

survtab_ag: uninformative error message with cif.obs #126

mattirantanen opened this issue Dec 23, 2016 · 0 comments
Assignees
Labels

Comments

@mattirantanen
Copy link
Collaborator

I tried to calculate cumulative risk, i.e. 1 - observed survival using the following code. As expected it didn't work since only one death cause was given in d, but the error message was not that informative.
I also suggest adding an example of cif.obs in the examples section of help page.

BL <- list(fot= seq(0,19,1/12), per=c(2008,2013))
sire2 <- sire[dg_date<ex_date, ]
sire2$statusf <- factor(sire2$status, levels = 0:2, 
                        labels = c("alive", "canD", "othD"))

x <- lexpand(sire2, 
             birth  = bi_date, entry = dg_date, exit = ex_date,
             status = statusf,
             breaks=BL, aggre = list(fot))
x
st <- survtab_ag(fot ~ 1, data = x, d = 'fromalivetocanD', surv.type="cif.obs")

The error message:

 Error in get(d.var) : object 'd.d' not found 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants