1
$\begingroup$

I am trying to plot, a trellis plot. But I get an error and I don't know what its means.

testname <- c("Egger", "Harbord", "ASEgger", "Peters", "ASThompson",
                "Begg", "Schwarzer", "ASBegg")
  print(xyplot(p.c ~ k |  cond,
               data=x,
               subset=p.c==p.sel & k==k.sel & test %in% test.sel,
               groups=test,
               type="b",
               xlab="Number of trials in meta-analysis",
               ylab="Proportion of significant tests of bias in meta-analysis",
               ylim=c(-0.05, 1.05),
               #main=paste("p.c between 0.3 and 0.7", ", k=", k.sel, ", n.min=20", sep=""),
               scales=list(x=list(at=c(-1, -0.8, -0.6, 0))),
               par.strip.text=list(cex=1.0),#1.1),
               key=list(lines=list(lwd=1,
                                   lty=lty1[test.sel],
                                   pch=pch1[test.sel],
                                   col=col1[test.sel],
                                   type="b"),
               text=list(testname[test.sel], cex=1)),
               layout=c(3,3),
               ##
                 strip=function(...) strip.default(style=1,
                 strip.names=c(FALSE, FALSE), ...),
               panel=function(x,y, ...){
               panel.abline(h=0.95, lty=1, lwd=1.5, col="grey")
               panel.abline(h=0, lty=1, lwd=1.5, col="grey")
               panel.superpose(x,y, cex=1.25, ...)

                 panel.superpose(x,y, cex=1.25, ...)
               },
                 par.settings=list(
                 superpose.symbol=list(pch=pch1, col=col1),
                 superpose.line=list(lty=lty1, col=col1)
               )
  )
  )
}

## tsel = Tests plotted in figures 
##
## Egger       : 1
## Harbord     : 2
## ASEgger     : 3
## Peters      : 4
## ASThompson  : 5
## Begg        : 6
## Schwarzer   : 7
## ASBegg      : 8

##
for (i in 1:1){
  for (j in 1:3){
    for (l in 1:1){
      ##
      p <- c(0.5)[i]
      ##
      r <- c(10, 20, 50)[j]
      ##
      tsel <- switch(l,
                     1:8) #Egger, Harbord, ASEgger, Peters,
      #ASThompson, Begg, Schwarzer, ASBegg
      ##
      postscript(paste("simu-arcsine-col", c(5)[i],
                       "-k", c(1,2,5)[j],
                       "-t", l, ".ps", sep=""))
      tplot(p.sel=p, k.sel=r, test.sel=tsel,
            ylim=c(-0.05, 1.05))
      dev.off()
    }
  }
}

Error in limits.and.aspect(default.prepanel, prepanel = prepanel, have.xlim = have.xlim,  : 
  need at least one panel
$\endgroup$

closed as off-topic by kjetil b halvorsen, Michael Chernick, mdewey, mkt, Peter Flom Aug 7 at 12:30

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question appears to be off-topic because EITHER it is not about statistics, machine learning, data analysis, data mining, or data visualization, OR it focuses on programming, debugging, or performing routine operations within a statistical computing platform. If the latter, you could try the support links we maintain." – kjetil b halvorsen, Michael Chernick, mdewey, mkt, Peter Flom
If this question can be reworded to fit the rules in the help center, please edit the question.

  • $\begingroup$ This might find a better response on an R list like R-help. I would not try the R meta-analysis list as it has, on the face of it, nothing to do with meta-analysis. $\endgroup$ – mdewey Aug 7 at 12:11

Browse other questions tagged or ask your own question.