An HTML attachment was scrubbed... URL: <https://stat.ethz.ch/pipermail/r-sig-meta-analysis/attachments/20240625/ed6df47c/attachment-0001.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: Outlook-l5t5h5qp.png Type: image/png Size: 30067 bytes Desc: Outlook-l5t5h5qp.png URL: <https://stat.ethz.ch/pipermail/r-sig-meta-analysis/attachments/20240625/ed6df47c/attachment-0001.png>
[R-meta] Error in the Network plot
2 messages · Marimuthu S, Dr. Gerta Rücker
5 days later
Hi Marimuthu, It seems you had not yet an answer to this. The problem you encountered comes from mixing code from R packages netmeta and metafor. If you want to use netmeta, particularly function netconnection(), you have to use pairwise() instead of to.wide() (which is a metafor function). Attached you find your code adapted for R package netmeta which works fine. Best, Gerta UNIVERSIT?TSKLINIKUM FREIBURG Institute for Medical Biometry and Statistics Dr. Gerta R?cker Guest Scientist Stefan-Meier-Stra?e 26 ? 79104 Freiburg gerta.ruecker at uniklinik-freiburg.de https://www.uniklinik-freiburg.de/imbi-en/employees.html?imbiuser=ruecker Von: Marimuthu S via R-sig-meta-analysis <r-sig-meta-analysis at r-project.org> Gesendet: Dienstag, 25. Juni 2024 15:49 An: Marimuthu S via R-sig-meta-analysis <r-sig-meta-analysis at r-project.org> Cc: Marimuthu S <sm at mcmaster.ca> Betreff: [R-meta] Error in the Network plot Good Morning everyone, I am trying to plot a network graph using 'netconnection' R function. I got the below error message. R code and Error: library(netmeta) dat <- dat.hasselblad1998 dat table(dat$study) # restructure to a wide format dat.wide <- to.wide(dat, study="study", grp="trt", ref="no_contact", grpvars=6:7) dat.wide nc1 <- netconnection(trt.1, trt.2, study, data = dat.wide) Error in netconnection.default(trt.1, trt.2, study, data = dat.wide) : The following studies have a wrong number of comparisons: '2', '9' Please provide data for all treatment comparisons (two-arm: 1; three-arm: 3; four-arm: 6, ...). I would appreciate it if someone could clarify this and let me know how to sort it out. Please note that studies 2 and 9 have 3 arms. Marimuthu Warm Regards, Marimuthu S, Ph.D. Student (Biostatistics) [cid:image002.png at 01DACB22.760CD510] -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://stat.ethz.ch/pipermail/r-sig-meta-analysis/attachments/20240630/6d24fce5/attachment-0001.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.png Type: image/png Size: 26099 bytes Desc: image002.png URL: <https://stat.ethz.ch/pipermail/r-sig-meta-analysis/attachments/20240630/6d24fce5/attachment-0001.png> -------------- next part -------------- A non-text attachment was scrubbed... Name: Hasselblad.R Type: application/octet-stream Size: 575 bytes Desc: Hasselblad.R URL: <https://stat.ethz.ch/pipermail/r-sig-meta-analysis/attachments/20240630/6d24fce5/attachment-0001.obj>