Displaying 3 results from an estimated 3 matches for "wolley".
Did you mean:
woolley
2011 May 19
3
problem with optim()
Dear R-users,
I would like to maximize the function g above which depends on 4 parameters (2 vectors, 1 real number, and 1 matrix) using optim() and BFGS method. Here is my code:
# fonction to maximize
g=function(x)
{
x1 = x[1:ncol(X)]
x2 = x[(ncol(X)+1)]
x3 = matrix(x[(ncol(X)+2):(ncol(X)+1+ncol(X)*ncol(Y))],nrow=ncol(X),ncol=ncol(Y))
x4 = x[(ncol(X)+1+ncol(X)*ncol(Y)+1):length(x)]
2011 Apr 14
0
question about optim
...urn "NAN" or "INF" values...
Does anyone have any idea where the problem could come from ?
Many thanks.
> To: r-help@stat.math.ethz.ch
> From: bbolker@gmail.com
> Date: Tue, 12 Apr 2011 17:24:05 +0000
> Subject: Re: [R] question about optim
>
> chirine wolley <wolley.chirine <at> hotmail.com> writes:
>
> > Dear R-users, I would like to use optim( ) to minimize a function
> > which depends on 4 parameters: 2 vectors, a scalar, and a matrix.
> > And I have a hard to define the parameters at the beginning of the
> >...
2011 Apr 12
1
question about optim
Dear R-users,
I would like to use optim( ) to minimize a function which depends on 4 parameters: 2 vectors, a scalar, and a matrix.
And I have a hard to define the parameters at the beginning of the function, and then to call optim. Indeed, all the examples I have seen dont treat cases where parameters are not all real.
Here is my code, it doesnt work but its just to show you where is exactly my