语言nomogram校准曲线图_医学统计与R语言:Meta 回归作图(Meta regression Plot)
微信公眾號:醫(yī)學統(tǒng)計與R語言如果你覺得對你有幫助,歡迎轉發(fā)
輸入1:
?install.packages("metafor")?library(metafor)
?dat.bcg
結果1:
???trial???????????????author?year?tpos??tneg?cpos??cneg?ablat??????alloc1??????1??????????????Aronson?1948????4???119???11???128????44?????random
2??????2?????Ferguson?&?Simes?1949????6???300???29???274????55?????random
3??????3??????Rosenthal?et?al?1960????3???228???11???209????42?????random
4??????4????Hart?&?Sutherland?1977???62?13536??248?12619????52?????random
5??????5?Frimodt-Moller?et?al?1973???33??5036???47??5761????13??alternate
6??????6??????Stein?&?Aronson?1953??180??1361??372??1079????44??alternate
7??????7?????Vandiviere?et?al?1973????8??2537???10???619????19?????random
8??????8???????????TPT?Madras?1980??505?87886??499?87892????13?????random
9??????9?????Coetzee?&?Berjak?1968???29??7470???45??7232????27?????random
10????10??????Rosenthal?et?al?1961???17??1699???65??1600????42?systematic
11????11???????Comstock?et?al?1974??186?50448??141?27197????18?systematic
12????12???Comstock?&?Webster?1969????5??2493????3??2338????33?systematic
13????13???????Comstock?et?al?1976???27?16886???29?17825????33?systematic
輸入2:
dat?<-?escalc(measure="RR",?ai=tpos,?bi=tneg,?ci=cpos,?di=cneg,?data=dat.bcg)sdat?<-?summary(dat,?transf=exp)sdat?Measures for Dichotomous Variables:
| group1 | ai | bi |
| group2 | ci | di |
Measures for Quantitative Variables:
| group1 | m1i | sd1i | n1i |
| group2 | m2i | sd2i | n2i |
結果2:
???trial???????????????author?year?tpos??tneg?cpos??cneg?ablat??????alloc?????yi?????vi????sei?1??????1??????????????Aronson?1948????4???119???11???128????44?????random?0.4109?0.3256?0.5706?
2??????2?????Ferguson?&?Simes?1949????6???300???29???274????55?????random?0.2049?0.1946?0.4411?
3??????3??????Rosenthal?et?al?1960????3???228???11???209????42?????random?0.2597?0.4154?0.6445?
4??????4????Hart?&?Sutherland?1977???62?13536??248?12619????52?????random?0.2366?0.0200?0.1415?
5??????5?Frimodt-Moller?et?al?1973???33??5036???47??5761????13??alternate?0.8045?0.0512?0.2263?
6??????6??????Stein?&?Aronson?1953??180??1361??372??1079????44??alternate?0.4556?0.0069?0.0831?
7??????7?????Vandiviere?et?al?1973????8??2537???10???619????19?????random?0.1977?0.2230?0.4722?
8??????8???????????TPT?Madras?1980??505?87886??499?87892????13?????random?1.0120?0.0040?0.0629?
9??????9?????Coetzee?&?Berjak?1968???29??7470???45??7232????27?????random?0.6254?0.0564?0.2376?
10????10??????Rosenthal?et?al?1961???17??1699???65??1600????42?systematic?0.2538?0.0730?0.2702?
11????11???????Comstock?et?al?1974??186?50448??141?27197????18?systematic?0.7122?0.0124?0.1114?
12????12???Comstock?&?Webster?1969????5??2493????3??2338????33?systematic?1.5619?0.5325?0.7297?
13????13???????Comstock?et?al?1976???27?16886???29?17825????33?systematic?0.9828?0.0714?0.2672?
?????????zi??ci.lb??ci.ub?
1???-1.5586?0.1343?1.2574?
2???-3.5941?0.0863?0.4864?
3???-2.0917?0.0734?0.9186?
4??-10.1908?0.1793?0.3121?
5???-0.9613?0.5163?1.2536?
6???-9.4599?0.3871?0.5362?
7???-3.4323?0.0784?0.4989?
8????0.1899?0.8946?1.1449?
9???-1.9760?0.3926?0.9962?
10??-5.0747?0.1494?0.4310?
11??-3.0460?0.5725?0.8860?
12???0.6111?0.3737?6.5284?
13??-0.0648?0.5821?1.6593?
yi is a vector with the effect size estimates (log relative risks in the first example, standardized mean differences in the second example), vi is a vector with the corresponding sampling variances, and xi is a vector with the covariate/moderator values
輸入3:
?res1?<-?rma(yi,?vi,?data=dat,digits=3)summary(res1)method="RE"
結果3:
Random-Effects?Model?(k?=?13;?tau^2?estimator:?REML)??logLik??deviance???????AIC???????BIC??????AICc?
?-12.202????24.405????28.405????29.375????29.738???
tau^2?(estimated?amount?of?total?heterogeneity):?0.313?(SE?=?0.166)
tau?(square?root?of?estimated?tau^2?value):??????0.560
I^2?(total?heterogeneity?/?total?variability):???92.22%
H^2?(total?variability?/?sampling?variability):??12.86
Test?for?Heterogeneity:
Q(df?=?12)?=?152.233,?p-val?.001
Model?Results:
estimate?????se????zval???pval???ci.lb???ci.ub?
??-0.715??0.180??-3.974??<.001??-1.067??-0.362??***?
---
Signif.?codes:??0?‘***’?0.001?‘**’?0.01?‘*’?0.05?‘.’?0.1?‘?’?1
輸入4:
?confint(res1)結果4:
?estimate??ci.lb??ci.ub?tau^2?????0.313??0.120??1.111?
tau???????0.560??0.346??1.054?
I^2(%)???92.221?81.918?97.678?
H^2??????12.856??5.530?43.068?
輸入5:
forest(res1,xlim=c(-15,?5),at=log(c(0.05,?0.25,?1,?8)),atransf=exp,slab?=?paste(dat$author,?as.character(dat$year),?sep?=?",?"),????????ilab=cbind(dat.bcg$tpos,?dat.bcg$tneg,?dat.bcg$cpos,?dat.bcg$cneg),
????????ilab.xpos=c(-9,-7.5,-5.5,-4),?cex=0.8,???
????????xlab="Risk?Ratio",?mlab="",ylim=c(-1,?16))##?order=order(dat.bcg$year)
??text(c(-9,-7.5,-5.5,-4),?15?,c("TB+",?"TB-",?"TB+",?"TB-"))
??text(c(-8,?-5),?16,?c("Vaccinated",?"Control"))
??text(-15,?15,?"Author(s)?and?Year",?pos?=4)
??text(5,?15,?"Relative?Risk?[95%?CI]",?pos?=2)
??text(-15,?-1,?pos=4,?cex=0.75,?bquote(paste("RE?Model?for?All?Studies?(Q?=?",
??????????????????????????????????????????????.(formatC(res1$QE,?digits=2,?format="f")),?",?df?=?",?.(res1$k?-?res1$p),
??????????????????????????????????????????????",?p?=?",?.(formatC(res1$QEp,?digits=2,?format="f")),?";?",?I^2,?"?=?",
??????????????????????????????????????????????.(formatC(res1$I2,?digits=1,?format="f")),?"%)")))
http://www.metafor-project.org/doku.php/plots:forest_plot_with_subgroups
結果5:
輸入6:
par(mfrow=c(2,2))funnel(res1,?main="Standard?Error")
funnel(res1,?yaxis="vi",?main="Sampling?Variance")
funnel(res1,?yaxis="seinv",?main="Inverse?Standard?Error")
funnel(res1,?yaxis="vinv",?main="Inverse?Sampling?Variance")
結果6:
輸入7:
?par(mfrow=c(1,1))?res?3)
?preds?0:60),?transf=exp)
?size?1?/?sqrt(dat$vi)
?size??plot(NA,?NA,?xlim=c(10,60),?ylim=c(0.05,8),
??????xlab="Absolute?Latitude",?ylab="Risk?Ratio",
??????las=1,??bty="l",log="y")
?symbols(dat$ablat,?exp(dat$yi),?squares=size,?inches=FALSE,?add=TRUE,?bg="blue")
?install.packages("gplots")
?library(gplots)
?plotCI(dat$ablat?,exp(dat$yi),?ui=sdat$ci.ub,li=sdat$ci.lb?,err="y",??
?pch=19,?lty=1,?lwd=1,col="blue",barcol="black",gap=0.1,sfrac=sdat$sei/60,add=TRUE)
?lines(0:60,?preds$pred,lty="solid",col="red")
?lines(0:60,?preds$ci.lb,?lty="dashed")
?lines(0:60,?preds$ci.ub,?lty="dashed")
?abline(h=1,?lty="dotted")
?pos?1,3,3,3,2,3,2,3,4,1,3,3)
?text(dat$ablat,?exp(dat$yi),dat$trial,?pos=pos,cex=1.1)
require(plotrix)
pos:a position specifier for the text. If specified this overrides any adj value given.
Values of 1, 2, 3 and 4, respectively indicate positions below,to the left of, above and to the right of the specified (x,y) coordinates.
結果7:
前文鏈接:
醫(yī)學統(tǒng)計與R語言:多列分組正態(tài)性檢驗
醫(yī)學統(tǒng)計與R語言:aggregate.plot了解一下
醫(yī)學統(tǒng)計與R語言:有序Probit回歸(Ordered Probit Model)
醫(yī)學統(tǒng)計與R語言:Probit回歸模型及邊際效應(Marginal effects)
醫(yī)學統(tǒng)計與R語言:Lord’s Paradox
醫(yī)學統(tǒng)計與R語言:協(xié)方差分析(ANCOVA)+plus
醫(yī)學統(tǒng)計與R語言:Kendall是誰?樣本量是自變量的10倍?
醫(yī)學統(tǒng)計與R語言:方差分析中計劃好的多重比較(Planned Comparisons and Post Hoc Tests)
醫(yī)學統(tǒng)計與R語言:圓形樹狀圖(circular dendrogram)
醫(yī)學統(tǒng)計與R語言:畫一個姑娘陪著我,再畫個花邊的被窩
醫(yī)學統(tǒng)計與R語言:雙因素重復測量方差分析(Two-way repeated measures ANOVA)
醫(yī)學統(tǒng)計R語言:分面畫boxplot
醫(yī)學統(tǒng)計與R語言:調節(jié)效應分析(Moderation Analysis)
醫(yī)學統(tǒng)計與R語言:結構方程模型(structural equation model)
醫(yī)學統(tǒng)計與R語言:中介效應分析(mediation effect analysis)
醫(yī)學統(tǒng)計與R語言:生存曲線(survival curves)with ?risk.table
醫(yī)學統(tǒng)計與R語言:如何比較兩種診斷試驗的靈敏度和特異度?
醫(yī)學統(tǒng)計與R語言:你知道nomogram的points和total points怎么算嗎?
醫(yī)學統(tǒng)計與R語言:Cleveland dot plot
醫(yī)學統(tǒng)計與R語言:交互作用模型中分組效應及標準誤的計算
醫(yī)學統(tǒng)計與R語言:多條ROC曲線的AUC多重比較
醫(yī)學統(tǒng)計與R語言:來,今天學個散點圖!
醫(yī)學統(tǒng)計與R語言:一份簡單的數(shù)據(jù)整理分析
醫(yī)學統(tǒng)計與R語言:利用金字塔圖比較多個指標
醫(yī)學統(tǒng)計與R語言:點圖(dotplot)
醫(yī)學統(tǒng)計與R語言:幕后高手出馬!
醫(yī)學統(tǒng)計與R語言:Calibration plot with 置信區(qū)間
醫(yī)學統(tǒng)計與R語言:還說自己不會畫Calibration plot!
醫(yī)學統(tǒng)計與R語言:KS曲線,KS plot,lift plot
醫(yī)學統(tǒng)計與R語言:身體酸痛,醒來學個卡方檢驗
醫(yī)學統(tǒng)計與R語言:利用午睡幾分鐘,學習下Population Pyramid
醫(yī)學統(tǒng)計與R語言:有序Logistic回歸平行線檢驗(Test proportional odds assumption )
醫(yī)學統(tǒng)計與R語言:你的基金標書里還少這幅圖!
醫(yī)學統(tǒng)計與R語言:這里的坑你踩過幾回,有序多分類Logistic回歸(Ordinal Logistic Regression)
醫(yī)學統(tǒng)計與R語言:logsitc回歸校準曲線 Calibration curve
醫(yī)學統(tǒng)計與R語言:多分格相關系數(shù)(polychoric)多序列相關系數(shù)(polyserial)Coefficient Omega
醫(yī)學統(tǒng)計與R語言:Tobit回歸中的Marginal effect
醫(yī)學統(tǒng)計與R語言:定量變量的無監(jiān)督離散化( unsupervised discretization)
醫(yī)學統(tǒng)計與R語言:Welch's ANOVA and Games-Howell post-hoc test
醫(yī)學統(tǒng)計與R語言:配對均值檢驗可視化加label
醫(yī)學統(tǒng)計與R語言:線性固定效應模型(Linear fix effect model )
醫(yī)學統(tǒng)計與R語言:Tobit回歸模型
函數(shù)醫(yī)學統(tǒng)計與R語言:隨機森林與Logistic預測(randomForest vs Logistic regression)
醫(yī)學統(tǒng)計與R語言:多重比較P值的可視化
醫(yī)學統(tǒng)計與R語言:腫瘤研究中的waterfall plot(瀑布圖)
醫(yī)學統(tǒng)計與R語言:多元方差分析與非參數(shù)多元方差分析
醫(yī)學統(tǒng)計與R語言:使用R語言實現(xiàn)Johnson-Neyman分析
醫(yī)學統(tǒng)計與R語言:多層線性模型圖示
醫(yī)學統(tǒng)計與R語言:多層線性模型(混合線性模型
醫(yī)學統(tǒng)計與R語言:best subset of inputs for the glm famil
醫(yī)學統(tǒng)計與R語言:多重線回歸自變量篩選的幾種方法
醫(yī)學統(tǒng)計與R語言:關聯(lián)規(guī)則Apriori算
醫(yī)學統(tǒng)計與R語言:列聯(lián)表可視化的4種方
醫(yī)學統(tǒng)計與R語言:盤它!什么格式文件都可
醫(yī)學統(tǒng)計與R語言:離群值分析(Outlier Detection
醫(yī)學統(tǒng)計與R語言:決策樹CHAI
醫(yī)學統(tǒng)計與R語言:主成分分析(PCA)及可視
醫(yī)學統(tǒng)計與R語言:可能是最全R語言操作手冊(cheatsheets)
醫(yī)學統(tǒng)計與R語言:聽說你還在手動畫三線表!
醫(yī)學統(tǒng)計與R語言:合并多個Excel文
醫(yī)學統(tǒng)計與R語言:政策效果評價之合成控制
醫(yī)學統(tǒng)計與R語言:線性回歸模型假設條件驗證與診斷
醫(yī)學統(tǒng)計與R語言:想發(fā)表sci就畫這種Bland-Altman Plot
總結
以上是生活随笔為你收集整理的语言nomogram校准曲线图_医学统计与R语言:Meta 回归作图(Meta regression Plot)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: django 国际化 ugettext(
- 下一篇: ADO.NET Entity Frame