fg1<- crr(fu, exitus1, gfr, tdm, failcode=1, cencode=0)
summary(fg1)
我收到此错误,但我不明白为什么以及如何解决:
tf(uft)错误:缺少参数“ tf”,没有默认值
这是我的数据:
> 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
如果我仅用1个cov进行FG回归,则没有任何参数tf定义就不会得到任何错误:
fg1<- crr(fu, exitus1, gfr, failcode=1, cencode=0)
summary(fg1)
提前感谢您的帮助!