ROCnp2(emplik)
ROCnp2()所属R语言包:emplik
Test the ROC curve by Empirical Likelihood
测试的ROC曲线的经验似然
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Use empirical likelihood ratio to test the hypothesis Ho: (1-b0)th quantile of sample 1 = (1-t0)th quantile of sample 2. This is the same as testing Ho: R(t0)= b0, where R(.) is the ROC curve.
使用经验似然比检验这一假设何:个位数的样品1(1-B0)=(1-T0)个位数的样品2。这是相同的如测试何:R(t0)的=β0,其中R(。)的ROC曲线。
The log empirical likelihood been maximized is
数经验似然被最大化
This empirical likelihood ratio has a chi square limit under Ho.
经验似然比卡方限额何。
用法----------Usage----------
ROCnp2(t1, d1, t2, d2, b0, t0)
参数----------Arguments----------
参数:t1
a vector of length n. Observed times, may be right censored.
长度为n的一个向量。观察倍,可能是正确的审查。
参数:d1
a vector of length n, censoring status. d=1 means t is uncensored; d=0 means t is right censored.
长度为n的向量,审查状态。 D = 1表示t是未经审查,D = 0,t是正确的审查。
参数:t2
a vector of length m. Observed times, may be right censored.
长度为m的一个向量。观察倍,可能是正确的审查。
参数:d2
a vector of length m, censoring status.
长度为m的向量,审查状态。
参数:b0
a scalar between 0 and 1.
介于0和1之间的一个标量。
参数:t0
a scalar, betwenn 0 and 1.
一个标量,0和1 betwenn。
Details
详细信息----------Details----------
First, we test (1-b0)th quantile of sample 1 = c and also test (1-t0)th quantile of sample 2 = c. This way we obtain two log likelihood ratios.
首先,我们测试的第(1-b0的)位数的样品1 = c和试验的第(1-t0)的分位数的样品2 =角这样我们得到两个对数似然比。
Then we minimize the sum of the two log likelihood ratios over c.
然后,我们尽量减少在c上方的两个对数似然比的总和。
This version use an exhaust search for the minimum (over c). Since the objective (log lik) are piecewise constants, the optimum( ) function in R do not work well. See the tech report below for details on a similar setting.
这个版本使用最低的排气搜索(在c)。由于目标(logLIK)是分段常数,最佳()函数在R不能很好的工作。下面的一个类似的设置的详细信息,请参见技术报告。
值----------Value----------
A list with the following components:
以下组件列表:
参数:"-2LLR"
the -2 loglikelihood ratio; have approximate chisq distribution under H_o.
的-2 loglikelihood比下H_o有的近似chisq分布。
参数:cstar
the estimated common quantile.
估计的共同位数。
(作者)----------Author(s)----------
Mai Zhou
参考文献----------References----------
Empirical Likelihood for Hybrid Two Sample Problem with Censored Data. Tech. Report.
实例----------Examples----------
#### An example of testing the equality of two medians. No censoring.[###测试平等的两条中线的一个例子。没有设限。]
ROCnp2(t1=rexp(100), d1=rep(1,100), t2=rexp(120), d2=rep(1,120), b0=0.5, t0=0.5)
##########################################################################[################################################## #######################]
#### Next, an example of finding 90 percent confidence interval of R(0.5)[###接着,发现90%的置信区间的R(0.5)的一个例子,]
#### Note: We are finding confidence interval for R(0.5). So we are testing [###注:我们发现R(0.5)的置信区间。因此,我们正在测试]
#### R(0.5)= 0.35, 0.36, 0.37, 0.38, etc. try to find values so that [###R(0.5)= 0.35,0.36,0.37,0.38,等尝试找到的值,使]
#### testing R(0.5) = L , U has p-value of 0.10, then [L, U] is the 90 percent[###测试R(0.5)= L,U p值0.10,然后按[L,U]是90%]
#### confidence interval for R(0.5).[###用于R(0.5)的置信区间。]
#set.seed(123)[set.seed(123)]
#t1 <- rexp(200)[t1的< - rexp(200)]
#t2 <- rexp(200)[t2的< - rexp(200)]
#ROCnp( t1=t1, d1=rep(1, 200), t2=t2, d2=rep(1, 200), b0=0.5, t0=0.5)$"-2LLR"[ROCnp(时刻t1 = T1,D1 =代表(1,200),t2的= t2时,d2的“=代表(1,200),b0 = 0.5中,t0 = 0.5)$”-2LLR时]
#### since the -2LLR value is less than 2.705543 = qchisq(0.9, df=1), so the [###以来2LLR的值是小于2.705543 = qchisq(0.9,自由度= 1),所以]
#### confidence interval contains 0.5.[###置信区间包含0.5。]
#gridpoints <- 35:65/100[网格点< - 35:65 / 100]
#ELvalues <- gridpoints[ELvalues < - 格点]
#for( i in 1:31 ) ELvalues[i] <- ROCnp2(t1=t1, d1=rep(1, 200), [(我在1:31)ELvalues [I] < - ROCnp2(T1 = T1,D1 = REP(200),]
# t2=t2, d2=rep(1, 200), b0=gridpoints[i], t0=0.5)$"-2LLR"[t2的= t2时,d2的=代表(1,200),B0 =网格点[i]的中,t0 = 0.5)$“-2LLR”]
#myfun1 <- approxfun(x=gridpoints, y=ELvalues)[myfun1 < - approxfun(X =网格点时,y = ELvalues)]
#uniroot( f= function(x){myfun1(x)-2.705543}, interval= c(0.35, 0.5) )[uniroot(F =函数(x){myfun1(X)-2.705543},间隔= C(0.35,0.5))]
#uniroot( f= function(x){myfun1(x)-2.705543}, interval= c(0.5, 0.65) )[uniroot(F =函数(x){myfun1(X)-2.705543},间隔= C(0.5,0.65))]
#### So, taking the two roots, we see the 90 percent confidence interval for R(0.5) [###所以,我们看到的两个根,90%的置信区间为R(0.5)]
#### in this case is [0.4457862, 0.5907723].[###在这种情况下,0.4457862,0.5907723]。]
#####[####]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|