On Jan 6, 2:40=A0pm, "Renato Costa" <nold...@yahoo.com.br> wrote:
> hi Peter
>
> Thanks for the message.
> I corrected another error and the message in question no 2 just stopped a=
ppearing.
> The dimensions were ok as I supposed. Don't know what happened.
>
> About the fmincon I've seen in forums that people actually use fminsearch=
instead. But my doubt is even basicier: How my series will enter in the ne=
gloglike function?
> The normal loglikelihood =A0doesn't =A0depend on data. Only h_t and e_t .
> Should I put it as an input even not actually using then in my calculatio=
ns?
>
> Best Regards
>
> Renato
>
> Peter Perkins <Peter.PerkinsRemoveT...@mathworks.com> wrote in message <g=
jtfv9$e0...@fred.mathworks.com>...
> > Renato Costa wrote:
> > > Maybe I should do more specific questions...
>
> > > 1. In which point at fmincon does the data enter? I know how to read =
data but where should i include it to be used in the finding of parameters =
estimates?
>
> > You would normally want to define a likelihood function in the form
>
> > =A0 =A0function nll =3D negLogLike(params,data)
>
> > and then give FMINCON an anonymous function like
>
> > =A0 =A0objFun =3D @(params) negLogLike(params,specificData)
>
> > where specificData is the actual variable in your workspace.
>
> > > 2. Why do I get an error in the following sentence:
>
> > > ??? Subscripted assignment dimension mismatch.
>
> > > Error in =3D=3D> main at 24
> > > =A0 =A0 =A0RegAc(1,t) =3D ( alpha(1) + (beta(1))*h(t1) + (lambda(1))=
*(mu(t1)+ (h(t1))*(e(t1)^2 )));%Regime zero
>
> > > if I declared:
>
> > > RegAc=3Dzeros(H+1,T); =A0 =A03x100 =A0but =A0 =A0 =A0RegAc(1,t) =A0is=
1x100
> > > h=3Dzeros(1,T); =A0 =A0 =A0 =A0 =A0 =A0 =A0 1x100
>
> > Can't help you there, other than to point out that the error message is=
pretty specific as to what's wrong. =A0Set a breakpoint (or use "dbstop if=
error") and use the debugger to find out what is the wrong size.
>
> > Hope this helps.
There is a (free) Matlab toolbox that fits Generalised Extreme Value
(GEV) and Pareto distributions using maximum likelihood here:
http://www.bilkent.edu.tr/~faruk/evim.htm
