Dear All R Users,

I am trying to graph a 3-D graph of simulated data for logit models using
the powerful wireframe command, but I got stuck. Here are the codes:

x <- seq(-4, 4, by=0.01)
 y <- seq(-4, 4, by=0.01)
 p <- 1/(1+exp(-0.12*x + 0.35*y))
 mydata <- cbind(x, y, p)
 require(lattice)
 wireframe(p~x*y, data=mydata)

 and I received the following message:

Error in eval(substitute(groups), data, environment(formula)) :
  numeric 'envir' arg not of length one

Can anyone here point me to the right direction? Thanks!

Jun Xu, PhD
Assistant Professor
Department of Sociology
Ball State University

	[[alternative HTML version deleted]]


