[R] Stuck using constrOptim
dre968
alyalko at gmail.com
Fri Apr 24 13:16:34 CEST 2009
I'm very interested. If you wouldn't mind I would love to see it.
Thank you for the help.
dre968 wrote:
>
> Trying to use constrOptim to minimize the sum of squared deviations. I
> put the objective function in as: sum((x %*% Y - Z)^2) so i'm trying to
> get values for x to minimize the sum of the squared deviations between the
> product of x and Y and Z.
>
> Anyways i have no problem using this when x is a 3x1 test variable. it
> works great with the constraints and everything. when i actually use it
> on my data x is 3x900 or so and it wont optimize it just gives me back my
> initial guess....this is the output i'm getting:
>
> $value
> [1] 22.7438
>
> $counts
> function gradient
> 906 NA
>
> $convergence
> [1] 1
>
> $message
> NULL
>
> $outer.iterations
> [1] 1
>
> $barrier.value
> [1] 1.381551e-06
>
> this is definitely not the right answer and it is just spitting back my
> initial guess back.
>
> Any ideas? are there limits as to how big the variables can be for this
> function?
>
--
View this message in context: http://www.nabble.com/Stuck-using-constrOptim-tp23197912p23214410.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list