mymaxlik: mymaxlik

Description Usage Arguments Value Examples

View source: R/mymaxlik.R

Description

function to graphically estimate the maximum log likelihood for a given parameter

Usage

1
mymaxlik(lfun, x, param, ...)

Arguments

lfun

the supplied function to apply to the parameter

x

the data

param

the parameter of interest

...

Value

a list of the index of highest likelihood, the parameter at that index, the log likelihood at that index, and the slope at that position.

Examples

1
2
logbin=function(x,param) log(dbinom(x,prob=param,size=10))
mymaxlik(x=c(3,3,4,3,4,5,5,4),param=seq(0,1,length=1000),lfun=logbin,xlab=expression(pi),main="Binomial",cex.main=2)

Tom-bomb/glowup documentation built on Dec. 31, 2020, 5:32 p.m.