私の記事では、いくつかの異なる ROC 分析を分析しています。したがって、サンプルサイズが適切かどうかを調査しています。ROC 分析の可能なサンプル サイズのすべての組み合わせで構成されるデータ フレームを作成しました。
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