[R] mle.stepwise

2010-02-08 Thread eariasca
Hello, I have a basic question on mle.stepwise, which seems to return strange answers, even on a basic example. I posted this last May but never got an answer. I resend it here hoping it will this time. # BEGIN require(wle) x1 = runif(100) x2 = runif(100) y = 3 + 2*x1 + rnorm(100)

[R] plotting circles with symbols()

2009-12-29 Thread eariasca
Hello, I am not able to plot a circle of a given radius using symbols(). In the example below, the circle appears too large: plot(0, 0, xlim = c(-1, 1), ylim = c(-1, 1)) symbols(0, 0, circles = 1, inches = FALSE, add = TRUE) What's happening? Ery

[R] problem with mle.stepwise

2009-05-15 Thread eariasca
Hello, I am getting some unexpected results when using mle.stepwise: # BEGIN require(wle) x1 = runif(100) x2 = runif(100) y = 3 + 2*x1 + rnorm(100) # so x1 is in the model, but not x2 mle.stepwise(y ~ x1 + x2, type = Backward) # Backward selection gets it right, the other

[R] Generating EPS figures automatically (like Sweave)

2009-03-31 Thread eariasca
Hello, Is there a way to generate EPS figures automatically out of a chunk of code? Basically, I would like to do something like Sweave does (I just find it a little cumbersome to create a .Rnw file and then keep track of the figure numbering). Thanks for your time. Ery Arias-Castro

[R] EM algorithm

2008-03-05 Thread eariasca
Hi, I am trying to understand how the functions em() and me() from the mclust package work. I cannot make sense of what the algorithm returns. Here is a basic, simple example: # # two bivariate normals, centered at (-5,0) and (5,0), with Id