mymaxlik | R Documentation |
Uses the method of maximum likelihood to estimate the max likelihood of a distribution, given some prior outcomes and a function that returns the log likelihood given a parameter.
mymaxlik(lfun, x, param, ...)
lfun |
- a function that will find the log likelihood given a value-parameter pair |
x |
- a vector of prior outcomes |
param |
- the parameter to be passed to the distribution (for instance, p in a binomial or lambda in a Poisson) |
... |
- other parameters that will be passed to 'plot()' |
maxima and also a neat graph
## Not run: mymaxlik(function (x, param) log(dbinom(x, prob=param, size=20)), c(1,2,3,4), seq(0,1,length=1000)) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.