Video není dostupné.
Omlouváme se.
Fitting simple models using Maximum likelihood using R
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
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
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).
Could you kindly upload your code.
I am hoping to put them up on github soon. I have not taught this course for 8 years...
i've been working with the data in matrix format. This program seems to rely on data frames ...any suggestions?
Convert to DataFrames then!
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.
Whats the difference of using optim and MLE?
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.