Re: Generalized Method of Moments
- From: robert <rkozar@xxxxxxxxxx>
- Date: Sun, 27 Aug 2006 19:08:05 -0400
Hi Phil, thanks a lot for help.
If you don't mind please have a look at the following. I tried to
apply your suggestions.
Is it correct the following code? since it stucked on
fhandle = @(x)myfunction(x,W) telling that:
"identifier" expected, "(" found. (**)
I changed a little bit and wrote:
while (stopping_condition == false) (***)
W = eye(4); % as starting matrix (fixed one)
fhandle = myfunction(@param,W); %here I changed as response to
indicated above (**), correct??
st = [0.01 0.2 0.01];
[param] = fminunc(fhandle,st)
W = autocov(param); % generates new W matrix by external function
'autocov'
loop
end
now matlab asks me about the line (***)
"Expected a variable, function, or constant, found "% comment".", I
don't know the stopping loop value of param since I want to estimate
it. What kind of stopping_value I need ?? is it the number of
iterations?
would very appreciate your corrections to my version.
best, rob
Phil wrote:
.
Rob,
The structure of the code would be along these lines.
while (stopping_condition == false)
...
W=...
fhandle = @(x)myfunction(x,W)
[param]=fminunc(fhandle, 'starting value for param')
....
loop
Notice that "myfunction" is nested within an anonymous function,
that
way the function passed on to fminunc, changes according to new
values
of W in each iteration.
- Follow-Ups:
- Re: Generalized Method of Moments
- From: Phil
- Re: Generalized Method of Moments
- From: John D'Errico
- Re: Generalized Method of Moments
- References:
- Generalized Method of Moments
- From: robert
- Re: Generalized Method of Moments
- From: Phil
- Generalized Method of Moments
- Prev by Date: Re: How to save the full size figure using matlab commands?
- Next by Date: Re: Generalized Method of Moments
- Previous by thread: Re: Generalized Method of Moments
- Next by thread: Re: Generalized Method of Moments
- Index(es):
Relevant Pages
|
Loading