ctrl+9创建do文件→输入下列文件 if _caller() >= 8 { window menu clear window menu append submenu "stUser" "&Meta-Analysis" window menu append item "Meta-Analysis" "Of Binary and Continuous (meta&n)" "db metan" window menu append item "Meta-Analysis" "Of Effects (&meta)" "db meta" window menu append item "Meta-Analysis" "Of p-values (meta&p)" "db metap" window menu append item "Meta-Analysis" "Cumulative (meta&cum)" "db metacum" window menu append item "Meta-Analysis" "Regression (meta®)" "db metareg" window menu append item "Meta-Analysis" "Funnel Graph, metan-based (f&unnel)" "db funnel" window menu append item "Meta-Analysis" "Funnel Graph, &vertical (metafunnel)" "db metafunnel" window menu append item "Meta-Analysis" "L'abbe Graph, metan-based (&labbe)" "db labbe" window menu append item "Meta-Analysis" "NNT, metan-based (metann&t)" "db metannt" window menu append item "Meta-Analysis" "Influence Analysis, metan-based (metan&inf)" "db metaninf" window menu append item "Meta-Analysis" "Influence Analysis, meta-based (metain&f)" "db metainf" window menu append item "Meta-Analysis" "Galbraith Plot for Heterogeneity (&galbr)" "db galbr" window menu append item "Meta-Analysis" "Publication Bias (meta&bias)" "db metabias" window menu append item "Meta-Analysis" "Trim and Fill Analysis (met&atrim)" "db metatrim" window menu refresh } run E:\w\stata1\ado\profile.do 结果输出 . insheet using C:\Users\51040\Desktop\metantry8.csv,clear (14 vars, 130 obs) . br . gen p=xtotal/xtail . gen se =sqrt(p*(1-p)/xtail) 如何在此基础上计算响应比
时间: 2023-07-06 19:35:09 浏览: 145
Python中_name==_main的解释
在这个基础上,可以使用以下命令计算响应比:
```
gen rr = (success/grouped) / (success[1]/grouped[1])
```
其中,`success`和`grouped`分别表示成功次数和总次数,`success[1]`和`grouped[1]`表示第一组的成功次数和总次数。运行命令后,会生成一个新的变量`rr`,表示响应比。
需要注意的是,在计算响应比之前,需要将数据按照组别进行汇总,得到每组的成功次数和总次数,以及第一组的成功次数和总次数。可以使用以下命令将数据按组别进行汇总:
```
collapse (sum) success total, by(group)
```
其中,`success`和`total`表示成功次数和总次数,`by(group)`表示按照组别进行汇总。汇总后,可以使用`list`命令查看数据是否正确。
阅读全文