0
fg1<- crr(fu, exitus1, gfr, tdm, failcode=1, cencode=0)
    summary(fg1)

I obtain this error and I don't understand why and how to fix it:

Error in tf(uft) : argument "tf" is missing, with no default

Here are my data:

> str(fu)
 num [1:87] 15 27 3 10 16 13 65 64 5 29 ...
> str(tdm)
 Factor w/ 2 levels "0","1": 2 2 1 2 2 2 2 2 2 2 ...
> str(gfr)
 Factor w/ 4 levels "1","2","3","4": 2 4 2 1 4 3 3 2 3 2 ...
> str(exitus1)
 Factor w/ 3 levels "0","1","2": 3 1 1 2 1 3 1 1 1 2 ...

> fu
[1]  15  27   3  10  16  13  65  64   5  29 103  72 121 162  22         139 149
[18] 144  26  38  24  19 196 212 215  12 293  48  22 284   2  31   2   5
[35] 319   4  11  15 305 366   5 388  32 386  34  15   4 436 431 436  12
[52] 488 493 489 486  10 516 530 496   7 529 533 586   5 611  13   5 616
[69] 625 596 674 653 646 204 669  20   7 683  20   6 691  34  55 571  41
[86]  50 117
> exitus1
 [1] 2 0 0 1 0 2 0 0 0 1 0 0 0 0 0 0 0 0 0 0 2 2 0 0 0 1 0 0 1 0 2 0 1 1
[35] 0 1 1 2 0 0 1 0 1 0 2 1 1 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 1 0 1 1 0
[69] 0 0 0 0 0 0 0 2 2 0 1 1 0 0 0 0 1 1 2
Levels: 0 1 2
> gfr
 [1] 2 4 2 1 4 3 3 2 3 2 2 4 3 2 4 4 3 3 2 1 2 3 3 1 3 2 3 2 1 2 2 2 1 1
[35] 2 3 1 3 4 3 3 1 2 2 1 3 2 3 2 1 2 3 3 1 1 1 2 1 2 4 3 3 1 1 1 4 3 1
[69] 4 3 3 3 3 1 3 3 1 2 2 1 4 3 2 1 3 3 3
Levels: 1 2 3 4
> tdm
 [1] 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 0 0 1 1
[35] 0 1 1 1 1 1 0 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
[69] 1 1 1 1 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1
Levels: 0 1

If I perform this FG regression with just 1 cov I don't obtain any error without any argument tf definition:

fg1<- crr(fu, exitus1, gfr, failcode=1, cencode=0)
summary(fg1)

Thank you in advance for your help!

ArTu
  • 431
  • 4
  • 20
  • Hi, could you please include features from https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example?rq=1, such as a minimal dataset? (You included a glimpse into the dataset, but still not enough to reproduce the code.) – wibeasley Jun 27 '18 at 16:04
  • Hi! I just edited the text, hope this can help. Thank you! – ArTu Jun 27 '18 at 19:54
  • It looks like you missed a few parts of that page that might be worth re-reading, especially the "Producing a minimal dataset" section and the "Copy your data" section. – wibeasley Jun 28 '18 at 00:24

0 Answers0