[R-SIG-Finance] Grouped Log Likelihood function??

Brian G. Peterson brian at braverock.com
Mon Nov 2 19:01:01 CET 2009


Noah,

You'll likely get more complete responses from the main r-help list, as 
your problem is more of a statistics problem than a finance problem.

Regards,

    - Brian

Noah Silverman wrote:
> Hi,
>
> I'm still fairly new to R and this is my first time posting to this 
> group.
>
> I've searched rseek.org high and low and can't seem to find an answer 
> to this.
>
> I want to maximize likelihood for a set of training data, but the data 
> is grouped.  (Think multiple trials.)
>
> It would probably be possible to do this with some nested for loops 
> manually, but would be painfully slow.
>
> The general formula is this...  (Please excuse my notation, but I 
> can't write proper math formulas in an email.)
>
> L(a) = product(
> for( trial in 1:length(groups)){
>     exp(a(i) * X) / sum(exp(a(i) * X))
> }
> )
>
> As you can see, a normal logLik function will lose all the group data. 
> This seems like a common enough application that there must me some 
> easy function in R.
>
> THEN, just to complicate things, I need to run a second logLik with 
> some trickier data. There are 14 variables and I need to adjust them 
> all to find the maximum likelihood from a formula. (kelly criterion on 
> entries in a portfolio.)
>
> Any suggestions would be gratefully appreciated.
>
> Thanks!
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.



More information about the R-SIG-Finance mailing list