[R] Using constrOptim() function

2009-06-03 Thread Ali Mahani
I have a function myFunction(beta,x) where beta is a vector of coefficients and x is a data frame (think of it as a matrix). I want to optimize the function myFunction() by ONLY changing beta, i.e. x stays constant, with 4 constraints. I have the following code (with a separate source file for the

[R] Abort run

2009-06-03 Thread Ali Mahani
How can I abort running a script if I determine it's taking too long? Currently, I simply close the R window and re-open it. Thank you! -- View this message in context: http://www.nabble.com/Abort-run-tp23852410p23852410.html Sent from the R help mailing list archive at Nabble.com.

[R] lmer() function

2009-04-22 Thread Ali Mahani
I'm trying to estimate a two-tier model with varying intercepts and slopes across 20 groups, with each group having about 50 observations and with no group predictor. I use the command lmer(y~x+(1+x | group)). But the result is a constant intercept (zero standard deviation, all 20 intercept values