[R] estimating mean income

2010-05-10 Thread Erwin Kalvelagen
Hi: This is more a statistical question than an R question (apologies!). I have some income data as follows: <$5000 : 598 $5000-$1 : 2586 $65001-$7 : 202 $70001+ : 446 I.e an open ended income class for incomes > $70k. What would be the best way to estimate mean income? Somethin

Re: [R] Find a rectangle of maximal area

2010-03-21 Thread Erwin Kalvelagen
solved easier than I expected. See: http://yetanothermathprogrammingconsultant.blogspot.com/2010/03/looks-difficult- to-me-2.html Erwin Kalvelagen Amsterdam Optimization Modeling Group er...@amsterdamoptimization.com http://amsterd

Re: [R] Solving an optimization problem: selecting an &quot;optimal&quot; subset

2010-02-01 Thread Erwin Kalvelagen
> nrow=5, byrow=T) > dir <- c("==", "==", "<=", "<=", "<=") > rhs <- c(0, 1, 0, M, k) > max <- FALSE You can drop the binary variable d0. The condition "one of a_p,a_m is

Re: [R] Solving an optimization problem: selecting an "optimal" subset

2010-01-31 Thread Erwin Kalvelagen
-d1, d1>=0, d2>=0. The absolute value is d1+d2 provided that only one of d1,d2 is non-zero. In theory this can be formulated as a nonlinear constraint: d1*d2=0 but in this case we don't need it because as we are minimizing d1+d2 this condition holds automatically in th

Re: [R] Solving an optimization problem: selecting an "optimal" subset

2010-01-30 Thread Erwin Kalvelagen
optimization-problem-selecting.html. ---- Erwin Kalvelagen Amsterdam Optimization Modeling Group er...@amsterdamoptimization.com http://amsterdamoptimization.com __ R-help@r-project.org mailing list https:/

Re: [R] Solving an optimization problem: selecting an "optimal" subset

2010-01-30 Thread Erwin Kalvelagen
1-d2 = s-target d1,d2>=0 x[i] in {0,1} -------- Erwin Kalvelagen Amsterdam Optimization Modeling Group er...@amsterdamoptimization.com http://amsterdamoptimization.com __ R-help@r-project.or

Re: [R] optimization problem

2010-01-17 Thread Erwin Kalvelagen
Erwin Kalvelagen Amsterdam Optimization Modeling Group er...@amsterdamoptimization.com http://amsterdamoptimization.com On Sat, Jan 16, 2010 at 11:42 PM, Ravi Varadhan

Re: [R] optimization problem

2010-01-16 Thread Erwin Kalvelagen
is 10.50172. For small problems you often get the optimal solution, but the error caused by linearizing the objective becomes larger if the problems are larger. But the approximation is actually very good. Erwin ---- Erwin Kalvelag

Re: [R] optimization problem

2010-01-16 Thread Erwin Kalvelagen
I also have doubts this can be formulated correctly as a linear assignment problem. You may want to check the results with a small example. Erwin Erwin Kalvelagen Amsterdam Optimization Modeling Group er

Re: [R] optimization problem

2010-01-15 Thread Erwin Kalvelagen
he Frobenius norm. Erwin -------- Erwin Kalvelagen Amsterdam Optimization Modeling Group er...@amsterdamoptimization.com http://amsterdamoptimization.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] optimization problem

2010-01-15 Thread Erwin Kalvelagen
20 say it may become slow (this also depends on the data). Erwin ---- Erwin Kalvelagen Amsterdam Optimization Modeling Group er...@amsterdamoptimization.com http://amsterdamoptimization.com ___

Re: [R] NLS-Weibull-ERROR

2009-12-18 Thread Erwin Kalvelagen
63.6331 : -0.7559514801 0.0002816438 5.316930 263.6331 : -0.7558506044 0.0002816331 5.3169456595 Nonlinear regression model model: conc ~ K + alpha * vel^beta data: df K alpha beta -0.7558506 0.0002816 5.3169457 residual sum-of-squares: 263.6 N

Re: [R] A combinatorial optimization problem: finding the best permutation of a complex vector

2009-11-18 Thread Erwin Kalvelagen
See also: http://yetanothermathprogrammingconsultant.blogspot.com/2009/11/assignment-problem.html <http://yetanothermathprogrammingconsultant.blogspot.com/2009/11/assignment-problem.html> ---- Erwin Kalvelagen Amsterdam Optimi

Re: [R] A combinatorial optimization problem: finding the best permutation of a complex vector

2009-11-17 Thread Erwin Kalvelagen
twork - Optimal: Objective = 1.6173194067e+003 Network time =1.58 sec. Iterations = 209126 (102313) Even solved as an LP this takes about 150 seconds. (The solutions are the same as reported by solve_LSAP). ---- Erwin Kalve

Re: [R] Non linear programming optimization (which package to use?)

2009-11-13 Thread Erwin Kalvelagen
AMS). The first part is regression, that is of course very much in the realm of R. Erwin Kalvelagen Amsterdam Optimization Modeling Group er...@amsterdamoptimization.com http://amsterdamoptimization.com ___

Re: [R] Non linear programming optimization (which package to use?)

2009-11-12 Thread Erwin Kalvelagen
gramming problem. You can just run through the data set and pick the largest product. Erwin Erwin Kalvelagen Amsterdam Optimization Modeling Group er...@amsterdamoptimization.com http://amsterdamoptimization.com __