Video není dostupné.
Omlouváme se.

Fitting simple models using Maximum likelihood using R

Sdílet
Vložit
  • čas přidán 28. 09. 2016
  • Note (Sept 2019): New link to data datadryad.org/...
    How to fit simple linear models (i.e. regression) using maximum likelihood by writing your own objective functions and using the bbmle() library (which provides wrappers for the optim() ). Surprisingly straightforward

Komentáře • 9

  • @brunarodrigues5236
    @brunarodrigues5236 Před 7 lety

    How do I do if I want on loglokelihood function not given by the R library? I have one, and when I use mle2 with BFGS method the program says " L-BFGS-B needs finite values of 'fn' ", so I don't know how to solve his

    • @iandworkin1347
      @iandworkin1347  Před 6 lety

      Check the R documentation, but if memory serves you just need to provide an additional argument with the vector with th constraints (i.e. boundaries for searching).

  • @mariakamran7442
    @mariakamran7442 Před 6 lety +1

    Could you kindly upload your code.

    • @iandworkin1347
      @iandworkin1347  Před 4 lety

      I am hoping to put them up on github soon. I have not taught this course for 8 years...

  • @stoptheangst
    @stoptheangst Před 6 lety

    i've been working with the data in matrix format. This program seems to rely on data frames ...any suggestions?

    • @NphiniT
      @NphiniT Před 5 lety

      Convert to DataFrames then!

    • @iandworkin1347
      @iandworkin1347  Před 4 lety

      Do you mean bbmle? I don't think it needs data frames. It could be the way I coded something.. I am hoping to put all scripts up and make links for them sometime soon. I have not taught this course in a long while.

  • @Zirea.eya69
    @Zirea.eya69 Před 7 lety

    Whats the difference of using optim and MLE?

    • @iandworkin1347
      @iandworkin1347  Před 7 lety

      MLE and MLE2 (in the bbmle library) are wrappers for optim. They call the same function optim(), but are meant to be a bit easier. note that optim and optimize are NOT the same. optimize only works for one parameter problems. optim (and MLE and MLE2) allow for potentially an arbitrary number of functions.