저는 여러 기사에서 여러 가지 ROC 분석을 실시하고 있습니다. 따라서 샘플 크기가 적절한 지 조사하고 있습니다. ROC 분석을위한 가능한 샘플 크기의 모든 조합으로 구성된 데이터 프레임을 만들었습니다.R 기사에서 power.roc.test에 문제가 있습니다.
str(auc)
'data.frame': 93 obs. of 2 variables:
$ cases : int 10 11 12 13 14 15 16 17 18 19 ...
$ controls: int 102 101 100 99 98 97 96 95 94 93 ...
내 목표는 따라서 내가 AUC
최적의 계산 power.roc.test를 사용하는 제 3 변수를 만들고 싶습니다AUC
/컨트롤 (예. 카파)에 비해 최적의 선 그림 케이스를 만드는 것입니다나는 위의 문제에 달렸는데, 문제는 어디에 있는가?
auc$auc<-power.roc.test(sig.level=.05,power=.8,ncases=auc$cases,ncontrols=auc$controls)$auc
Error in value[[3L]](cond) : AUC could not be solved:
Error in uniroot(power.roc.test.optimize.auc.function, interval = c(0.5, : invalid function value in 'zeroin'
In addition: Warning messages:
1: In if (is.na(f.lower)) stop("f.lower = f(lower) is NA") :
the condition has length > 1 and only the first element will be used
2: In if (is.na(f.upper)) stop("f.upper = f(upper) is NA") :
the condition has length > 1 and only the first element will be used
3: In if (f.lower * f.upper > 0) stop("f() values at end points not of opposite sign") :
the condition has length > 1 and only the first element will be used