{"id":799,"date":"2017-07-08T14:14:05","date_gmt":"2017-07-08T06:14:05","guid":{"rendered":"https:\/\/www.beneplot.com\/?p=799"},"modified":"2021-03-17T15:39:41","modified_gmt":"2021-03-17T07:39:41","slug":"%e6%a0%87%e5%87%86%e8%ae%be%e5%ae%9a%e5%88%86%e6%9e%90-body-of-work-rmarkdown-%e8%87%aa%e5%8a%a8%e5%8c%96pdf%e6%8a%a5%e5%91%8a","status":"publish","type":"post","link":"https:\/\/www.beneplot.com\/?p=799","title":{"rendered":"\u6807\u51c6\u8bbe\u5b9a(Body of work\u65b9\u6cd5)\u2014R\u8bed\u8a00\u5e94\u7528\u8303\u4f8b(Rmarkdown &#038; Logistic\u56de\u5f52)"},"content":{"rendered":"<p><span style=\"font-size: 16px;\"><strong>\u6807\u51c6\u8bbe\u5b9a<\/strong>(Standard setting)\u662f\u5b9a\u4e49\u6807\u51c6\u754c\u9650\u7684\u65b9\u6cd5\u548c\u8fc7\u7a0b\uff0c<\/span><span style=\"font-size: 16px;\">\u5728\u6807\u51c6\u53c2\u7167\u6d4b\u9a8c\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u8d77\u7740\u91cd\u8981\u4f5c\u7528\u3002<\/span><span style=\"font-size: 16px;\">\u901a\u8fc7\u6807\u51c6\u8bbe\u5b9a\uff0c\u53ef\u4ee5\u5f97\u5230\u6807\u51c6\u53c2\u7167\u6d4b\u9a8c\u7684\u4e34\u754c\u5206\u6570\uff0c\u636e\u6b64<\/span><span style=\"font-size: 16px;\">\u6d4b\u8bd5\u8005\u5c06\u88ab\u5212\u5206\u4e3a\u201c\u901a\u8fc7\u201d\u6216\u201c\u672a\u901a\u8fc7\u201d\uff0c\u6216\u8005\u662f\u88ab\u5212\u5206\u4e3a\u66f4\u591a\u7684\u6709\u5e8f\u8868<\/span><span style=\"font-size: 16px;\">\u73b0\u7c7b\u522b\u3002<\/span><\/p>\n<p><span style=\"font-size: 16px;\"><strong>Body of Work<\/strong><strong>\uff08BoW\uff09<\/strong>\u65b9\u6cd5\u662fHolistic standard-setting methods\u4e2d\u7684\u4e00\u79cd\uff0c\u4e3b\u8981\u7279\u5f81\u662f\u7531\u4e13\u5bb6\u5bf9\u4e0d\u540c\u6c34\u5e73\u7684\u8003\u751f\u4f5c\u7b54\u8fdb\u884c\u8bc4\u4f30\uff0c\u5e76\u76f4\u63a5\u5bf9\u6bcf\u4e2a\u4f5c\u7b54\u6837\u672c\u505a\u51fa\uff08\u7c7b\u522b\u578b\uff09\u8bc4\u5224\u3002<strong>\u8be5\u65b9\u6cd5\u4e3b\u8981\u7528\u4e8e\u5199\u4f5c\u3001\u53e3\u8bed\u3001\u7ed3\u6784\u6027\u4f5c\u7b54\u7b49\u9898\u578b<\/strong>\u3002<\/span><\/p>\n<p><span style=\"font-size: 16px;\">\u5728\u6807\u51c6\u8bbe\u5b9a\u8fc7\u7a0b\u4e2d\uff0c\u8bc4\u5206\u5458\u7684\u8bc4\u5b9a\u6570\u636e\u9700\u8981\u5373\u523b\u5206\u6790\u5e76\u4ee5\u62a5\u544a\u7684\u5f62\u5f0f\u5448\u73b0\u3002\u672c\u6587\u4e3a\u4f7f\u7528BoW\u65b9\u6cd5\u8fdb\u884c\u6807\u51c6\u8bbe\u5b9a\u7684\u5b9e\u4f8b\uff0c\u8fd0\u7528Rmarkdown \uff0c\u5bf912\u4e2a\u8bc4\u5206\u5458\u53c2\u4e0e\u7684\u5199\u4f5c\uff0850\u7bc7\u6837\u6587\uff09\u6807\u51c6\u8bbe\u5b9a\u7ed3\u679c\u7ed9\u51fa\u5b9e\u65f6\u5206\u6790\u62a5\u544a\u3002<\/span><\/p>\n<p><span style=\"font-size: 16px;\">\u4ee5\u4e0b\u4e3a\u4ee3\u7801\uff1a<\/span><\/p>\n<div><span style=\"font-size: 20px;\"><code>---<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>title: \"\u5199\u4f5c\u6807\u51c6\u8bbe\u5b9a\uff08Body of work\uff09\"<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>author:<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 - BENE<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>documentclass: ctexart<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>output:<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 rticles::ctex:<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 \u00a0 fig_caption: yes<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 \u00a0 number_sections: yes<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 \u00a0 toc: yes<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>classoption: \"hyperref\"<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>---<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>$$ $$<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code># \u53cd\u9988\u5361<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>```{r setup, results='hide',include=FALSE}<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>#####\u8bbe\u7f6e\u5168\u5c40\u9009\u9879\uff0cecho = TRUE\u8868\u793a\u5728\u8f93\u51fa\u6587\u4ef6\u4e2d\u663e\u793a\u4ee3\u7801#####<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>knitr::opts_chunk$set(echo = TRUE)<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>```<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>```{r, include=FALSE}<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>###\u8bbe\u7f6e\u5168\u5c40\u9009\u9879\uff0ctinytex.verbose = TRUE\u8868\u793a\u5728\u8f93\u51fa\u4e2d\u663e\u793a\u8be6\u7ec6\u4fe1\u606f###<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>options(tinytex.verbose = TRUE)<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>```<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>```{r, echo=FALSE, message = FALSE, warning = FALSE}<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>##\u6e05\u9664\u5185\u5b58##<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>rm(list = ls())\u00a0<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>##\u8f7d\u5165\u76f8\u5173R\u5305##<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>library(readxl)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>library(knitr)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>library(\"kableExtra\")<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>library(\"tinytex\")<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>library(reshape)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>library(plyr)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>library(dplyr)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>library('scales')<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>##\u8f7d\u5165\u5206\u6790\u6587\u4ef6##<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>dat1 = read_excel(\"dat1.xlsx\",col_names = TRUE)<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>dat11 = dat1[,-c(1,2)]<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>ff1 =\u00a0 function(x) (length(which(x==1)))<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>ff2 =\u00a0 function(x) (length(which(x==2)))<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>ff3 =\u00a0 function(x) (length(which(x==3)))<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>ff4 =\u00a0 function(x) (length(which(x==4)))<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>###\u8bc4\u5206\u6709\u56db\u7c7b\uff0c\u8ba1\u7b97\u6240\u6709\u8bc4\u5206\u5458\u5728\u5404\u7c7b\u4e0a\u7684\u8bc4\u5206\u6570\u91cf###<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>one = apply(dat11,1,ff1)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>two = apply(dat11,1,ff2)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>thr = apply(dat11,1,ff3)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>fou = apply(dat11,1,ff4)<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>cc = cbind(one,two,thr,fou)##\u56db\u7c7b\u65f6\u4f7f\u7528<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>#cc = cbind(one,two)##\u4e24\u7c7b\u65f6\u4f7f\u7528<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>tt = apply(cc,1,sum)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>ccc = cbind(dat1[,2],one,two,thr,fou,tt)##\u56db\u7c7b\u65f6\u4f7f\u7528<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>#ccc = cbind(dat1[,2],one,two,tt)##\u4e24\u7c7b\u65f6\u4f7f\u7528<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>###\u8ba1\u7b97\u4e8c\u3001\u4e09\u3001\u56db\u7c7b\u7684\u8bc4\u5206\u6bd4\u4f8b###<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>lp1 = apply(ccc[,c(3:5)],1,sum)\/ccc$tt##\u56db\u7c7b\u65f6\u4f7f\u7528<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>lp2 = apply(ccc[,c(4:5)],1,sum)\/ccc$tt##\u56db\u7c7b\u65f6\u4f7f\u7528<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>lp3 = apply(as.data.frame(ccc[,5]),1,sum)\/ccc$tt##\u56db\u7c7b\u65f6\u4f7f\u7528<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>#lp = round(apply(as.data.frame(ccc[,3]),1,sum)\/ccc$tt,2)##\u4e24\u7c7b\u65f6\u4f7f\u7528<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>####low#####<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>lpp1 = cbind(dat1[,2],tt,lp1)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>lpp1[lpp1==0]&lt;-NA<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>lpp1[lpp1==1]&lt;-NA<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>lpp1&lt;-na.omit(lpp1)<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>####mid#####<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>lpp2 = cbind(dat1[,2],tt,lp2)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>lpp2[lpp2==0]&lt;-NA<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>lpp2[lpp2==1]&lt;-NA<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>lpp2&lt;-na.omit(lpp2)<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>####high#####<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>lpp3 = cbind(dat1[,2],tt,lp3)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>lpp3[lpp3==0]&lt;-NA<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>lpp3[lpp3==1]&lt;-NA<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>lpp3&lt;-na.omit(lpp3)<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>####\u5b9a\u4e49\u767e\u5206\u6570\u8f6c\u6362\u5230\u5bf9\u6570\u7684\u51fd\u6570####<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>fe =\u00a0 function(x) (log(x\/(1-x)))<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>####\u903b\u8f91\u56de\u5f52-\u8ba1\u7b97low-cut point#####<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>le1 = apply(as.data.frame(lpp1$lp1),2,fe)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>lll1 = glm(lp1~point,family=binomial(link='logit'),weights=tt,data=lpp1)<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>###<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>cutp1 = round(abs(-lll1$coefficients[1]\/lll1$coefficients[2]),1)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>rr1 = summary(lll1)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>###<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>pval1 = round(rr1$coef[8],4)<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>####\u903b\u8f91\u56de\u5f52-\u8ba1\u7b97mid-cut point#####<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>le2 = apply(as.data.frame(lpp2$lp2),2,fe)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>lll2 = glm(lp2~point,family=binomial(link='logit'),weights=tt,data=lpp2)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>###<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>cutp2 = round(abs(-lll2$coefficients[1]\/lll2$coefficients[2]),1)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>rr2 = summary(lll2)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>###<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>pval2 = round(rr2$coef[8],4)<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>####\u903b\u8f91\u56de\u5f52-\u8ba1\u7b97high-cut point#####<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>le3 = apply(as.data.frame(lpp3$lp3),2,fe)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>lll3 = glm(lp3~point,family=binomial(link='logit'),weights=tt,data=lpp3)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>###<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>cutp3 = round(abs(-lll3$coefficients[1]\/lll3$coefficients[2]),1)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>rr3 = summary(lll3)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>###<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>pval3 = round(rr3$coef[8],4)<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>###\u8ba1\u7b97\u8bc4\u5206\u4fe1\u5ea6###<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>v1 = melt(as.data.frame(dat11))<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>Tvar1 = var(v1$value)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>item_mean11 = apply(dat11, 1, mean)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>Ivar1 = as.numeric(var(item_mean11))\u00a0<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>rater_consis1 = Ivar1\/Tvar1 ###ICC\u4fe1\u5ea6###<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>rater_consis1a = (1- (sum(apply(dat11, 2, var)))\/var(apply(dat11, 1, sum))) ###Cronbach a\u4fe1\u5ea6###<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>###\u5f62\u6210\u8bc4\u5206\u53cd\u9988\u8868###<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>ddd = ccc[3:5]\/length(colnames(dat11))<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>back1 = cbind(dat1[1],ccc,ddd)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>colnames(back1)=c(\"ID\",\"point\",\"onen\",\"twon\",\"thrn\",\"foun\",\"tt\",\"two\",\"thr\",\"fou\")<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>back1[,which(colnames(back1)==\"two\")] = percent(back1$two,accuracy = TRUE)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>back1[,which(colnames(back1)==\"thr\")] = percent(back1$thr,accuracy = TRUE)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>back1[,which(colnames(back1)==\"fou\")] = percent(back1$fou,accuracy = TRUE)<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>ss1 = apply(dat11,2,ff1)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>ss2 = apply(dat11,2,ff2)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>ss3 = apply(dat11,2,ff3)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>ss4 = apply(dat11,2,ff4)<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>ave1234 = cbind(ss1,ss2*2,ss3*3,ss4*4)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>aves = apply(ave1234,1,mean)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>sdp = sd(aves)*2<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>sdn = sd(aves)*(-2)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>means = mean(aves)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>upp = sdp+means<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>downn = sdn+means<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>ssst = ifelse(aves&lt;upp&amp;aves&gt;downn,\"NO\",\"YES\")<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>strick = cbind(aves,ssst)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>maxs = max(aves)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>mins = min(aves)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>maxmin = c(maxs,mins)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>meansd = c(round(mean(aves),2),round(sd(aves),2))<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>###\u5f62\u6210\u8bc4\u5206\u5458\u4e25\u5389\u5ea6\u8868###<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>strickf = rbind(strick,maxmin,meansd)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>rownames(strickf) = c(colnames(dat11),\"\u6700\u5927\u503c&amp;\u6700\u5c0f\u503c\",\"\u5e73\u5747\u503c&amp;\u6807\u51c6\u5dee\")<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>```<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>\\Large\u00a0<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u672c\u8f6e\u7684\u8bc4\u5206\u5458\u4e00\u81f4\u6027**ICC\u4fe1\u5ea6**\u4e3a**`r round(rater_consis1,2)`**, **Cronbach a\u4fe1\u5ea6**\u4e3a**`r round(rater_consis1a,2)`**\u3002<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div>\u00a0<\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>\u5212\u5b9a\u7684\u5408\u683cCut score\u4e3a**`r cutp1`**\u5206\uff0c\u8ba1\u7b97pvalue\u4e3a**`r round(pval1,3)`**\uff08\u5c0f\u4e8e0.05\u8868\u660e\u6574\u4e2a\u8bc4\u5206\u8fc7\u7a0b\u65e0\u660e\u663e\u5f02\u5e38\uff09\u3002<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>\u5212\u5b9a\u7684\u4f4e\u4e2dCut score\u4e3a**`r cutp2`**\u5206\uff0c\u8ba1\u7b97pvalue\u4e3a**`r round(pval2,3)`**\uff08\u5c0f\u4e8e0.05\u8868\u660e\u6574\u4e2a\u8bc4\u5206\u8fc7\u7a0b\u65e0\u660e\u663e\u5f02\u5e38\uff09\u3002<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>\u5212\u5b9a\u7684\u4e2d\u9ad8Cut score\u4e3a**`r cutp3`**\u5206\uff0c\u8ba1\u7b97pvalue\u4e3a**`r round(pval3,3)`**\uff08\u5c0f\u4e8e0.05\u8868\u660e\u6574\u4e2a\u8bc4\u5206\u8fc7\u7a0b\u65e0\u660e\u663e\u5f02\u5e38\uff09\u3002<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>$$ $$<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>```{r, echo=FALSE, message = FALSE, warning = FALSE}<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>###\u8bc4\u5206\u53cd\u9988\u8868\u683c\u5316###<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>kable(back1,\"latex\", booktabs = T,longtable = TRUE,<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 \u00a0 \u00a0 col.names=c(\"ID\",\"Point\",\"Below-N\",\"Low-N\",\"Mid-N\",\"High-N\",\"Rater-N\",\"Low-P\",\"Mid-P\",\"High-P\"),<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 \u00a0 \u00a0 caption = \"\u8bc4\u5b9a\u53cd\u9988\u8868\", align='ccccccccccc')%&gt;%<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 kable_styling(latex_options = c(\"striped\",\"repeat_header\",\"scale_down\",full_width = T<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ,position = \"center\", font_size =3))%&gt;%<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 column_spec(1, bold = T)%&gt;%<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 column_spec(2:length(colnames(back1)), width = \"0.8cm\")%&gt;%<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 row_spec(0, bold = T,italic = T,font_size =8)%&gt;%<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 row_spec(1:length(rownames(back1)), font_size =10)%&gt;%<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 footnote(general\u00a0 = \"\u672c\u8868\u5217\u540d\u4f9d\u6b21\u4e3a\uff1a\u4f5c\u6587\u6807\u53f7\u3001\u4f5c\u6587\u5f97\u5206\u3001\u8bc4\u5b9a\u672a\u8fbe\u6807\u6570\u91cf\u3001\u4f4e\u6c34\u5e73\u6570\u91cf\u3001\u4e2d\u6c34\u5e73\u6570\u91cf\u3001\u9ad8\u6c34\u5e73\u6570\u91cf\u3001\u8bc4\u5206\u5458\u6570\u91cf\u3001\u4f4e\u6c34\u5e73\u6bd4\u4f8b\u3001\u4e2d\u6c34\u5e73\u6bd4\u4f8b\u3001\u9ad8\u6c34\u5e73\u6bd4\u4f8b\u3002\",threeparttable = T,fixed_small_size = 3)<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>###\u8bc4\u5206\u5458\u4e25\u5389\u5ea6\u8868\u683c\u5316###<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>kable(strickf,\"latex\", booktabs = T,longtable = TRUE,<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 \u00a0 \u00a0 col.names=c(\"\u4e25\u5389\u5ea6\",\"\u662f\u5426\u5f02\u5e38\"), caption = \"\u8bc4\u5206\u5458\u4e25\u5389\u5ea6\",\u00a0<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 \u00a0 \u00a0 align='ccc')%&gt;%<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 kable_styling(latex_options = c(\"striped\",\"repeat_header\"),font_size = 14)%&gt;%<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 column_spec(1, bold = T) %&gt;%<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 row_spec(0, bold = T) %&gt;%<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 row_spec((nrow(strickf)-1):nrow(strickf), bold = T, color = \"black\", background = \"#ADD8E6\")%&gt;%<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 footnote(alphabet = \"\u6570\u503c\u8d8a\u5927\u8868\u660e\u8bc4\u5b9a\u8d8a\u5bbd\u677e\u3002 \")<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div>\u00a0<\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>```<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>$$ $$<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code># \u53cd\u9988\u5206\u5e03\u56fe<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>\\Large\u00a0<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u4e0b\u5217\u56fe\u7247\u4e3a\u672c\u8f6e\u6240\u6709\u8bc4\u5206\u8005\u5c06\u4e0d\u540c\u4f5c\u6587\u8fdb\u884c\u5206\u7c7b\u540e\u7684\u7ed3\u679c\u5206\u5e03\u56fe\u3002<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>\u82e5\u4e00\u7bc7\u4f5c\u6587\u4e24\u4e2a\u53ca\u4ee5\u4e0a\u7c7b\u522b\u7684\u76f4\u65b9\u56fe\u9ad8\u5ea6\u63a5\u8fd1\uff0c\u8868\u660e\u8bc4\u5206\u8005\u8bc4\u5b9a\u8f83\u4e0d\u4e00\u81f4\uff0c\u9700\u8fdb\u884c\u8ba8\u8bba\u3002<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div>\u00a0<\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>```{r, echo=FALSE, message = FALSE, warning = FALSE,out.width ='\\\\textwidth',fig.align ='center'}<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>library('ggplot2')<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>data=t(back1[,-c(7:10)])<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>rownames(data) = c(\"Level\",\"Total\",\"Below\",\"Basic\", \"Mid\",\"High\")<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>colnames(data) = data[1,]<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>dat=data[-c(1,2),]<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>dat =\u00a0 as.data.frame(dat)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0\u00a0<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>Level &lt;- factor(rownames(dat), levels=c(\"Below\",\"Basic\", \"Mid\",\"High\"), ordered=TRUE)<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0\u00a0<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>for (i in 1:ncol(dat)){<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0\u00a0<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 p = ggplot(dat, aes(x=Level, y=as.numeric(dat[,i]))) +\u00a0<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 \u00a0 geom_histogram(stat=\"identity\",<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0fill=ifelse(sd(as.numeric(dat[,i]))&lt;=4, \"red\",\"lightblue\"),\u00a0<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0colour=\"black\")+<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 \u00a0 labs(y='Number of raters', x=colnames(data)[i])+<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 \u00a0 scale_y_continuous(breaks=seq(0,15,1))+<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 \u00a0 theme(axis.text.x = element_text(size = 14,color=\"black\"),<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 axis.text.y = element_text(size = 15,color=\"black\"),<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 axis.title.x=element_text(size=14))<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0\u00a0<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 print(p)<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>}<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>```<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code># \u539f\u59cb\u8bc4\u5206\u8868(\u9644\u8868)<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>```{r, echo=FALSE, message = FALSE, warning = FALSE}<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>kable(dat1,\"latex\", booktabs = T,longtable = TRUE,<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 \u00a0 \u00a0 align='cccccccccccccc')%&gt;%<\/code><\/span><\/div>\n<div><span style=\"font-size: 20px;\"><code>\u00a0 kable_styling(latex_options = c(\"striped\",\"repeat_header\"),font_size = 8)<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div><span style=\"font-size: 20px;\"><code>```<\/code><\/span><\/div>\n<div>\u00a0<\/div>\n<div>\u00a0<\/div>\n<div>\u00a0<\/div>\n<div>\n<h3>\u6700\u7ec8\u751f\u6210\u7684PDF\u5982\u4e0b\uff1a<\/h3>\n<\/div>\n<div><span style=\"color: #3366ff;\"><strong><a style=\"color: #3366ff;\" title=\"SD-BOW\u81ea\u52a8\u5316\u751f\u6210\u7684PDF\u62a5\u544a\" href=\"https:\/\/www.beneplot.com\/wp-content\/uploads\/2020\/12\/SD-BOW\u81ea\u52a8\u5316\u751f\u6210\u7684PDF\u62a5\u544a.pdf\">SD-BOW\u81ea\u52a8\u5316\u751f\u6210\u7684PDF\u62a5\u544a<\/a><\/strong><\/span><\/div>\n<div>\u00a0<\/div>\n<div>\u00a0<\/div>\n<div>\u00a0<\/div>\n<h3>\u5206\u6790\u6570\u636e\u8868\uff1a<\/h3>\n<div><span style=\"color: #3366ff;\"><strong><a style=\"color: #3366ff;\" title=\"dat1\uff08SD-BOW\uff09\" href=\"https:\/\/www.beneplot.com\/wp-content\/uploads\/2020\/12\/dat1\uff08SD-BOW\uff09.xlsx\">dat1\uff08SD-BOW\uff09<\/a><\/strong><\/span><\/div>\n<div>\u00a0<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u6807\u51c6\u8bbe\u5b9a(Standard setting)\u662f\u5b9a\u4e49\u6807\u51c6\u754c\u9650\u7684\u65b9\u6cd5\u548c\u8fc7\u7a0b\uff0c\u5728\u6807\u51c6\u53c2\u7167\u6d4b\u9a8c\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u8d77\u7740\u91cd\u8981\u4f5c\u7528\u3002 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[10],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v14.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<meta name=\"robots\" content=\"index, follow\" \/>\n<meta name=\"googlebot\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta name=\"bingbot\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.beneplot.com\/?p=799\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u6807\u51c6\u8bbe\u5b9a(Body of work\u65b9\u6cd5)\u2014R\u8bed\u8a00\u5e94\u7528\u8303\u4f8b(Rmarkdown &amp; Logistic\u56de\u5f52) - Beneplot\" \/>\n<meta property=\"og:description\" content=\"\u6807\u51c6\u8bbe\u5b9a(Standard setting)\u662f\u5b9a\u4e49\u6807\u51c6\u754c\u9650\u7684\u65b9\u6cd5\u548c\u8fc7\u7a0b\uff0c\u5728\u6807\u51c6\u53c2\u7167\u6d4b\u9a8c\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u8d77\u7740\u91cd\u8981\u4f5c\u7528\u3002 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.beneplot.com\/?p=799\" \/>\n<meta property=\"og:site_name\" content=\"Beneplot\" \/>\n<meta property=\"article:published_time\" content=\"2017-07-08T06:14:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-03-17T07:39:41+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.beneplot.com\/#website\",\"url\":\"https:\/\/www.beneplot.com\/\",\"name\":\"Beneplot\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/www.beneplot.com\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-CN\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.beneplot.com\/?p=799#webpage\",\"url\":\"https:\/\/www.beneplot.com\/?p=799\",\"name\":\"\\u6807\\u51c6\\u8bbe\\u5b9a(Body of work\\u65b9\\u6cd5)\\u2014R\\u8bed\\u8a00\\u5e94\\u7528\\u8303\\u4f8b(Rmarkdown & Logistic\\u56de\\u5f52) - Beneplot\",\"isPartOf\":{\"@id\":\"https:\/\/www.beneplot.com\/#website\"},\"datePublished\":\"2017-07-08T06:14:05+00:00\",\"dateModified\":\"2021-03-17T07:39:41+00:00\",\"author\":{\"@id\":\"https:\/\/www.beneplot.com\/#\/schema\/person\/ea14f85ae789ceaaa712ceee1dd1f95b\"},\"inLanguage\":\"zh-CN\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.beneplot.com\/?p=799\"]}]},{\"@type\":[\"Person\"],\"@id\":\"https:\/\/www.beneplot.com\/#\/schema\/person\/ea14f85ae789ceaaa712ceee1dd1f95b\",\"name\":\"beneplot\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.beneplot.com\/#personlogo\",\"inLanguage\":\"zh-CN\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/15d96ce801cfddbd59ef2b0d986cd9b1?s=96&r=g\",\"caption\":\"beneplot\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/www.beneplot.com\/index.php?rest_route=\/wp\/v2\/posts\/799"}],"collection":[{"href":"https:\/\/www.beneplot.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.beneplot.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.beneplot.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.beneplot.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=799"}],"version-history":[{"count":7,"href":"https:\/\/www.beneplot.com\/index.php?rest_route=\/wp\/v2\/posts\/799\/revisions"}],"predecessor-version":[{"id":851,"href":"https:\/\/www.beneplot.com\/index.php?rest_route=\/wp\/v2\/posts\/799\/revisions\/851"}],"wp:attachment":[{"href":"https:\/\/www.beneplot.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=799"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.beneplot.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=799"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.beneplot.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=799"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}